From: Gumah on
Hi all.. I am working with word segmentation. I need to increase the space between words in binary image .. to do so I am thinking of adding a column of 0 pixels whenever 0 pixels is exist in the binary image.. any one know how to do that??
From: Ashish Uthama on
On Wed, 14 Apr 2010 01:35:04 -0300, Gumah <alrjele2004(a)yahoo.com> wrote:

> Hi all.. I am working with word segmentation. I need to increase the
> space between words in binary image .. to do so I am thinking of adding
> a column of 0 pixels whenever 0 pixels is exist in the binary image..
> any one know how to do that??

Cant you just use a smaller neighborhood?

Please elaborate on 'whenever 0 pixels is exist in the binary image'.
Did you mean - replace one column of all zero values with multiple columns
of zeros?
From: Gumah on
On Apr 14, 8:01 pm, "Ashish Uthama" <first.l...(a)mathworks.com> wrote:
> On Wed, 14 Apr 2010 01:35:04 -0300, Gumah  <alrjele2...(a)yahoo.com> wrote:
> > Hi all.. I am working with word segmentation. I need to increase the  
> > space between words in binary image .. to do so I am thinking of adding  
> > a column of 0 pixels whenever 0 pixels is exist in the binary image..  
> > any one know how to do that??
>
> Cant you just use a smaller neighborhood?
>
> Please elaborate on 'whenever 0 pixels is exist in the binary image'.
> Did you mean - replace one column of all zero values with multiple columns  
> of zeros?

hi .. thanks for feedback .. no I need just to add column of 0
wherever the column of 0 is exist.. let say
x=
1 0 1 1 0 1
2 0 2 2 0 2
3 0 3 3 0 3
5 0 5 5 0 5

I want x to become:
1 0 0 1 1 0 0 1
2 0 0 2 2 0 0 2
3 0 0 3 3 0 0 3
5 0 0 5 5 0 0 5
From: ImageAnalyst on
We already talked about this in your duplicate post.
From: Bruno Luong on
x=[1 0 1 1 0 1;
2 0 2 2 0 2;
3 0 3 3 0 3;
5 0 5 5 0 5]

% Engine
b=any(x,1);
d=diff([0 find(b)]);
d(d>1)=d(d>1)+1;
c=cumsum(d);
clear xx
xx(:,c)=x(:,b)

% Bruno