|
Description  |
|
|
BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to an apparatus for the recognition of drawn
shapes or view types for automatic drawing input in a CAD system.
2. Description of the Related Art
In recent years, the introduction of CAD systems in various fields for use
in design work has helped shorten the manhours required for product
development. At the present time, however, in the operation of such CAD
systems, the design information is input into the computer manually, and
thus inefficiently, posing a major problem. Therefore, consideration has
been given to automatic drawing input apparatuses which can read drawings
prepared by a designer as an image and automatically extract characters,
symbols, line segments, and other design information from the image data
using pattern recognition techniques, thus enabling the design information
to be automatically input to the CAD system and increasing the efficiency
of the design work.
Design drawings include electrical circuit diagrams, machine drawings,
structural drawings, and the like, and an automatic input is difficult for
machine and structural drawings. With circuit diagrams, as long as it is
possible to recognize the logical connections it is possible to
automatically output a corresponding diagram, but with machine and
structural drawings, the shapes drawn and the logical connections are
important, since dimensions and the like are also entered.
In general, machine drawings are drawn by the projection method. This is a
requirement in many industrial standards, such as the Japan Industrial
Standard (JIS). Drawings are prepared by the first-quadrant,
third-quadrant, or other projection methods used for the preparation of
machine drawings or structural drawings and include more than a single
view. In a conventional apparatus for the automatic recognition of
drawings, however, the apparatus treats even drawings of two views or more
as a single view during the processing, i.e., the projection method is not
considered. More machine drawings and structural drawings are drawn in
three views by the third-quadrant method, and thus almost all design
drawings cannot be handled by the conventional drawing recognition
apparatus. Further, since no consideration is given to preparation by the
projection method during recognition and processing, the obtained design
information represents only a portion of the whole (only what is actually
drawn, and with no attention paid to omitted portions), placing too great
a work load on the CAD system.
Further, when drafting drawings by developing the shape of an object into a
three-view drawing, including a top view, front view, and side view, and
thus changing the types of lines with each view, as in the case of machine
drawings and structural drawings, in general the designer tries to
streamline the drawing by using a simplified notation method even for
drawings incorporating complicated dimensions or angle information. This
means that the shape recognition apparatus must be able to correctly
recognize shapes of drafted drawings using the simplified notation method.
However, the shape recognition apparatuses used as automatic drawing input
apparatuses for present day CAD systems are unable to understand the
simplified notation method, and therefore, designers cannot use the
simplified notation method and must prepare complicated drawings
incorporating all the information needed to enable the shape recognition
apparatuses to easily read such drawings.
For this reason, in conventional CAD systems, it takes a considerable
amount of time for designers to draft drawings, and thus the merit of CAD
systems is halved.
SUMMARY OF THE INVENTION
An object of the present invention is to enable the centerline of a drawing
to be prepared by the simplified notation method so as to determine the
symmetry of the shape, and using the characteristics of the symmetry, set
the undetermined shape and length and position of line segments from the
known shapes, line segments, and characters to recognize the shape and
thus enable full display of the merits of CAD systems.
Another object of the present invention is to make it possible, in
recognition of drawings prepared by development of a shape of an object
into a three-view drawing, such as with machine drawings and structural
drawings, to understand drafting methods based on the first-quadrant,
third-quadrant, or other projection methods and to determine from the
positions of the views the correspondence among the views.
Still another object of the present invention is to provide a recognition
apparatus for drawings prepared by developing the shape of an object into
three views, such as with machine drawings and structural drawings,
wherein the method of drafting, such as the first quadrant, third
quadrant, or other projection method, is understood by a predetermined
system of marking used at the preparation of the drawings for enabling
shape recognition and the dimensions of contours not directly indicated
are set by reference to the correspondence among the views, thus enabling
final determination of the shape.
A further object of the present invention is to provide a recognition
apparatus for drawings prepared by developing the shape of an object into
three views, such as with machine drawings or structural drawings, and
using the simplified notation system, wherein the method of drafting, such
as the first quadrant, third quadrant, or other projection method, is
understood by a predetermined system of marking used at the preparation of
the drawings for enabling shape recognition, the positions of the views
are recognized, and a matching check is run while referring to the
correspondence among the views, thereby pointing out locations where
contradictions have occurred due to errors in drafting and lightening the
work load in the succeeding CAD system, and wherein, further, the position
and types of the omitted line segments are recognized, thereby enabling an
acquisition of full drawing information, including the omitted line
segments.
According to an aspect of the present invention, there is provided an
apparatus for recognition of shapes in drawings for automatic drawing
input in a CAD system, the apparatus including: a character recognition
unit for recognizing types of shapes and character indicating lengths,
angles, and the like of contour lines; a line segment discrimination unit
for discriminating types of line segment in accordance with definitions
assigned to each type of line segment based on data expressed in vector
form; a centerline extraction unit for extracting centerlines drawn in
center positions of shapes from the line segments discriminated by the
line segment discrimination unit; a symmetry determination unit for
determining the symmetry of a shape based on intersections between the
extracted centerlines and straight lines between end points of contour
lines, the distances between the endpoints of contour lines and the
intersections, and angle between the centerlines and the straight lines
between endpoints of contour lines; and a shape recognition unit for
recognizing, using the results of the symmetry determination unit, a
shape, a length of a line segment, and a position of a line segment not
indicated by deriving the shape, the length of a line segment, and the
position of a line segment from a shape, a length of a line segment, and a
position of a line segment indicated, and characters recognized by the
character recognition unit.
According to another aspect of the present invention, there is provided an
apparatus for recognition of views in drawings for an automatic drawing
input in a CAD system, the apparatus including: a drawing reading unit for
reading a drawing to produce drawing data; a vector forming unit for
receiving the drawing data from the drawing reading unit and producing
vector data by deriving line information from point information in the
drawing data; a figure element separation unit for receiving the vector
data from the vector forming unit and carrying out a separation of figure
elements in the vector data; a line type discrimination unit for receiving
the separated figure element data from the figure element separation unit
and carrying out a discrimination of types of lines in the figure element
data; and a view discrimination unit for receiving the line type
discrimination data from the line type discrimination unit and grouping
the contours lines, checking the inclusive relationship, counting the
number of non-inclusive contour lines, and determining the view in
accordance with a predetermined criteria in correspondence with the
numbers as the result of the counting to produce a discrimination
conclusion concerning the views.
According to still another aspect of the present invention, there is
provided an apparatus for recognition of shapes in drawings for an
automatic drawing input in a CAD system, the apparatus including: a
classification unit for classifying data of a drawing into character data
and line segment data; a character discrimination unit for receiving
character data from the classification unit and discriminating the
character data; a line section discrimination unit for receiving the line
segment data from the classification unit and discriminating the types of
line segment, that is, whether a contour line or a supplementary line; a
correspondence determination unit for receiving the character
discrimination data and the line segment discrimination data from the
character discrimination unit and the line segment discrimination unit and
determining the correspondence between the data of the discriminated
character, and the data of the discriminated contour line or supplementary
line; view discrimination unit for receiving the line segment
discrimination data from the line segment discrimination unit and
discriminating the view by grouping the contour lines for each view; a
vertex determination unit for receiving view discrimination data from the
view discrimination unit and determining vertexes of the contour lines; a
first dimension setting unit for receiving data from the correspondence
determination unit and the vertex determination unit and setting
dimensional values to the contour lines corresponding to the portions of
views having the indications of dimensions; a dimension calculation unit
for receiving data from the first dimension setting unit and calculating
dimensional values of contour lines of portions having no indications of
dimensions using the known dimensional values; and a second dimension
setting unit for receiving the data from the dimension calculation unit
and, utilizing the correspondence between views in accordance with the
projection, setting the dimensional values known in another view or the
derived dimensional values calculated on the basis of the known
dimensional values to the contour lines.
According to still another aspect of the present invention, there is
provided an apparatus for recognition of shapes in drawings for an
automatic drawing input in a CAD system, the apparatus including: a
contour line discrimination unit for discriminating contour lines in
drawings; a view discrimination unit for discriminating views in drawings;
a contour line data storage unit for receiving data from the contour line
discrimination unit and the view discrimination unit and storing the
received data; a vertex acquisition unit for receiving data from the
contour line data storage unit and deriving coordinates of end points of
contour lines which have been confirmed on the X and Y axes for each view;
a matching check unit for receiving data from the vertex acquisition unit
and data from storage of knowledge base and checking the matching between
views on the basis of the correspondence between the positions of the
vertexes and the number of vertexes to detect contradictory portions; and
a line segment addition unit for receiving the data from the matching
check unit and, when a contradictory portion is detected, selecting a type
of line segment to be supplemented to a view which includes a vertex which
does not satisfy the correspondence, producing a line segment of the
selected type, and adding the produced line segment.
BRIEF DESCRIPTION OF THE DRAWINGS
In the drawings,
FIGS. 1 and 2 show examples of simplified indications of drawings utilizing
symmetry of configuration in a projection;
FIG. 3 shows a shape recognition apparatus for automatic drawing input
according to an aspect of the present invention;
FIG. 4 illustrates a principle of the determination of symmetry in the
apparatus of FIG. 3;
FIGS. 5, 5A and 5B are a flow chart of the operation of the apparatus of
FIG. 3;
FIG. 6 shows a view recognition apparatus for automatic drawing input
according to another aspect of the present invention;
FIG. 7 illustrates a principle of the recognition of views in the,
apparatus of FIG. 6;
FIGS. 8 to 10 illustrate the processes of the operation of the apparatus of
FIG. 6;
FIGS. 11 and 12 illustrate the groups of contour lines and a table
representing the relationship between views;
FIG. 13 is a table representing a criteria of relationship between views;
FIG. 14 is a flow chart of the operation of the apparatus of FIG. 6;
FIGS. 15, 15A and 15B show a shape recognition apparatus for automatic
drawing input according to still another aspect of the present invention;
FIG. 16 illustrates a process for obtaining vertexes;
FIG. 17 shows a table representing vertex data;
FIGS. 18 to 25 show a sequence of processes in the operation of the
apparatus of FIG. 15;
FIGS. 26 and 27 illustrate principles of obtaining a dimension between
apexes;
FIG. 28 illustrates a principle of the recognition of the relationship
between type views used in the apparatus of FIG. 15;
FIG. 29 shows a configuration recognition apparatus for automatic drawing
input according to a further aspect of the present invention;
FIG. 30 illustrates a principle of confirmation of vertexes;
FIG. 31 illustrates a process of a checking of matching;
FIGS. 32 to 35 show processes of recognition of types of line segments to
be added;
FIGS. 36 and 37 show processes of addition of line segments based on a
region of a centerline;
FIGS. 38 and 39 show processes of addition of line segments not based on
centerlines;
FIG. 40 shows a representation of a drawing by the third-quadrant
projection method;
FIG. 41 shows non-indication of line segments in drawings; and
FIG. 42 to FIG. 50 show examples of structures of the main units of the
apparatuses of FIGS. 3, 6, 15, and 29.
DESCRIPTION OF PREFERRED EMBODIMENTS
((Description of Embodiment of FIG. 3))
A recognition apparatus according to one embodiment of the present
invention is shown in FIG. 3. FIG. 4 and FIG. 5 are used to aid
understanding of the apparatus of FIG. 3.
The apparatus of FIG. 3 has a character recognition means 106 which
recognizes characters indicating the type of the contour, the length of
the contour lines, and the characters indicating the angles; a line
segment discrimination processing means which classifies line segments
based on definition information set for different line types; a centerline
extraction means which extracts the centerline drawn at the center of a
shape from the line segments classified by the line segment discrimination
processing means 105; and means 109 and 110 which determine the extracted
centerline, the intersection of the straight line connecting the end point
positions of the contour line, the actual distance on the drawing between
the end point positions of the said contour line, and the symmetry from
the actual angle on the drawing made by the centerline and straight line.
The apparatus of FIG. 3 extracts the centerline of a drawing prepared by
the simplified notation method to determine the symmetry of the shape and
uses the characteristics of the symmetry to set the undetermined shape and
length and position of line segments from the known shapes, line segments,
and characters, and thus recognize the shape.
FIG. 1 shows an example of a shape with top-bottom and right-left symmetry
about the centerlines l.sub.1 and l.sub.2. Although arcs exist at the four
corners, an arc is indicated at only one of the corners. FIG. 2 shows an
example of a shape with right-left symmetry about the centerline l.sub.3.
Although line segments exist with angles at two locations, the angle is
indicated at only one of the locations.
In the case of the illustration shown in FIG. 1, the apparatus of FIG. 3
understands that the dimensions of the arc of the four corners are the
same as the dimensions indicated at the one location and functions to
determine the dimensions of the arcs at the three positions not indicated.
In the case of the illustration shown in FIG. 2, the apparatus understands
that the line segment where the angle indication is not given is the same
as the line segment where the angle indication is given, and thus
functions to determine the angle not shown. Further, in the case of FIG.
2, the apparatus functions to determine the position of the inside shape.
With these and other functions, the apparatus determines the undetermined
shapes and dimensions and positions of line segments using the simplified
notation method based on symmetry. Below, an explanation will be made
based on the illustrations shown in FIG. 1 and FIG. 2.
A control apparatus 101 in the apparatus of FIG. 3 performs a control
process according to the flow chart shown in FIG. 5. In FIG. 3, the
drawing reading unit 102 reads the drawing which the designer has prepared
as image data, the image storage unit 103 stores the image data, and the
vectorization unit 104 converts the image data into a vector (STEP-0).
Next, the image data is supplied to a line segment discrimination
processing unit 105 where, based on definition information set for each
line type, the visible contour lines, hidden lines, dimension lines,
extension lines, leaders, centerlines, and other line segments are
classified and discriminated (STEP-1) and stored in the line segment and
character discrimination result storage unit 107. At the same time, the
character recognition unit 106 recognizes the dimensions, angles, radius
R5, chamfering C7, and other character information indicating the type of
shape and contour lines on the drawing (STEP-2) and stores the same in the
line segment and character discrimination result storage unit 107.
Data is loaded from the line segment and character discrimination result
storage unit 107 (STEP-3) and supplied to the centerline extraction unit
108. The loaded data includes line segment information discriminated for
each afore-said attribute and dimensional information corresponding to the
dimension lines. In the centerline extraction unit 108, the number of
centerlines is counted as the basic line segments indicating the symmetry
(STEP-4). The contour lines which possibly have symmetry, for example,
visible contour lines and hidden lines, are investigated according to
exactly the number of centerlines (STEP-5), and the symmetry judgment unit
109 judges whether these are symmetric contour lines.
The judgment is based on the following conditions: For example, in FIG. 4,
PG is a contour line which is a candidate for symmetry, ML is a
centerline, .theta. is the angle formed by the centerline ML and the
contour line PG, T is the intersection between the centerline ML and the
contour line PG, L.sub.1 is the length of the line PT, and L.sub.2 is the
length of the line TG. Here, the angle .theta. and the lengths L.sub.1 and
L.sub.2 are the actual angle and lengths on the drawing found by the
drawing reading unit 2. As shown in FIG. 4, all the endpoint positions of
the line segments connecting the contour line segments cutting across the
centerline ML are found, the intersections T of the straight lines PG
connecting the end points and the centerline ML and the angles .theta. are
calculated, and the symmetry investigated under the conditions shown
below:
.vertline.L.sub.1 -L.sub.2 .vertline.<Th
{(.pi./2-.alpha.}<.theta.<{(.pi./2)+.alpha.}
where, Th and .alpha. are respectively threshold values. If the above
conditions are satisfied, the contour lines in the object studied are
symmetrical.
When the judgment is that symmetry exists, in the next contour setting unit
110, a search is run for contour lines having symmetry which have
undetermined lengths and positions of line segments and shapes. The
dimensions, etc., are set by judging the characters recognized by the
character recognition unit 106 and the known line segments and shapes for
the shape recognition (STEP-7). Next, the number of centerlines is
subtracted by one (STEP-8), then it is judged if the number of centerlines
has become zero (STEP-9). The above processing is repeated a number of
times corresponding to the number of centerlines for the symmetrical shape
recognition.
In the apparatus of FIG. 3, the shape recognition apparatus used as the
automatic drawing input system can use drawings drafted by the simplified
notation method using symmetry. This enables a shortening of the time
required for drafting drawings by designers and enables the merits of the
automatic drawing input system to be exhibited to the fullest in initial
information input processing in CAD systems.
((Description of Embodiment of FIG. 6))
FIG. 6 shows a recognition apparatus according to another embodiment of the
present invention. FIGS. 7 to 14 are used to assist with the understanding
of the apparatus of FIG. 6.
The apparatus of FIG. 6 is intended to aid the recognition of drawings
drafted by developing objects into three-view drawings, such a machine
drawings or structural drawings, by enabling an understanding of whether
the drawings were prepared by the first-quadrant, third-quadrant, or other
projection methods, or determination of the correspondence among the view
from the positions of the views, and thereby enable a determination of
which views are which.
Assume that the drafting method based on the projection shown in FIG. 7 is
registered as preliminary knowledge in the automatic drawing input
apparatus. FIG. 7 shows the position of views in the third-quadrant
method. The front view is a top view from above, a bottom view from below,
a left side view from the left, and a right side view from the right. The
rear view is placed to the right of the right side view. If all the views
are drawn on a single sheet of paper by this rule, then it is possible to
determine what view is shown without a written explanation of each view
such as "front view" and "top view". This principle is used in the
apparatus of FIG. 6,.
In the apparatus of FIG. 6, the drawings are read by scanners, television
cameras, and other equipment and converted to binary value images to
obtain 1,0 pattern data. This is stored in the memory and subjected to
recognition processing to extract the characters, symbols, line segments,
etc. The contour line data obtained by this type of recognition processing
is grouped into lines having connecting relationships. The inclusion
relationship of the groups is searched, considering block-like frames
surrounding the grouped contour lines. Blocks which are not included in
others, that is, contour line groups, are processed. The above-mentioned
preregistered knowledge is used to determine, from the arrangement of the
block regions, what blocks correspond to particular views.
In the apparatus of FIG. 6, a drawing 610 is read by a scanner, television
camera, or other reading apparatus 612, the obtained binary value image
data is converted into vectors (614), and the characters, symbols, line
segments, and other drawing elements are extracted from the vectors (616).
The recognition unit 620 recognizes particular characters and symbols from
among these characters and symbols. While the line segments are recognized
as visible contour lines, dimension lines, etc., it is not recognized if
they are a top view of visible contour lines. Therefore, even if input,
the data often cannot be used.
A view position recognition unit 624, which divides the illustrations on
the drawing into views and recognizes particular views, is located after a
line type discrimination unit 618. Reference numeral 626 is a combined
recognition unit, which combines the recognition findings of the view
positions, characters, and symbols and stores the combined recognition
findings in a memory 628.
The view position recognition unit 624 processes contour lines, for
example, visible contour lines and hidden lines, among the line types
discriminated by the line type discrimination unit 618. In the case of a
bent plate having a sectional view as in the right side view of FIG. 9,
the front view and top view become as shown in FIG. 9. The broken lines
are hidden lines and the solid lines are visible contour lines, and are
subjected to recognition processing by the view type recognition unit 624.
The recognition unit 624 performs the grouping by determining the
connecting relationship between the discriminated contour lines, and thus
the lines are grouped into contour lines of net units having connecting
relationships. In some cases, another group will be included in a group,
so the inclusive relationship of the contour line groups is searched and
the contour line groups which are not included in other groups are found.
For example, in the above grouping, GROUP 1 to GROUP 6 of FIG. 8 are
obtained. In the search for inclusive relationships, GROUP 4 to GROUP 6
are found to be groups included in GROUP 2, so GROUP 1 to GROUP 3 are
determined as groups not included in other groups.
After the non-inclusive contour line groups are found, the number thereof
is determined, i.e., one, two, three, or more.
The block frames surrounding the contour line groups are determined, the
vertex coordinates of the block frame are found, and the ratios of
coincidence of the block frames with other block frames in the horizontal
and vertical directions is determined. A, B, and C of FIG. 10 are examples
of the above-mentioned block frames. XW1 and YW1 and XW2 and YW2 are
vertex coordinates of the block frames. If the X coordinates of the vertex
coordinates of the block frames are arranged in rising order, the degree
of coincidence in the X direction of the block frames can be obtained. If
the Y coordinates are arranged in rising order, the degree of coincidence
in the Y direction can be obtained. For example, if the X coordinates of
the vertex coordinates of the block frames A and B in FIG. 10 are arranged
in rising order, X.sub.1 (XW3) X.sub.2 (XW1) X.sub.3 (XW4) X.sub.4 (XW2)
is obtained. The degree of coincidence U.sub.n may be found by the
following equation:
U.sub.n =(X.sub.3 -X.sub.2)/(X.sub.4 -X.sub.1)
As is clear from this equation, U.sub.n =1, when X.sub.1 =X.sub.2 and
X.sub.3 =X.sub.4 because of coincidence. When completely noncoincident,
U.sub.n <0. The normal drawings are drawn to match in the X, Y, and Z
directions, for example, the front view and the top view match in the X
direction with no deviation in usual cases. However, errors sometimes
occur. If this is considered, then in the case where the deviation is
slight, the coincidence may be considered. Therefore, the degree of
coincidence U.sub.n is determined by the following conditions, to
determine whether the drawings are normal:
If U.sub.n >Th, there is coincidence and, therefore, the drawings may be
considered normal,
If U.sub.n .ltoreq.Th, there is no coincidence and, therefore, the drawings
are not normal.
In these conditions, Th is the threshold value. When determining drawings
are not normal, the smaller block frame is eliminated. Drawings include,
in addition to normal drawings, perspective views, sectional views, and
other supplementary views. These have a low degree of coincidence and,
therefore, may be eliminated by U.sub.n .ltoreq.Th.
The positional relationship of the so-judged views, that is, the contour
line groups, is registered in a table. FIG. 12 shows an example of this
registration. FIG. 11 shows the contour line groups which form the basis
for the table. As shown in FIG. 11, G2 is below the contour line group G1
and G4 to the right thereof. The degree of coincidence of the right G4 is
low, that is, U.sub.n <Th, and thus is marked with an asterisk in the
table of FIG. 12. Further, G1 is above the contour line group G2 and G3 to
the right thereof. These lines are coincident, and thus are stored as
shown in the table in FIG. 12. The same hold true for the other groups.
For contour line groups which are not included in other groups but are
determined to have top, bottom, left, and right degrees of coincidence
suitable for normal views, serial numbers are given as shown in FIG. 12
and registered.
When the table is completed, it is determined which views are which with
reference to the preregistered rules of projection. FIG. 14 is a flow
chart of the above processing and view determination regions.
As shown by the flow chart of FIG. 14, first, when there is only one
contour line group not included in any other groups, this is determined as
the front view. That is, when there is only one view, that view is
arbitrarily deemed the front view.
Second, when there are two contour line groups not included in other
groups, the larger group is considered the front view and the view of the
smaller group is determined from the positional relationship thereto. For
example, if above, it is determined to be a top view, and if to the left
or right, it is determined to be a left side view or right side view. When
the two groups are almost the same in size, the left group is considered
the front view. The calculation of the above degree of coincidence U.sub.n
is performed when there are three or more groups, the above-mentioned
table is prepared, and particular groups belonging to particular views are
determined from the table and the projection rules as shown in FIG. 13.
FIG. 13 shows the projection rules. The circle marks denote that other
views may exist, the X mark denotes that other views may not exist, and
the asterisk mark denotes "don't care".
For example, in the case of the table of FIG. 12, G2 is determined to be
the front view, G1 the top view, G3 the right side view, and G4 a
supplementary view. Note that G2 has other contour line groups to the top
and right, and G3 has other contour line groups to the left and top. As
clear from FIG. 7, these all meet the requirements for front views, but in
this case, the bottom left one is selected. When the views are determined
in this way, the results are sent on to the combined recognition unit.
At the combined recognition unit 626, the character recognition results,
the symbol recognition results, and the view recognition results are
combined for an overall recognition. When view recognition results are
obtained, dimensions which are not given also can be calculated. For
example, when the horizontal length l.sub.1 and the vertical length
l.sub.2 of the top view in FIG. 9 are given, they are known by the
character recognition. The horizontal length x.sub.1 of the front view,
however, is often omitted as it is the same as the horizontal length
l.sub.1 of the top view. In the combined recognition unit 626, l.sub.1 is
adopted for x.sub.1, the horizontal length x.sub.1 of the front view is
considered l.sub.1, and this is stored in the recognition result storage
apparatus 628. Such processing is not possible if particular views are not
known. The fram | | |