2012-04-16 21:06:34 +06:00
/*!
\page shape_recognition_page Shape recognition from a picture
2012-04-17 19:32:51 +06:00
\note
<ol>
<li>This functionality is not fully operational yet. It is provided for testing purpose and because it might already be helpful in some situations.
(Do not hesitate to make feedbacks on possible bugs ...) </li>
<li>The functionality is only available if SALOME has been built with the optional prerequisite OpenCV. </li>
</ol>
2012-04-16 21:06:34 +06:00
This tool allows you to create geometrical shapes automatically out from pictures elements by performing shape recognition algorithms.
<b>Contours</b> or <b>Corners</b> can be built.
2012-04-16 21:38:48 +06:00
\b Example:
2012-04-17 15:32:16 +06:00
Detection of the cost line on a nautical chart
2012-04-16 21:38:48 +06:00
\image html contour_detection_example2.png
2012-04-17 15:32:16 +06:00
To use the <b>Shape recogition</b> tool:
<ol>
<li>\ref import_picture_page "Import a picture" in the view</li>
<li> Select <b>New Entity -> Shape Recognition</b> or click on \image html feature_detect.png </li>
</ol>
Then you can choose to create either <b>contours</b> or <b>corners</b> out from this picture.
\n
2012-04-16 21:06:34 +06:00
To create <b>Contours</b> :
<ol>
<li> In the <b>Picture</b> field select a previously imported picture.</li>
<li> Click on \image html occ_view_camera_dump.png </li>
<li> Find a zone in the picture which color is representative of the zone you want to find the frontier of. Draw a rectangle on it to take a <b>Snapshot</b>.</li>
<li> Apply </li>
2012-04-17 15:32:16 +06:00
The \b Result will be a \b Compound of \b Edges or \b Wires from which you can explode the desired edges or wires.
\image html feature_detection_dlg.png
<b> Output type </b> :
<ul>
<li> \b Spline : each contour will be a single \b edge based on a B-Spline curve</li>
<li> \b Polyline : each contour will be a wire made of lines (i.e. a \b Polygon)</li>
</ul>
\note It's better to use the \b Spline output type unless you want to find the frontier of a polygon (rectangle ...)
2012-04-16 21:06:34 +06:00
</ol>
2012-04-17 15:32:16 +06:00
\n
To create <b>Corners</b> :
<ol>
<li> In the <b>Picture</b> field select a previously imported picture.</li>
<li> Apply </li>
The \b Result will be a \b Compound of \b Vertices
\image html feature_detection_dlg2.png
</ol>
2012-04-16 21:06:34 +06:00
*/