thinhare
-
Posts
4 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by thinhare
-
-
Hi, there,
I tried to read a bitmap image, then convert it to a 2D array using 'array reshape', but the resulted image was distorted.
To show that, I convert the 2D array back to picture.
Any ideas?
-
problem solved. the way I wired array into for loop was not correct.
-
Hello, everyone,
Here is my problem: I'd like to implement "connected component labeling" algorithm to analyze particles in a binary bitmap image.
each time a pixel is read, if it is black, the original valus is kept;
if it is white, and if its 8 neighoring pixels are all black, an unique id is assigned to the pixel;
if one or more of 8 neighboring pixels are white too, then find out the ids of those pixels, and pick the lowest one assign to the current/central pixel.
therefore, each time 9 values out of the image array will be read and the assigned id will be written back to the array.
attached you can find my implementation, strangely enough that it is slow, and the id seems never changes (I set the starting value as 10000).
Any idea?
Thanks.
thinhare
reshaping bmp distorted
in Machine Vision and Imaging
Posted
QUOTE (nicolasB @ Feb 14 2009, 09:18 AM)
Nicolas-
Thanks. That works.
Can you elaborate on "padded width"? What kind of machenism is that?