Prev: Solving a transcendental equation
Next: SVM For OCR, is it possible to use input methods similar to neural net ?
From: Kenneth Galea on 2 Jan 2010 12:50 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <069c23e5-e130-4908-be8a-76adb3784e79(a)g31g2000vbr.googlegroups.com>... > On Jan 2, 10:21 am, "Kenneth Galea" <k.ga...(a)hotmail.com> wrote: > > Yes ok, you're right there was no need to seperate variable names. However I don't see the need for using a binary image instead of RGB image (which still works)!! What's the difference?? In my program I initially used the binary image which was then labelled and filtered (by eliminating labelled objects <= 5 pixels) where an RGB image was used to identify different objects (with different colours)....why do I need to go back to my initial binary image?? > > Thanks Kenneth > ------------------------------------------------------------------------------------ > Kenneth: > OK, tell me how you're going to find boundaries on a pseudocolored, > labeled image. > > If you do it (and it can be done if you unwisely decide to attempt > it), it won't be in a single-line call, like my call to bwboundaries. > It will take dozens or hundreds of lines of code. There are several > ways to find boundaries on a labeled image, but the easiest would be > to just convert the image to binary before you start. But then if > you're going to do that then why not just call bwboundaries() on that > binary image? > > You say "an RGB image was used to identify different objects (with > different colours)." Just to clarify, the identification of different > objects was done by the labeling function which created an integer > image where each blob's pixels was given a single number. So you have > islands (blobs) where everywhere in it is 1, and it's 2 for the next > blob, and it's 3 for the next blob. No colors involved so far - just > integers. You can convert this to a color image where each blobs is > pseudocolored with a different color using the function call > coloredLabels = label2rgb (labeledImage, 'hsv', 'k', 'shuffle'); % > pseudo random color labels > This will color the blobs for display and in that sense identify them, > but does not identify them in the sense of being used "to identify > different objects." Just wanted to clarify that, if not for you then > for others. > > Regards, > ImageAnalyst Hi Thanks for your clarification...you are right ....that's what I really meant. I tried using B = bwboundaries(L,8, 'noholes') where L is a labelled matrix and also tried B = bwboundaries(binaryimage,8,'noholes') and when I debug the coordinates of the object contours in variable B are exactly the same for both solutions. I know it's strange but I checked and re-checked :/ Thanks Kenneth
From: ImageAnalyst on 2 Jan 2010 14:58 OK then maybe they've built bwboundaries to just look at zero and non- zero pixel values. If it works for you, then great.
First
|
Prev
|
Pages: 1 2 3 Prev: Solving a transcendental equation Next: SVM For OCR, is it possible to use input methods similar to neural net ? |