<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: bwlabel search order</title>
	<atom:link href="http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/</link>
	<description>Steve Eddins manages the Image &#38; Geospatial development team at The MathWorks and coauthored Digital Image Processing Using MATLAB. He writes here about image processing concepts, algorithm implementations, and MATLAB.</description>
	<lastBuildDate>Fri, 17 May 2013 16:28:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-24334</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 18 Jul 2011 14:26:35 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-24334</guid>
		<description>Melanie&#8212;My &lt;a href=&quot;http://blogs.mathworks.com/steve/2011/06/21/advanced-maneuvers-with-regionprops/&quot; rel=&quot;nofollow&quot;&gt;21-June-2011 post&lt;/a&gt; might give you some ideas on this. It shows how to use the list of index values for each object to index into another image to get corresponding values from that image. I&#039;ll also put this problem on my list of potential blog topics.</description>
		<content:encoded><![CDATA[<p>Melanie&mdash;My <a href="http://blogs.mathworks.com/steve/2011/06/21/advanced-maneuvers-with-regionprops/" rel="nofollow">21-June-2011 post</a> might give you some ideas on this. It shows how to use the list of index values for each object to index into another image to get corresponding values from that image. I&#8217;ll also put this problem on my list of potential blog topics.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Melanie</title>
		<link>http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-24321</link>
		<dc:creator>Melanie</dc:creator>
		<pubDate>Wed, 13 Jul 2011 16:37:58 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-24321</guid>
		<description>Dear Steve,

great explanation above. Thanks for your nice blogs!

I have a slightly different problem with bwlabel. 
I have different segmentations of the same image at different &quot;sensitivities&quot; - meaning my first segmentation is rough and has maybe only three regions that cover the whole image, then the second is finer and divides the image into 6 regions, while the third and so on refine the image segmentation even further.
(Details: I am dealing with a Ultrametric Contour Map)

If I use bwlabel at each level then it seems hard for me to try to trace the &quot;parent&quot; regions all the way back through the output provided by bwlabel at each segmentation level. For example if I want to in the end remove all small regions by including it into the larger region that it first got split off from, I can not identify the parent by looking at the labels provided by bwlabel, since they change for each level of segmentataion.

Any ideas?</description>
		<content:encoded><![CDATA[<p>Dear Steve,</p>
<p>great explanation above. Thanks for your nice blogs!</p>
<p>I have a slightly different problem with bwlabel.<br />
I have different segmentations of the same image at different &#8220;sensitivities&#8221; &#8211; meaning my first segmentation is rough and has maybe only three regions that cover the whole image, then the second is finer and divides the image into 6 regions, while the third and so on refine the image segmentation even further.<br />
(Details: I am dealing with a Ultrametric Contour Map)</p>
<p>If I use bwlabel at each level then it seems hard for me to try to trace the &#8220;parent&#8221; regions all the way back through the output provided by bwlabel at each segmentation level. For example if I want to in the end remove all small regions by including it into the larger region that it first got split off from, I can not identify the parent by looking at the labels provided by bwlabel, since they change for each level of segmentataion.</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dona doni</title>
		<link>http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-23874</link>
		<dc:creator>dona doni</dc:creator>
		<pubDate>Tue, 25 Jan 2011 16:09:04 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-23874</guid>
		<description>hello sir,

is it possible to sorting bwlabel output by angle? for example if i have X letter, then i remove the x intersection. so i have 4 separate object and want to sorting them by angle.

best regards 

dona</description>
		<content:encoded><![CDATA[<p>hello sir,</p>
<p>is it possible to sorting bwlabel output by angle? for example if i have X letter, then i remove the x intersection. so i have 4 separate object and want to sorting them by angle.</p>
<p>best regards </p>
<p>dona</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-23068</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Sat, 01 May 2010 13:51:14 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-23068</guid>
		<description>Priyanka&#8212;Use the &quot;Get the MATLAB code&quot; link at the bottom of the post to make sure you&#039;re using exactly the same code that I used.</description>
		<content:encoded><![CDATA[<p>Priyanka&mdash;Use the &#8220;Get the MATLAB code&#8221; link at the bottom of the post to make sure you&#8217;re using exactly the same code that I used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: priyanka</title>
		<link>http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-23067</link>
		<dc:creator>priyanka</dc:creator>
		<pubDate>Sat, 01 May 2010 12:40:11 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-23067</guid>
		<description>hello sir,
i was trying to use bwlabel in the matrix bw of this post.
but the output matrix after applying bwlabel is not the same as the L of this post .
rather the output was the same matrix.
sir plz help me</description>
		<content:encoded><![CDATA[<p>hello sir,<br />
i was trying to use bwlabel in the matrix bw of this post.<br />
but the output matrix after applying bwlabel is not the same as the L of this post .<br />
rather the output was the same matrix.<br />
sir plz help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-21911</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 24 Jun 2009 14:39:45 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-21911</guid>
		<description>John&#8212;Thanks for the tip.</description>
		<content:encoded><![CDATA[<p>John&mdash;Thanks for the tip.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-21910</link>
		<dc:creator>John</dc:creator>
		<pubDate>Wed, 24 Jun 2009 14:33:20 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-21910</guid>
		<description>One trick I have used is a template match...for example if the text is a fixed space font, I know where possible character centers will be and I match the connected component to the nearest possible location. This way the object is identified in a postion I expect it to be in and allows me to &quot;track&quot; objects in a series of images as long as they don&#039;t move too far. If an object is missing at a location, I just skip that component label...if two objects appear close to the same location, I can consider if these are one object that is broken. This obviously has problems if spacing is real tight and/or the template is offset too much. In most cases I use a VERY good image to automatically build the template for future images</description>
		<content:encoded><![CDATA[<p>One trick I have used is a template match&#8230;for example if the text is a fixed space font, I know where possible character centers will be and I match the connected component to the nearest possible location. This way the object is identified in a postion I expect it to be in and allows me to &#8220;track&#8221; objects in a series of images as long as they don&#8217;t move too far. If an object is missing at a location, I just skip that component label&#8230;if two objects appear close to the same location, I can consider if these are one object that is broken. This obviously has problems if spacing is real tight and/or the template is offset too much. In most cases I use a VERY good image to automatically build the template for future images</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-21849</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 09 Jun 2009 14:51:58 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-21849</guid>
		<description>u1ukbek&#8212;Pass your binary image directly to regionprops. Use the bounding box parameters to compute the first and low rows and columns and then use ordinary MATLAB array indexing to extract the subimage.</description>
		<content:encoded><![CDATA[<p>u1ukbek&mdash;Pass your binary image directly to regionprops. Use the bounding box parameters to compute the first and low rows and columns and then use ordinary MATLAB array indexing to extract the subimage.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: u1ukbek</title>
		<link>http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-21846</link>
		<dc:creator>u1ukbek</dc:creator>
		<pubDate>Tue, 09 Jun 2009 11:49:59 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-21846</guid>
		<description>Hello,

How to take BoundingBox of all objects as single object. Then want to crop region by using BoundingBox parameters.

Thanks</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>How to take BoundingBox of all objects as single object. Then want to crop region by using BoundingBox parameters.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ioan Buciu</title>
		<link>http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-21677</link>
		<dc:creator>Ioan Buciu</dc:creator>
		<pubDate>Mon, 13 Apr 2009 08:53:51 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/03/25/bwlabel-search-order/#comment-21677</guid>
		<description>Hi all,

there is a simply way of scanning the image along the rows using bwlabel. The idea is to separate the characters along the rows and eliminate the line space amongst the rows and then take one row at the time. Of course, this only works when there is no connection between the text rows. Below is one example:

&lt;pre&gt;
url = &#039;http://blogs.mathworks.com/images/steve/186/scanned_page.png&#039;;
bw = imread(url);
bw = ~bw(1107:1194, 17:135);
imshow(bw)
% Initialize
WP = 1:size(bw,1);
% Assign 0 to the lines between characters
% and 1 to the lines filled with characters
for i = 1:size(bw,1)
    l = length(find(bw(i,:) == 0));
    if (l == size(bw,2))
        WP(i) = 0;
    else
        WP(i) = 1;
    end
end
% Find and separate the image in row-character-blocks 
startofblock = strfind(WP, [0,1]);
endofblock = strfind(WP,[1,0]);
statistics = [];
for i = 1:size(startofblock,2)
    subplot(5,2,i);
    imshow(bw(startofblock(i)+1:endofblock(i),:))
    stats = regionprops(bwlabel(bw(startofblock(i)+1:endofblock(i),:)),&#039;Image&#039;);
    statistics = cat(1, statistics, stats);
end
&lt;/pre&gt;

The only problem is that we have 20 characters instead of 19. More precisely, two caracters (&quot;a&quot; and &quot;r&quot; are viewed as one connected character &quot;ar&quot; as they are actually connected. On the other hand there are 2 characters that are disconnected (see &quot;f&quot; and &quot;a&quot; from the last line). However, this is another story and you can use some other algorithms for segmentation and character connection before segmentation.

Best regards,

IB</description>
		<content:encoded><![CDATA[<p>Hi all,</p>
<p>there is a simply way of scanning the image along the rows using bwlabel. The idea is to separate the characters along the rows and eliminate the line space amongst the rows and then take one row at the time. Of course, this only works when there is no connection between the text rows. Below is one example:</p>
<pre>
url = '<a href="http://blogs.mathworks.com/images/steve/186/scanned_page.png&#039;" rel="nofollow">http://blogs.mathworks.com/images/steve/186/scanned_page.png&#039;</a>;
bw = imread(url);
bw = ~bw(1107:1194, 17:135);
imshow(bw)
% Initialize
WP = 1:size(bw,1);
% Assign 0 to the lines between characters
% and 1 to the lines filled with characters
for i = 1:size(bw,1)
    l = length(find(bw(i,:) == 0));
    if (l == size(bw,2))
        WP(i) = 0;
    else
        WP(i) = 1;
    end
end
% Find and separate the image in row-character-blocks
startofblock = strfind(WP, [0,1]);
endofblock = strfind(WP,[1,0]);
statistics = [];
for i = 1:size(startofblock,2)
    subplot(5,2,i);
    imshow(bw(startofblock(i)+1:endofblock(i),:))
    stats = regionprops(bwlabel(bw(startofblock(i)+1:endofblock(i),:)),'Image');
    statistics = cat(1, statistics, stats);
end
</pre>
<p>The only problem is that we have 20 characters instead of 19. More precisely, two caracters (&#8220;a&#8221; and &#8220;r&#8221; are viewed as one connected character &#8220;ar&#8221; as they are actually connected. On the other hand there are 2 characters that are disconnected (see &#8220;f&#8221; and &#8220;a&#8221; from the last line). However, this is another story and you can use some other algorithms for segmentation and character connection before segmentation.</p>
<p>Best regards,</p>
<p>IB</p>
]]></content:encoded>
	</item>
</channel>
</rss>
