Re: Objects in ENVI ROI files [message #48821] |
Tue, 23 May 2006 00:57  |
Bradley Wallet
Messages: 4 Registered: March 2006
|
Junior Member |
|
|
Yes, I know how to do this. The problem is that I have multiple
objects in the ROI file. I do not really need the polygon information,
but I need which pixels in the ROI file associate with each object.
Currently, I take the first pixel in the ROI, and I look for any other
ROI pixels that are 4-point neighbors. Then, I take these pixels, and
I find any ROI pixels that are 4-point neighbor. I repeat this until I
have the all the pixels connected with the first pixel. Then, I pick
another pixel that is not assigned to the first object, and I repeat
the object growing routine. I then do this again and again until all
the pixels in the ROI are assigned to an object, and I then have all
the objects that are described by the ROI file. I am pretty good at
writing code to work with ENVI and ENVI ROI files.
However, this just doesn't seem like the cleanest way to do it. ENVI
ROI files store polygons. When you open the ROI file, the information
is converted to pixel x and y coordinates. I am looking for a way to
directly access the polygon information in the ROI file so I do not
have to reconstruct the contained objects.
Brad
------------------------------------------------------------ --------------------------------------
Brad Wallet
President and Chief Scientist
Automated Decisions, LLC
consulting@automateddecisions.com
|
|
|