Salome HOME
Revert "Synchronize adm files"
[modules/geom.git] / doc / salome / gui / GEOM / input / shape_recognition.doc
1 /*!
2
3 \page shape_recognition_page Shape recognition from a picture
4
5 \note  
6   <ol>
7   <li>This functionality is not fully operational yet. It is provided for testing purpose and because it might already be helpful in some situations. 
8   (Do not hesitate to make feedbacks on possible bugs ...) </li>
9   
10   <li>The functionality is only available if SALOME has been built with the optional prerequisite OpenCV. </li>
11   </ol>
12
13 This tool allows you to automatically create geometrical shapes from
14 pictures with help of shape recognition algorithms.
15 <b>Contours</b> or <b>Corners</b> can be built.
16
17 \b Example: 
18
19 Detection of the cost line on a nautical chart
20
21 \image html contour_detection_example2.png 
22
23 \n
24
25 To use the <b>Shape recogition</b> tool:
26
27 <ol> 
28   <li>\ref import_picture_page "Import a picture" in the view</li>
29   
30   <li> Select <b>New Entity -> Shape Recognition</b> or click on \image html feature_detect.png </li>
31   
32 </ol>
33   
34
35
36 Then you can choose to create either <b>contours</b> or <b>corners</b> from this picture. 
37
38 \n
39
40 To create <b>Contours</b> :
41
42 <ol>
43   <li> Select in the <b>Picture</b> field a previously imported picture.</li>
44   
45   <li> Click on \image html occ_view_camera_dump.png </li>
46   
47   <li>  Draw a rectangle in the zone whose contour is to be found. The
48   zone will be identified by the colors of this <b>Filtering Sample</b>.
49   
50   \b Example:
51   
52   In the picture shown above, the contours have been drawn basing on
53   the sample, containing white and violet color, thus all white and
54   violet areas in the picture are included in the outlined zone.
55   
56   \image html feature_detection_dlg3.png
57   
58
59   
60   <li> <b> Output type </b> 
61
62   <ul>
63
64   <li> \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).</li>
65
66   <li> \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)</li>
67
68   </ul>
69   
70   In both cases each contour can then be retrieved by an explode operation with the appropriate subshape type.
71   
72   </li>
73   
74   \note It is better to use the \b Spline output type unless you want to find the frontier of a polygon (rectangle ...)
75
76 </ol>
77
78
79 \n
80
81 To create <b>Corners</b> :
82
83 <ol>
84   <li> In the <b>Picture</b> field select a previously imported picture.</li>
85   
86   <li> Apply </li>
87   
88   The \b Result will be a \b Compound of \b Vertices
89   
90   \image html feature_detection_dlg2.png 
91   
92   
93   
94 </ol>
95   
96
97
98 */