/*!
\page shape_recognition_page Shape recognition from a picture
\note
- 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 ...)
- The functionality is only available if SALOME has been built with the optional prerequisite OpenCV.
This tool allows you to create geometrical shapes automatically out from pictures elements by performing shape recognition algorithms.
Contours or Corners can be built.
\b Example:
Detection of the cost line on a nautical chart
\image html contour_detection_example2.png
\n
To use the Shape recogition tool:
- \ref import_picture_page "Import a picture" in the view
- Select New Entity -> Shape Recognition or click on \image html feature_detect.png
Then you can choose to create either contours or corners out from this picture.
\n
To create Contours :
- In the Picture field select a previously imported picture.
- Click on \image html occ_view_camera_dump.png
- 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 Snapshot.
\b Example:
In the example shown above the following snapshot was taken in the middle of the chart
\image html feature_detection_dlg3.png
All the violet and white areas are thus considered as part of the zone we want to find the frontier of.
- Output type
- \b Spline : The \b result will be a \b Compound of \b Edges. Each contour will be a single \b edge based on a B-Spline curve (it will be smooth).
- \b Polyline : The \b result will be a \b Compound of \b Wires. Each contour will be a wire made of lines (i.e. a \b Polygon)
In both cases each contour can then be retrieved by an explode operation with the appropriate subshape type.
\note It's better to use the \b Spline output type unless you want to find the frontier of a polygon (rectangle ...)
\n
To create Corners :
- In the Picture field select a previously imported picture.
- Apply
The \b Result will be a \b Compound of \b Vertices
\image html feature_detection_dlg2.png
*/