Hello All:
I have a N by 2 matrix as follows:
FABSCoordinates[*,0] = [n1,n2,n3,......ni]
FABSCoordinates[*,1]=[m1,m2,m3......mj]
It contains the N and M coordinate lists for a certain group of objects within an image. What I need to do is filter these coordinates for some given boundary points (in N and M). This is carried out as follows:
;--for N-boundaries
filterMaxN = where(FABSCoordinates[*,0] LE maxBoundPtN)
filterMinN = where(FABSCoordinates[filterMaxN,0] GE minBoundPtN)
;--now filter the M-coordinates for the bounds that were passed from the N filtering
filterMaxM = where(FABSCoordinates[filterMinN,1] LE maxBoundPtM)
filterMinM = where(FABSCoordinates[filterMaxM,1] GE minBoundPtM)
Ncoordinates = FABSCoordinates[filterMinM,0]
Mcoordinates = FABSCoordinates[filterMinM,1]
;--re-initialize a variable to store the N and M coordinates for the region of interest
FABSCoords = lindgen(n_elements(Ncoordinates),2)
FABSCoords[*,0] = Ncoordinates
FABSCoords[*,1] = Mcoordinates
The problem with the above code is that it does not filter anything and instead returns the original coordinates for N and M.
Any Ideas?
|