Local Threshold in IMMI-plugin
Hello Everybody
I'm using the Image Mining plugin provided by splab. I'm trying to extract information from an image that correlates with data which where measured during this time. My idea to achive this is as folows: first a Histogram streching, then a Gaussian blur, and then a statistical region merging. Now comes the point where I have a problem: I want to make a local Threshold over every Segment of the Image, meaning the algorithm of the threshold should just consider the pixels in a certain segment, apply the threshold and then go to the next segment. At the end I want a picture where every segement of the picture was thresholded with a different threshold method.
Here is a minimum example of how about my process looks like right now:
I know my description of what I want is a bit vague. I still hope someone can help me and if you need further explanations don't hestitate to ask.
Thanks in advance
Kaspar
I'm using the Image Mining plugin provided by splab. I'm trying to extract information from an image that correlates with data which where measured during this time. My idea to achive this is as folows: first a Histogram streching, then a Gaussian blur, and then a statistical region merging. Now comes the point where I have a problem: I want to make a local Threshold over every Segment of the Image, meaning the algorithm of the threshold should just consider the pixels in a certain segment, apply the threshold and then go to the next segment. At the end I want a picture where every segement of the picture was thresholded with a different threshold method.
Here is a minimum example of how about my process looks like right now:
Right now the segment mask processor only iterates over the segments itself and not over the image the segments are on, but I want to edit the image.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.008">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.3.008" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="imageprocessing:open_image" compatibility="1.4.001" expanded="true" height="60" name="Open Gray-scale Image" width="90" x="45" y="120">
<parameter key="filename" value="D:\Users\SWW-Bc13\Desktop\Versuche Rapidminer\Allgemeine Auswahl an Daten\Testbilder Messkampagne 2\Tag\IMG_7970.JPG"/>
<parameter key="set_mask" value="false"/>
</operator>
<operator activated="true" class="imageprocessing:margin_cut_off" compatibility="1.4.001" expanded="true" height="60" name="Margin cut off" width="90" x="179" y="120">
<parameter key="Left" value="550"/>
<parameter key="Right" value="0"/>
<parameter key="Top" value="0"/>
<parameter key="Bottom" value="900"/>
</operator>
<operator activated="true" class="imageprocessing:resize_image" compatibility="1.4.001" expanded="true" height="60" name="Resize Image" width="90" x="313" y="120">
<parameter key="width_percent" value="0.3"/>
<parameter key="height_percent" value="0.3"/>
</operator>
<operator activated="true" breakpoints="after" class="imageprocessing:histogram_equalize" compatibility="1.4.001" expanded="true" height="60" name="HEQ" width="90" x="447" y="120">
<parameter key="algorithm" value="stretch"/>
<parameter key="saturation" value="10.0"/>
</operator>
<operator activated="true" breakpoints="after" class="imageprocessing:gaussian_blur" compatibility="1.4.001" expanded="true" height="60" name="Gaussian Blur" width="90" x="581" y="120"/>
<operator activated="true" class="imageprocessing:grayscale_to_color" compatibility="1.4.001" expanded="true" height="60" name="Grayscale to color" width="90" x="715" y="120"/>
<operator activated="true" breakpoints="after" class="imageprocessing:statistical_region_merging" compatibility="1.4.001" expanded="true" height="60" name="statistical_region_merging" width="90" x="45" y="210"/>
<operator activated="true" class="imageprocessing:segment_mask_processor" compatibility="1.4.001" expanded="true" height="60" name="Segment Mask Processor" width="90" x="45" y="300">
<process expanded="true">
<operator activated="true" class="imageprocessing:thresholding" compatibility="1.4.001" expanded="true" height="60" name="Thresholding" width="90" x="313" y="30">
<parameter key="Method" value="Moments"/>
</operator>
<connect from_port="grayscale image in" to_op="Thresholding" to_port="grayscale image plus"/>
<connect from_op="Thresholding" from_port="grayscale image plus" to_port="grayscale image out"/>
<portSpacing port="source_grayscale image in" spacing="0"/>
<portSpacing port="sink_grayscale image out" spacing="0"/>
</process>
</operator>
<connect from_op="Open Gray-scale Image" from_port="grayscale image plus" to_op="Margin cut off" to_port="image plus"/>
<connect from_op="Margin cut off" from_port="image plus" to_op="Resize Image" to_port="image plus"/>
<connect from_op="Resize Image" from_port="image plus" to_op="HEQ" to_port="image plus"/>
<connect from_op="HEQ" from_port="image plus" to_op="Gaussian Blur" to_port="image plus"/>
<connect from_op="Gaussian Blur" from_port="image plus" to_op="Grayscale to color" to_port="grayscale image plus"/>
<connect from_op="Grayscale to color" from_port="color image" to_op="statistical_region_merging" to_port="color image plus"/>
<connect from_op="statistical_region_merging" from_port="segmented image" to_op="Segment Mask Processor" to_port="segmented image in"/>
<connect from_op="Segment Mask Processor" from_port="segmented image out" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
I know my description of what I want is a bit vague. I still hope someone can help me and if you need further explanations don't hestitate to ask.
Thanks in advance
Kaspar
Tagged:
0