diff options
| author | Bob Jamison <ishmalius@gmail.com> | 2006-03-30 12:13:29 +0000 |
|---|---|---|
| committer | ishmal <ishmal@users.sourceforge.net> | 2006-03-30 12:13:29 +0000 |
| commit | c3ae9e6f2d776c43898172486b4d13c9ca6e1ead (patch) | |
| tree | 8b5a8b0972e1bfb43aa0499944b5d3235c7fb3e5 /src/trace/siox.h | |
| parent | r11257@tres: ted | 2006-03-29 21:29:33 -0800 (diff) | |
| download | inkscape-c3ae9e6f2d776c43898172486b4d13c9ca6e1ead.tar.gz inkscape-c3ae9e6f2d776c43898172486b4d13c9ca6e1ead.zip | |
WIP. siox election progress. fix api a bit.
(bzr r372)
Diffstat (limited to 'src/trace/siox.h')
| -rw-r--r-- | src/trace/siox.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/trace/siox.h b/src/trace/siox.h index d6efbfba1..5d36a71f6 100644 --- a/src/trace/siox.h +++ b/src/trace/siox.h @@ -205,18 +205,17 @@ public: * * @param image Pixel data of the image to be segmentated. * Every integer represents one ARGB-value. - * @param imageSize number of values in image * @param cm Confidence matrix specifying the probability of an image * belonging to the foreground before and after the segmentation. * @param smoothness Number of smoothing steps in the post processing. + * Both arrays should be width * height in size. * @param sizeFactorToKeep Segmentation retains the largest connected * foreground component plus any component with size at least * <CODE>sizeOfLargestComponent/sizeFactorToKeep</CODE>. * @return <CODE>true</CODE> if the segmentation algorithm succeeded, * <CODE>false</CODE> if segmentation is impossible */ - bool segmentate(unsigned long *image, int imageSize, - float *cm, int cmSize, + bool segmentate(unsigned long *image, float *cm, int smoothness, double sizeFactorToKeep); /** @@ -232,7 +231,7 @@ public: * component plus any component with size at least * <CODE>sizeOfLargestComponent/sizeFactorToKeep</CODE>. */ - void keepOnlyLargeComponents(float *cm, int cmSize, + void keepOnlyLargeComponents(float *cm, float threshold, double sizeFactorToKeep); @@ -316,7 +315,7 @@ public: * @param cm confidence matrix to be searched * @param image image to be searched */ - void fillColorRegions(float *cm, int cmSize, unsigned long *image); + void fillColorRegions(float *cm, unsigned long *image); private: @@ -345,6 +344,11 @@ private: /** Vertical resolution of the image to be segmentated. */ int imgHeight; + /** Number of pixels and/or confidence matrix values to process. + equal to imgWidth * imgHeight + */ + long pixelCount; + /** Stores component label (index) by pixel it belongs to. */ int *labelField; |
