Ask Your Question
0

blob finding from a thresholded image

asked 2012-10-12 04:03:25 -0500

harsha_fractal gravatar image

updated 2012-10-13 02:30:31 -0500

Hi, thanks for your reply.And sorry,I think I wasnt clear with my problem.I created a 8bit,binary thresholded CvMat using OpenCV and then passed that into simple cv with the Image function. That worked ok. Then I tried to do findBlobs on that image in simpleCV and got the error message I posted in my last post.So the issue is with findblobs which seems to fail if you pass it an already thresholded image. (because it does thresholding too inside it) Ive been trying to figure out how to bypass that part of code within findBlobs so that i can fix the problem but not yet figured it out. One thing Id like to know is if theres any special colourspace designated to a thresholded image(like in matlab its called a logical,not a grayscale).If not, is there someway to detect if an image is already thresholded/binary? If I figure this out , Ill let you know, else Ill add it to the github. thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-10-12 09:16:38 -0500

kscottz gravatar image

Let me see if I understand what your problem is. You use the opencv python bindings to create an IPL Image / CVMat and then you try to load it into an image and it breaks? What is the specific format of your image (i.e. depth, color/gray, data type, etc). I am not sure we are catching all of the possible OpenCV types in the Image constructor but this is something we want to do in 2.0.

My gut tells me that you are using a 32F opencv image which isn't supported yet. If you want to fork the code and try to create a work around I can totally merge it back into the development branch. If you find that this is an issue but are not up to fixing it please submit a ticket to our github repo so we can address it as soon as we get time for another development scrum.

edit flag offensive delete link more
0

answered 2012-10-13 02:19:21 -0500

harsha_fractal gravatar image

Ok Thanks for the reply. And sorry, I think I wasnt clear with my problem. For me , the problem is not with the Image function itself. I created a binary,8bit,1 channel thresholded CvMat using openCV and loaded it into simpleCV with img=Image(thresholdedimage). Now if i run img.findBlobs() I get the above error.So the issue is with findblobs, which seems to fail if passed an already thresholded image.

Ive been looking at the source code and trying to figure out where to add some code to fix the issue. If i figure it out,I ll let you know. Im think it has to do with bypassing the code that creates a thresholded image within findblobs. thanks again harsha

edit flag offensive delete link more

Comments

sorry i seem to have removed the last post i made by editing it..wanted to only reply to Kscottz :( dont have the comp on which simplecv is installed now.will post the error again on monday.sheesh!

harsha_fractal gravatar imageharsha_fractal ( 2012-10-13 02:33:31 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-10-12 04:03:25 -0500

Seen: 216 times

Last updated: Oct 13 '12