|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.pearsoneduc.ip.op.RegionGrower
A class that segments greyscale or colour images using a region growing algorithm.
Constructor Summary | |
RegionGrower(java.awt.image.BufferedImage image,
java.util.List seeds,
int conn,
int thresh)
Constructs a RegionGrower that will grow regions in an image from the specified set of seed pixels. |
|
RegionGrower(java.awt.image.BufferedImage image,
java.util.List seeds,
int conn,
int thresh,
boolean monitor)
Constructs a RegionGrower that will grow regions in an image from the specified set of seed pixels. |
Method Summary | |
int |
getNumIterations()
|
int |
getNumRegions()
|
java.awt.image.BufferedImage |
getRegionImage()
Gives an image containing the regions grown thus far. |
int |
getRegionSize(int i)
Gives the number of pixels in the specified region. |
java.awt.image.BufferedImage |
getStatusImage()
If status monitoring is enabled, this method gives a colour image that indicates the current status of the region growing process. |
void |
grow()
Performs a single iteration of the region growing algorithm. |
void |
growToCompletion()
Grows regions to their maximum extent. |
boolean |
isFinished()
Indicates whether region growing is complete. |
boolean |
isNotFinished()
Indicates whether region growing is complete. |
void |
setAssignedColour(java.awt.Color colour)
Sets the colour used to indicate pixels assigned to a region in the image returned by getStatusImage(). |
void |
setBorderColour(java.awt.Color colour)
Sets the colour used to indicate pixels on the border of a region in the image returned by getStatusImage(). |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RegionGrower(java.awt.image.BufferedImage image, java.util.List seeds, int conn, int thresh)
image
- Image to be segmentedseeds
- list of seed pixels (each a Point object)conn
- connectivity (4 or 8)thresh
- threshold on the difference between a pixel's
grey level and the mean grey level of a regionpublic RegionGrower(java.awt.image.BufferedImage image, java.util.List seeds, int conn, int thresh, boolean monitor)
image
- Image to be segmentedseeds
- list of seed pixels (each a Point object)conn
- connectivity (4 or 8)thresh
- threshold on the difference between a pixel's
grey level and the mean grey level of a regionmonitor
- flag indicating whether status should be monitoredMethod Detail |
public int getNumRegions()
public int getRegionSize(int i)
i
- index of region (between 0 and N-1, where N
is number of regions)public java.awt.image.BufferedImage getRegionImage()
public java.awt.image.BufferedImage getStatusImage()
public void setAssignedColour(java.awt.Color colour)
colour
- new colour for assigned pixelspublic void setBorderColour(java.awt.Color colour)
colour
- new colour for border pixelspublic int getNumIterations()
public boolean isFinished()
public boolean isNotFinished()
public void grow()
public void growToCompletion()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |