Hi Jim
You can use the AffineWarp pipeline stage to extract a region
from the image. It is then zoomed to that in the following stage
in the editor (and in the camera view if you make it the result
image). This also speeds up processing (fewer pixel to chew).
Use the AffineUnwarp stage to transform obtained vision results back to the full scale.
This is my pipeline, as an example for small passives:
<pipeline>
<stages>
<cv-stage
class="org.openpnp.vision.pipeline.stages.ImageCapture" name="0"
enabled="true" settle-first="true" count="1"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.AffineWarp"
name="warp" enabled="true" length-unit="Millimeters"
x-0="-2.5" y-0="2.5" x-1="2.5" y-1="2.5" x-2="-2.5" y-2="-2.5"
scale="1.0" rectify="false"
region-of-interest-property="regionOfInterest"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.ImageWriteDebug"
name="13" enabled="true" prefix="bv_source_" suffix=".png"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.BlurGaussian"
name="10" enabled="true" kernel-size="9"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.MaskCircle" name="4"
enabled="true" diameter="300"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.ConvertColor" name="1"
enabled="false" conversion="Bgr2HsvFull"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.MaskHsv" name="2"
enabled="false" auto="false" fraction-to-mask="0.0" hue-min="0"
hue-max="255" saturation-min="0" saturation-max="255"
value-min="0" value-max="128" invert="false"
binary-mask="false"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.ConvertColor" name="6"
enabled="true" conversion="Bgr2Gray"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.Threshold" name="12"
enabled="true" threshold="145" auto="false" invert="false"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.BlurMedian" name="17"
enabled="true" kernel-size="5"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.MinAreaRect"
name="results1" enabled="true" threshold-min="100"
threshold-max="255"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.ImageRecall" name="3"
enabled="true" image-stage-name="warp"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.DrawRotatedRects"
name="8" enabled="true" rotated-rects-stage-name="results1"
thickness="2" draw-rect-center="false" rect-center-radius="40"
show-orientation="true">
<color r="255" g="255"
b="0" a="255"/>
</cv-stage>
<cv-stage
class="org.openpnp.vision.pipeline.stages.AffineUnwarp"
name="results" enabled="true" warp-stage-name="warp"
results-stage-name="results1"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.ImageWriteDebug"
name="15" enabled="true" prefix="bv_result_" suffix=".png"/>
</stages>
Having said that...
Do you really need 5MP? Usually that's slow/low fps and I can't
imaging where you would need such high resolution.
Does the camera have other options, perhaps with higher fps?
That's usually more important.
_Mark
Dear group. Is it possible to zoom the image in the bottom vision pipeline editor (that is expand only the central region)? I currently see all pixels of the camera and it is difficult to see what exactly is going on when calibrating the nozzle. It would be great to limit the number of pixels displayed and zoom on them. (I am using a 5MP bottom camera.)Best, Jim
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/9e0a11ff-9716-4a93-bab0-b8264d843e74o%40googlegroups.com.
For 0805 it is the same. And I don't have these large parts in my
project.
Note, I'm still not running my machine "productively", I kept
getting sidetracked on the OpenPnP software and feeder/3D printing
side. It's a hobby: I do what is most fun ;-)
_m
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/5705cd83-a3e8-47ef-9029-13d9439b8d09o%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/444e6282-d664-3007-3e6b-578e5333cc16%40makr.zone.
Hi Jim
You need to make sure the AffineUnwarp stage is
effective for the "results" stage, i.e. it must be inserted before
or even become the "results" stage.
Ususally this means you needn to rename the original "results"
stage. This is because AffineWarp changes the pixel coordinate
system. So we need to transform the results back to the full image
pixel coordinate system.
This is one of my bottom vision pipelines for guidance:
<pipeline>
<stages>
<cv-stage
class="org.openpnp.vision.pipeline.stages.ImageCapture" name="0"
enabled="true" settle-first="true" count="1"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.AffineWarp"
name="warp" enabled="true" length-unit="Millimeters" x-0="-2.5"
y-0="2.5" x-1="2.5" y-1="2.5" x-2="-2.5" y-2="-2.5" scale="1.0"
rectify="false"
region-of-interest-property="regionOfInterest"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.ImageWriteDebug"
name="13" enabled="true" prefix="bv_source_" suffix=".png"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.BlurGaussian"
name="10" enabled="true" kernel-size="9"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.MaskCircle" name="4"
enabled="true" diameter="300"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.ConvertColor" name="1"
enabled="false" conversion="Bgr2HsvFull"/>
<cv-stage class="org.openpnp.vision.pipeline.stages.MaskHsv"
name="2" enabled="false" auto="false" fraction-to-mask="0.0"
hue-min="0" hue-max="255" saturation-min="0"
saturation-max="255" value-min="0" value-max="128"
invert="false" binary-mask="false"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.ConvertColor" name="6"
enabled="true" conversion="Bgr2Gray"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.Threshold" name="12"
enabled="true" threshold="145" auto="false" invert="false"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.BlurMedian" name="17"
enabled="true" kernel-size="5"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.MinAreaRect" name="results1"
enabled="true"
threshold-min="100" threshold-max="255"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.ImageRecall" name="3"
enabled="true" image-stage-name="warp"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.DrawRotatedRects"
name="8" enabled="true" rotated-rects-stage-name="results1"
thickness="2" draw-rect-center="false" rect-center-radius="40"
show-orientation="true">
<color r="255" g="255" b="0" a="255"/>
</cv-stage>
<cv-stage
class="org.openpnp.vision.pipeline.stages.AffineUnwarp" name="results" enabled="true"
warp-stage-name="warp" results-stage-name="results1"/>
<cv-stage
class="org.openpnp.vision.pipeline.stages.ImageWriteDebug"
name="15" enabled="true" prefix="bv_result_" suffix=".png"/>
</stages>
</pipeline>
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/CABRkqyC-mcd6w888GjR9Wp8JSbhFXwXp7qJXL2zvs2%3DvuMrt%2BA%40mail.gmail.com.