comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » extract ROI from contours with sub-pixel accuracy
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
extract ROI from contours with sub-pixel accuracy [message #81535] Tue, 25 September 2012 22:28 Go to next message
suruchi is currently offline  suruchi
Messages: 13
Registered: September 2012
Junior Member
Hello
I have been able to extract ROIs from contour, but if i count the no of pixels it also includes pixels which are not fully covered in the contour.. hence for my set of images i have evolving contours.. but pixel count does not change because of this. Is there is way i can account for the pixel fraction covered in contour.. and take that information for my ROI area calculation..?
I don't wish to use 'perimeter area' since perspective correction is to be applied in the area calculation..using distance of pixels from the center of image.
Can i 'extract ROIs' too with sub-pixel information..?
Re: extract ROI from contours with sub-pixel accuracy [message #84298 is a reply to message #81535] Fri, 17 May 2013 23:39 Go to previous message
suruchi is currently offline  suruchi
Messages: 13
Registered: September 2012
Junior Member
On Wednesday, September 26, 2012 10:58:00 AM UTC+5:30, suruchi wrote:
> Hello
>
> I have been able to extract ROIs from contour, but if i count the no of pixels it also includes pixels which are not fully covered in the contour.. hence for my set of images i have evolving contours.. but pixel count does not change because of this. Is there is way i can account for the pixel fraction covered in contour.. and take that information for my ROI area calculation..?
>
> I don't wish to use 'perimeter area' since perspective correction is to be applied in the area calculation..using distance of pixels from the center of image.
>
> Can i 'extract ROIs' too with sub-pixel information..?

I found a solution for this.. so would like to share:
first the fractional number of pixels covered within the contour or within roi object (say 'oroi') vertices can be calculated using:
Result = oroi->IDLanROI::ComputeGeometry(AREA=ar)
So here 'ar' gives the geometric area= total fractional number of pixels covered.
Secondly to know exactly the fractional area of each pixel covered by contour is through JD Smiths's "POLYFILLAA" (http://tir.astro.utoledo.edu/jdsmith/code/idl.php).
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: strictarrsubs in IDL 8.1
Next Topic: calling ANSYS Fluent from IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:12:11 PDT 2025

Total time taken to generate the page: 0.00476 seconds