From: snehal d on 31 Mar 2010 13:11 I want to put boundary depending on min and max value of co-ordinates to detect object can any one help me.... below code is not working can anyone help... [row,col]=size(ero); for i=1:1:row for j=1:1:col if ero(i,j)==1 if i wrote:> I want to put boundary depending on min and max value of co-ordinates to detect object can any one help me.... below code is not working can anyone help... > [row,col]=size(ero); > for i=1:1:row > for j=1:1:col >    if ero(i,j)==1 > >        if i        min=ero(i,j); >        else >            max=ero(i,j); >        end > >    end > end > end -------------------------------------------------------------- I don't understand your question, nor your code. It's not even MATLAB code - there is no ++ operator in MATLAB. Plus all it does is repeatedly overwrite and override max and min with the latest pixel value. Finally it overrides MATLAB's max() and min() functions so they won't work anymore. This is so messed up that I don't even know where to start. From: snehal d on 1 Apr 2010 10:28 I hve converted rgb to gray and detected edges of the object.... now i should put boundary to this object so that i can recognise object shape...help me in finding out min and max coordinates value so that using this values i can draw boundary... From: ImageAnalyst on 1 Apr 2010 12:52 On Apr 1, 10:28 am, "snehal d" wrote:> I hve converted rgb to gray and detected edges of the object.... now i should put boundary to this object so that  i can recognise object shape...help me in finding out min and max coordinates value so that using this values i can draw boundary... ------------------------------------------------ Not enough information. Show some code that actually works, and post your image to http://drop.io. Finally explain what you want to do - "recognise" is WAY to vauge of a term, as is "put boundary to this object". Then we can talk. From: snehal d on 1 Apr 2010 13:51 ImageAnalyst wrote in message ...> On Apr 1, 10:28 am, "snehal d" wrote: > > I hve converted rgb to gray and detected edges of the object.... now i should put boundary to this object so that  i can recognise object shape...help me in finding out min and max coordinates value so that using this values i can draw boundary... > > ------------------------------------------------ > Not enough information. Show some code that actually works, and post > your image to http://drop.io. Finally explain what you want to do - > "recognise" is WAY to vauge of a term, as is "put boundary to this > object". Then we can talk. suppose consider their is a square in an image, i used canny edge detector to point out the edges now i want to put an boundary to that object(square) so that i can recognise that is a square... help me in putting boundary to object...