10-20-2008 08:13 AM
10-21-2008 09:31 AM
If you set the input parameters right, the count objects might be able to find the circular object...if it does,...it provides the center x,y coordinates...it also can provide a complete ROI. You can use the IMAQ Convert ROI to Annulus to convert the xy center and radii to an annulus...from this point I am as lost as you are. I am trying to do the same thing and don't know were to go from here.
If you can set the threshold, and make a mask of the round part of the image...then use the mask to extract only the round part...that might work. The problem I have been having with that is the images I am working with are grayscale single precision and the mask wants U8...who knew?
Please help me too.
Thanks.
10-21-2008 10:10 AM - edited 10-21-2008 10:10 AM
Hi, Colleagues,
Not fully understand your troubles, but may be following code will be helpful for you:
best regards,
Andrey.
10-21-2008 10:11 AM
It sounds to me like there are two distinct steps here.
First, you need to locate the center and radius of your circular area. If you know the approximate location, you could use radial edge detection (find circle). If not, you might use pattern detection or some other method to locate it.
Second, after you have your circle, you need to mask it. The simplest method is to convert a circular ROI to a mask (ROI to Mask), then apply the mask to your image.
If you need more help, posting an example image would help us help you.
Bruce
10-21-2008 10:13 AM
What about the conversion of the Grayscale Single Percision to U8 to be able to use the mask...how would that work?
SUPER posts and perfect solutions.
10-21-2008 10:22 AM
Its will be OK for Grayscale Single as well. The only Mask should be U8. Try to change types of Source and Destination to Grayscale(SGL) and see how it works.
Andrey.
06-27-2009 10:09 AM
Hey guys,
I am also facing some problem in extracting circular region. In my case I have a coloured image and after conversion to gray scale and finding the circular edge I was trying to extract the circular region based on given xy cordinates and radius(found out by circular edge detection block). I tried to integarte this part of the block diagram with the diagram provided in the snapshots here. I am linking the output of my color plane extraction to the output of the 'Imaq read file block' and have deleted this block as well as the Imaq creat block. I am getting error in Imaq ROIToMask block. The message is-> Imaq Vision:(Hex 0xBFF605B8) Invalid ROI.
06-29-2009 01:48 PM
Hi Vineet,
Can you post your code so we can see what you are working with?
07-01-2009 01:06 AM
This will occur If you have not declared proper buffer. Connect an imaq create to the image destination of roi extractor. Infact connect imaq create to all the img dst.
07-01-2009 03:27 AM
Hi,
I have initialized the buffer for each destination as said by you. But the condition is same....