Create an account Log In

Fast Parsing of Line Segments in a BW Mask (Scripts) 1.0

Average Rating
User Rating:
Visitors Rating:
My rating:

See full specifications

Fast Parsing of Line Segments in a BW Mask (Scripts) Publisher's description

LINEINMASK determines portions of the line in and out of a mask

LINEINMASK determines portions of the line in and out of a mask

[inX inY] = LINEINMASK(XS,YS,BW,XV,YV) computes a the segments of the
line specified by verticies XV and YV that are inside the mask BW.
Points XS and YS specify the limits (or pixel values) of the
coordinates of the matrix BW.

[inX inY] = LINEINMASK(BW,XV,YV) assumes XS=1:N and YS=1:M where
[M,N]=SIZE(BW).

[inX inY] = LINEINMASK(...,METHOD) Uses the given method to create the
polygon from the mask.
Inner | Outer | {Exact}

[inX inY outX outY] = LINEINMASK(...) outputs the segments of the line
both in and out of the mask.

Example:
I = imread('rice.png');
level = graythresh(I);
bw = im2bw(I,level);
bw = bwareaopen(bw, 50);
[a b] = size(bw);
xv = b*rand(10,1);
yv = a*rand(10,1);
[inX inY outX outY] = lineinmask(bw,xv,yv,'exact');
figure
imagesc(bw)
colormap(bone)
hold on;
h1 = plot(inX,inY,'r');
h2 = plot(outX,outY,'b');
legend([h1 h2],'Inside Mask','Outside Mask');

By J Sullivan, August 2011

System Requirements:

MATLAB 7.12 (2011a)
Program Release Status: New Release
Program Install Support: Install and Uninstall

Fast Parsing of Line Segments in a BW Mask (Scripts) Tags:

Click on a tag to find related softwares

Is Fast Parsing of Line Segments in a BW Mask (Scripts) your software?

Manage your software

Most Popular

ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.