•Area Selection

[Graphics:../HTMLFiles/index_256.gif]

The selected area by using area selection tool is now returned as an ImageData.

In[97]:=

id2 = GetAreaSelectionBoundsImageData[frame]

The same image is shown again through this ImageData.

In[98]:=

Show[Graphics[id2]]

Function to apply filter operation to the region of interest is defined.

In[99]:=

ApplyFilter[filterFunc_, image_, roi_] := filterFunc[image, roi]

In[100]:=

filterThreshold[image_, roi_] := If[image =!= Null && roi =!= Null, RegionProcessing[Threshold[#, 164, {0, 255}] &, image, roi],  Null]

The Polygon[ ] poly derived from the Java Photo Editor is used as the region of interest in this case.

In[101]:=

poly = GetAreaSelectionAsPolygon[frame]

In[102]:=

rid = ApplyFilter[filterThreshold, id2, poly] ;

The result ImageData is shown.

In[103]:=

Show[Graphics[rid]]


Converted by Mathematica  (July 17, 2003)