CN1205589C - Image making method and device - Google Patents

Image making method and device Download PDF

Info

Publication number
CN1205589C
CN1205589C CN 00127312 CN00127312A CN1205589C CN 1205589 C CN1205589 C CN 1205589C CN 00127312 CN00127312 CN 00127312 CN 00127312 A CN00127312 A CN 00127312A CN 1205589 C CN1205589 C CN 1205589C
Authority
CN
China
Prior art keywords
marked
mark
value
image
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN 00127312
Other languages
Chinese (zh)
Other versions
CN1352437A (en
Inventor
吴保国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN 00127312 priority Critical patent/CN1205589C/en
Publication of CN1352437A publication Critical patent/CN1352437A/en
Application granted granted Critical
Publication of CN1205589C publication Critical patent/CN1205589C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The present invention relates to a device used for marking an image after binaryzation to be marked, which comprises a simple image detecting and marking device and a memory, wherein the marking device comprises a temporary marking unit, a mark number counter, an equivalent mark pair recording table unit and an equivalent mark pair merging and refreshing marking unit.

Description

Image making method and device
The present invention relates to a kind ofly in the pattern recognition process, each pixel in the image to be marked after the binaryzation be carried out a kind of through improved novel image making method and device of image labelling.
In the prior art, existed and multiple image to be marked after the binaryzation has been carried out the method and apparatus of mark, wherein image making method roughly is divided into following three steps:
(1) initialization label counter;
(2) temporary marker is right to produce temporary marker value and mark of equal value, and with mark of equal value to being stored in mark of equal value in the record sheet;
(3) merger mark of equal value is to produce label sets of equal value and to be stored in the corresponding storage unit with label sets of equal value and other marks of equal value corresponding pixel being refreshed mark and will refresh mark value.
For example chisel etc. in " robot vision technology " book (Beijing National Defense Industry Press, 1994) of writing and disclosed a kind of method and apparatus that each pixel in the image to be marked after the binaryzation is carried out image labelling at Zhong Yu.Below, with reference to Fig. 1,2,3A-3D and Fig. 4, be described in image making method and device in the above-mentioned patent.Wherein, Fig. 1 shows an example of the image to be marked after the binaryzation; Fig. 2 is under four connection situations, an example of the moving window of using in the mark image; Fig. 3 A-3D shows each labeling process in traditional image making method; And Fig. 4 illustrates the conventional tag device.
Fig. 1 illustrates an example of the image to be marked after the binaryzation, wherein represents background pixels with the corresponding pixel of pixel value " 0 ", and represents pixel to be marked with the corresponding pixel of pixel value " 1 ".Below, with the conventional tag method of summary, comprise the following steps: the pixel to be marked in the above-mentioned image to be marked
1) count value of the label counter 202 among initialization Fig. 4 generally is initialized as 2 with it;
2) treat the mark image with following method in the temporary marker unit 201 in Fig. 4 and carry out temporary marker, wherein:
1 ') be present picture element with the bottom right pixel in the square moving window of forming by four pixels, slip over described image to be marked from left to right, from top to bottom;
Fig. 2 illustrate by four pixel p (i-1, j-1), p (i-1, j), p (i, j-1) and p (wherein i represents the row in the image to be marked for i, a j) moving window of Zu Chenging, and j represents the row in the image to be marked.With the bottom right pixel in the moving window as shown in Figure 2, that is, (i j), is present picture element to p, with moving window from left to right, slips over image to be marked (as shown in Figure 1) from top to bottom.
2 ') as present picture element p (i j) is pixel to be marked (that is, the pixel value of this pixel is 1), so:
1 ") if present picture element p is (the i; (i-1; j) with left side adjacent image point p (i; j-1) be background pixels (promptly; the pixel value of these two pixels all is 0); then give this pixel to be marked with the count value of label counter as new temporary marker value, and it is stored in the corresponding storage unit of storer 203, and the count value of label counter increases progressively 1 of top adjacent image point p j);
Suppose above as shown in Figure 1 image to be marked, to add the full background pixels row of delegation and add the full background pixels row of row in the left side of image to be marked and (should note, this interpolation is virtual, use during only for mark), as the p among Fig. 1 (0,0), because its top adjacent image point (virtual pixel) is a background pixels, and its left side adjacent image point p (0,1) also is a background pixels, so with the count value 2 of the label counter 202 among Fig. 4, come this pixel of mark p (0,1) (as shown in Figure 3A), and this mark value 2 is stored in the respective memory unit in the storer 203 of Fig. 4, simultaneously, the count value of label counter 202 increases progressively 1, is 3.Fig. 3 A illustrates the result who the image to be marked of Fig. 1 is carried out temporary marker.
2 ") if present picture element p (i; top adjacent image point p j) (i-1; j) and left side adjacent image point p (i; j-1) one of them is not a background pixels; then pixel to be marked is marked with the mark value of the non-background pixels in top adjacent image point and the left side adjacent image point, and it is stored in the storage unit;
As the pixel p (0 to be marked among Fig. 1,10), because its top adjacent image point (virtual pixel) is a background pixels, and its left side adjacent image point p (0,9) not background pixels, so this pixel p to be marked (0,10) is marked with left side adjacent image point p (0,9) mark value 6 (as shown in Figure 3A), and it is stored in the respective memory unit of storer 203.
3 ") if present picture element p (i; top adjacent image point p j) (i-1, j) and left side adjacent image point p (i is not that background pixels and both mark value are identical j-1); then pixel to be marked is marked with the mark value of top adjacent image point or left side adjacent image point, and it is stored in the storage unit;
As the pixel p (4 to be marked among Fig. 1,1), because its top adjacent image point p (3,1) is not a background pixels, and its left side adjacent image point p (4,0) neither background pixels, and pixel p (3,1) and pixel p (4,0) mark value all was 11 (as shown in Figure 3A), so pixel p to be marked (4,1) is marked with this mark value 11 (as shown in Figure 3A), and it is stored in the respective memory unit of storer 203.
4 ") if present picture element p is (the i; (i-1; j) and left side adjacent image point p (i; j-1) be not background pixels; and both mark value differences; then pixel to be marked is marked with the mark value of top adjacent image point or left side adjacent image point, and it is stored in the storage unit, and the mark of equal value that will be made up of the mark value of top adjacent image point and left side adjacent image point is to being stored in mark of equal value in the record sheet of top adjacent image point p j);
As the pixel p (1 to be marked among Fig. 1,7), because its top adjacent image point p (0,7) and left side adjacent image point p (1,6) be not background pixels, and the mark value of pixel p (0,7) is 5 and pixel p (1 as shown in Figure 3A, 6) mark value is 8, so pixel p to be marked (1,7) is marked with mark value 5 or the p (1 of pixel p (0,7), 6) mark value 8 (as shown in Figure 3A), and it is stored in the respective memory unit of storer 203, and will be by mark value 5 and the left side adjacent image point p (1 of top adjacent image point p (0,7), 6) mark of equal value that mark value 8 is formed is stored in the mark of equal value of Fig. 4 in the record sheet unit 204 to (5,8).
3 ') as present picture element p (i is background pixels (that is, the pixel value of this pixel is 0) j), then with its background value, 0, be stored in the respective memory unit of storer;
As the pixel p (0,0) among Fig. 1 is background pixels, and then the pixel value 0 with it is stored in the respective memory unit of storer 203.
4 ') get back to step 1 ').
According to step 2) all pixels to be marked of the image to be marked of Fig. 1 are carried out the intact back of temporary marker produce as shown in Figure 3A temporary marker image and the label record table of equal value shown in Fig. 3 B.Store mark of equal value to (5,8), (13,15), (14,16) and (14,15) at the mark of equal value of Fig. 3 B in to record sheet, wherein used separator " 0 " they to be separated (also can without separator).
3) as the mark of equal value among Fig. 4 to merger with refresh in the indexing unit 205 and to carry out following function:
A) the described mark of equal value of merger is to produce label sets of equal value, shown in Fig. 3 C.
Merger mark of equal value to the time, for forming two right mark value of mark of equal value, the mark of equal value that will have same mark value is combined, and forms label sets of equal value.Shown in Fig. 3 B, owing to form two mark value 13,15 of mark of equal value to (13,15), with forming in two mark value 14,15 of mark of equal value to (14,15) same mark value 15 is arranged, so with these two marks of equal value to merger get up to form label sets of equal value 13,14,15}.And in these valency label sets and two mark value 14,16 of mark of equal value same mark value 14 is arranged to (14,16), so with their merger form new label sets of equal value 13,14,15,16}, the right merger of visible mark of equal value has transitivity.
B) be stored in the corresponding storage unit with mark of equal value corresponding pixel being refreshed mark and will refresh mark value with label sets of equal value.
Shown in Fig. 3 C, refresh mark value 5 to (5,8) corresponding pixel being given, to { 13,14,15, the corresponding pixel of 16} is given and refreshed mark value 13, so just produce Fig. 3 D with label sets of equal value with mark of equal value.Then, new mark value is stored in the respective memory unit of storer 203.
It more than is the conventional tag method.
From above-mentioned to the description of conventional tag method as seen, if image to be marked is a kind of huge and complicated image, the maximum temporary marker value that produces in the temporary marker process so can be very big, so just needs the very big storage unit of memory space, can occupy a large amount of storage spaces.And this is more and more higher for the Computer Processing requirement, is extremely disadvantageous today that treatment capacity is increasing.For instance, under four situations about being communicated with, a kind of limiting case is that (so-called isolated point image is meant so a kind of image when whole image to be marked all is flooded with the isolated point image, it only is made up of a pixel to be marked, and 4 pixels adjacent with described pixel to be marked all are background pixels) (as shown in Figure 5), issuable maximum mark value is [the width * length/2+0.5 of image to be marked] (wherein [] is rounding operation) in the temporary marker process so.As seen, along with the increase of image width and length, maximum mark value and maximum possible temporary marker value all can be multiplied.In the violated identification that is used for the large format color copy machine with refuse complex system, the width of image to be marked and height value are all very big, even only discern the image of low resolution, with traditional pattern recognition method, the maximum mark value that may occur also can be very big, even can exceed the storage unit word length of normal memory, and store each mark value to such an extent as to need take several storage unit, this is disadvantageous.
The purpose of this invention is to provide a kind of image making method and device that can as far as possible reduce the novelty of issuable maximum mark value in labeling process.
Another purpose of the present invention is a kind of image making method and device that can reduce in labeling process issuable maximum mark value with the memory requirement that satisfies storage unit.
In the present invention, a kind of method of the image to be marked after the binaryzation being carried out image labelling is provided, comprise the following steps: a) to detect the predetermined simple image in described image to be marked, and each pixel to be marked that described predetermined simple image comprised carried out mark, and described mark value is stored in the corresponding storage unit; And b) described image to be marked is carried out conventional tag, and described mark value is stored in the corresponding storage unit.
A kind of method of the image to be marked after the binaryzation being carried out image labelling is provided in the present invention, comprise the following steps: aa) the predetermined simple image of detection in described image to be marked, and each pixel to be marked that described predetermined simple image comprised carried out mark, and described mark value is stored in the corresponding storage unit; Bb) initialization label counter; Cc) it is right to produce temporary marker value and mark of equal value described each pixel to be marked in the described image to be marked to be carried out temporary marker, and described temporary marker value is stored in the corresponding described storage unit; Wherein, at step cc) in, when satisfying the condition that produces new temporary marker value, with comparing with predetermined threshold in the described label counter because of producing described new temporary marker value desire variation count value before, to judge whether described label counter overflows, as for overflowing, then merger mark of equal value is in order to produce label sets of equal value, with described label sets of equal value and other described marks of equal value to and at step cc) in other described temporary marker values of generation be arranged in order, corresponding pixel is refreshed mark, and will refresh mark value and be stored in the corresponding described storage unit, get back to step bb then); As do not overflow, the count value before then described desire being changed is stored in the corresponding described storage unit as described new temporary marker value; And dd) the described mark of equal value of merger is to produce label sets of equal value, with described label sets of equal value, other described marks of equal value to and at step cc) in other described temporary marker values of producing be arranged in order, and corresponding pixel is refreshed mark and the described mark value that refreshes is stored in the corresponding described storage unit.
In the present invention, a kind of method of the image to be marked after the binaryzation being carried out image labelling is provided, comprise the following steps: aa) the predetermined simple image of detection in described image to be marked, and each pixel to be marked that described predetermined simple image comprised carried out mark, and described mark value is stored in the corresponding storage unit; Bb) initialization label counter; Cc) it is right to produce temporary marker value and mark of equal value described each pixel to be marked in the described image to be marked to be carried out temporary marker, and described temporary marker value is stored in the corresponding described storage unit; Wherein, at step cc) in, when the count value in the described label counter is stored in as new temporary marker value with the corresponding storage unit of described pixel to be marked after, the count value because of producing after described new temporary marker value changes in the described label counter is compared with predetermined threshold, to judge whether described label counter overflows, as for overflowing, then merger mark of equal value is to produce label sets of equal value, with described label sets of equal value, other described marks of equal value to and at step cc) in other described temporary marker values of producing be arranged in order, corresponding pixel is refreshed mark, with will refresh mark value and be stored in the corresponding described storage unit, get back to step bb then); And dd) the described mark of equal value of merger is to produce label sets of equal value, with described label sets of equal value, other described marks of equal value to and at step cc) in other described temporary marker values of producing be arranged in order, and corresponding pixel is refreshed mark and the described mark value that refreshes is stored in the corresponding described storage unit.
In the method for the invention, carrying out described step b) or bb) before, will be at step a) or aa) in the also pixel as a setting of described pixel of mark.
In the method for the invention, determine at described step a) and aa according to the simple and easy degree of described image to be marked) in described simple image.
In the method for the invention, described simple image for example comprises isolated point image and multiple spot image.Described isolated point image is meant such pixel to be marked, all is background pixels with described pixel neighboring pixels to be marked wherein.Described multiple spot image is meant the image of only being made up of a plurality of adjacent pixels to be marked, and other wherein adjacent with described a plurality of pixels to be marked respectively pixel all is a background pixels.Be communicated with mark for four, described multiple spot image for example comprises 2 horizontal line section images and 2 vertical line section images, wherein: described 2 horizontal line section images are images of only being made up of two adjacent images to be marked in the left and right sides, and other wherein adjacent with described two pixels to be marked respectively pixels all are background pixels; With described 2 vertical line section images are images of only forming by two neighbouring images to be marked, other wherein adjacent with described two pixels to be marked respectively pixels all are the background pixels.Be communicated with mark for eight, described multiple spot image for example comprises 2 horizontal line section images, 2 vertical line section images, 2 left oblique line sections and 2 right oblique line sections, wherein: described 2 horizontal line section images are images of only being made up of two adjacent images to be marked in the left and right sides, and other wherein adjacent with described two pixels to be marked respectively pixels all are background pixels; Described 2 vertical line section images are images of only being made up of two neighbouring images to be marked, and other wherein adjacent with described two pixels to be marked respectively pixels all are background pixels; Described 2 left oblique line section images are only by two images upper left, that the oblique adjacent image to be marked in bottom right is formed, and other wherein adjacent with described two pixels to be marked respectively pixel all is a background pixels; With described 2 right oblique line section images be only by two images upper right, that the oblique adjacent image to be marked in lower-left is formed, other wherein adjacent with described two pixels to be marked respectively pixel all is a background pixels.
In the method for the invention, described each pixel to be marked that is comprised in the identical described simple image is marked with same mark value.
In the method for the invention, described conventional tag comprises: initialization label counter; Temporary marker is right to produce temporary marker value and mark of equal value; The described mark of equal value of merger is to produce label sets of equal value; Be stored in the corresponding described storage unit corresponding pixel being refreshed mark and will refresh mark value with described label sets of equal value and other described marks of equal value.
In the method for the invention, as with as described in the label counter be initialized as current I mark value, but then described predetermined threshold is made as the maximum mark value.If the count value of described label counter exceeds described predetermined threshold, judge that promptly described label counter overflows.
In the method for the invention, but as with as described in the label counter be initialized as current maximum mark value, then described predetermined threshold is made as I mark value.If the count value of described label counter is lower than described predetermined threshold, judge that promptly described label counter overflows.
In the method for the invention, described temporary marker also comprises: be present picture element with the bottom right pixel in the square moving window of being made up of four pixels A), slip over described image to be marked from left to right, from top to bottom;
B) present picture element is a pixel to be marked as described, so: if B1) the top adjacent image point of described pixel to be marked and left side adjacent image point all are background pixels, then give this pixel to be marked as new temporary marker value with the count value of described label counter, and it is stored in the corresponding described storage unit, and the count value of described label counter increases/subtracts 1; B2) if the top adjacent image point of described pixel to be marked and left side adjacent image point one of them be not background pixels, then described pixel to be marked is marked with the mark value of the non-background pixels in described top adjacent image point and the described left side adjacent image point, and it is stored in the corresponding described storage unit; B3) if the top adjacent image point of described pixel to be marked and left side adjacent image point are not background pixels, and the identical mark value that then described pixel to be marked is marked with described top adjacent image point or described left side adjacent image point of both mark value, and it is stored in the corresponding described storage unit; And B4) if the top adjacent image point of described pixel to be marked and left side adjacent image point are not background pixels, and both mark value differences, then described pixel to be marked is marked with the mark value of described top adjacent image point or described left side adjacent image point, and it is stored in the corresponding described storage unit, and the mark described of equal value that the mark value of described top adjacent image point and described left side adjacent image point is formed is to being stored in mark of equal value in the record sheet; C) present picture element is a background pixels as described, then its background value is stored in the described storage unit; And D) gets back to steps A).
In the method for the invention, the described mark of equal value of merger is right to comprising for two that contain same mark value described marks of equal value, and the element of described two mark centerings of equal value is merged, and forms new label sets described of equal value.
In the present invention, a kind of device that is used for the image to be marked after the binaryzation is carried out image labelling is provided, described device comprises: simple image detects and labelling apparatus, is used for detecting predetermined simple image and each pixel to be marked that described simple image comprised is carried out mark; Labelling apparatus is used for the image to be marked after described simple image detection and labelling apparatus processing is carried out mark; And storer, be used for the storage mark value.
In device of the present invention, described labelling apparatus comprises: the temporary marker unit, and it is right to produce temporary marker value and mark of equal value to be used for that the image to be marked after described simple image detection and labelling apparatus processing is carried out temporary marker; The label counter is used for generating and storing next serviceable indicia value; Mark of equal value is to the record sheet unit, and it is right to be used for being stored in the mark described of equal value that the conventional tag process produces; With mark of equal value to merger with refresh indexing unit, be used for merger be stored in described mark of equal value to the mark described of equal value of record sheet unit to producing label sets of equal value, and to corresponding pixel being refreshed mark with described label sets of equal value and other described marks of equal value.
In another embodiment of the present invention, described labelling apparatus comprises: the temporary marker unit, and it is right to produce temporary marker value and mark of equal value to be used for that the image to be marked after described simple image detection and labelling apparatus processing is carried out temporary marker; The label counter is used for generating and storing next serviceable indicia value; Mark of equal value is to the record sheet unit, be used in the device of the present invention, also comprise: the label counter overflows decision circuitry, be used for the count value of described label counter with overflow predetermined threshold and compare, the count value of label counter exceeds described predetermined threshold as described, then start mark of equal value to merger, arrange and refresh indexing unit.
In device of the present invention, described simple image detects and labelling apparatus comprises Outlier Detection and labelling apparatus and/or multiple spot Image Detection.Described multiple spot device for example comprises that the detection of 2 horizontal line sections and labelling apparatus, the detection of 2 vertical line sections and labelling apparatus, the detection of 2 left oblique line sections and labelling apparatus or 2 right oblique line sections detect and labelling apparatus.
In device of the present invention, described Outlier Detection and labelling apparatus and/or multiple spot Image Detection and labelling apparatus comprise detection template, detection window, decision circuit and indexing unit.
As seen, the method according to this invention and device, owing in advance each pixel to be marked in the predetermined simple image is carried out mark, and the pixel to be marked in the identical simple image is marked with the same tag value, so can reduce issuable maximum mark value in labeling process.And because the count value in the label counter is compared with predetermined threshold, overflow judging whether, as overflow then start mark of equal value to merger, arrange and refresh labeling process, thereby under the harsh situation of the memory requirement of storage unit, can reduce the maximum mark value to satisfy memory requirement as far as possible.
In conjunction with the accompanying drawings, from following detailed description, features, objects and advantages of the invention will be apparent, and wherein same numeral is represented corresponding element:
Fig. 1 shows an example of the image to be marked after the binaryzation.
Fig. 2 is under four connection situations, an example of the moving window of using in the mark image.
Fig. 3 A-3D shows each labeling process in traditional image making method;
Fig. 4 is the block scheme that traditional image labelling device is shown;
Fig. 5 is the extreme case that is illustrated in a kind of image to be marked under the four connection situations;
Fig. 6 A-6C shows four and is communicated with in the mark example of predetermined simple image.
Fig. 7 A-7E shows eight and is communicated with in the mark example of predetermined simple image.
Fig. 8 A-8E shows under four connection situations, according to each labeling process in the image making method of the first embodiment of the present invention;
Fig. 9 A-9F shows under four connection situations, each labeling process in the image making method according to a second embodiment of the present invention;
Figure 10 be illustrate with according to the block scheme of the corresponding image labelling device of the image making method of the first embodiment of the present invention; With
Figure 11 is the block scheme that illustrates with according to a second embodiment of the present invention the corresponding image labelling device of image making method.
Referring now to accompanying drawing, describe preferred embodiment of the present invention in detail.
(first embodiment)
Below, describe the first embodiment of the present invention in detail with reference to Fig. 8 A-8E and Figure 10.Wherein Fig. 8 A-8E shows under four connection situations, according to each labeling process in the image making method of the first embodiment of the present invention.Figure 10 illustrate with according to the block scheme of the corresponding image labelling device of the image making method of the first embodiment of the present invention.
In the present embodiment, at first the simple image of Figure 10 detect and indexing unit 101 in detect predetermined simple image in the image to be marked after binaryzation, and each pixel to be marked of being scheduled to be comprised in the simple image is carried out mark.Predetermined simple image in the present invention is to determine according to the simple and easy degree of image to be marked, and it mainly comprises isolated point image and multiple spot image.
Fig. 6 A-6C shows four and is communicated with in the mark example of predetermined simple image.Wherein, Fig. 6 A shows the isolated point image that is communicated with in the marks four, and it only is made up of a pixel to be marked, and with this pixel neighboring pixels to be marked all be background pixels.Fig. 6 B shows 2 horizontal line section images that are communicated with in the marks four, and it only is made up of two adjacent pixels to be marked in the left and right sides, and with these two pixel neighboring pixels to be marked all be background pixels.Fig. 6 C shows 2 vertical line section images that are communicated with in the mark four, and it only is made up of two neighbouring pixels to be marked.It should be noted, each pixel to be marked that is comprised in the identical simple image is marked with identical value, and should be inequality for the different pixels to be marked that simple image comprised.For example, the pixel to be marked in the isolated point image shown in Fig. 6 A is marked with mark 2, two pixels to be marked in 2 horizontal line section images shown in Fig. 6 B are marked with mark 3 and two pixels to be marked in 2 vertical line section images shown in Fig. 6 C are marked with mark 4.Certainly, be communicated with under the mark situation four, predetermined simple image also can comprise 3 images, 4 images, or the like, this all is to decide according to the simple and easy degree of image to be marked.But, should point out that the mark of 3 different images, 4 different pixels to be marked that it constituted such as image should be different.But, as the direction of image labelling is being required under the not too high situation, each pixel to be marked that 2 line segment images that direction is different comprise is marked with same mark value, and the rest may be inferred, in these cases, can be marked with same mark value to the different multiple spot image of direction.
In the present embodiment, by the simple image among Figure 10 detect and indexing unit 101 in Outlier Detection and indexing unit 102,2 horizontal line sections detect and indexing unit 103 and 2 vertical line section detections and 104 pairs of images to be marked shown in Figure 1 of indexing unit detect, as to detect present picture element be that pixel to be marked and all pixels of being adjacent all are background pixels, then it is labeled as 2; As to detect present picture element be pixel to be marked, have only one to be non-background pixels in four pixels that are adjacent with its left side or right neighboring pixels, and also have only one to be non-background pixels in adjacent four pixels of adjacent non-background pixels with this with its left side or by neighboring pixels, then deserve preceding pixel be labeled as 3; As to detect present picture element be pixel to be marked, have only one to go up with it or time neighboring pixels is non-background pixels in its four adjacent pixels, and also have only in adjacent four pixels of adjacent non-background pixels with this one go up with it or down neighboring pixels be non-background pixels, then should be labeled as 4 by preceding pixel.So, just produce the image behind predetermined simple image mark shown in Fig. 8 A, wherein mark 0 expression background pixels, mark 1 expression pixel to be marked, mark 2 expression isolated point pixels, 2 horizontal line section group of picture of mark 3 expressions become 2 vertical line section group of picture of pixel and mark 4 expressions to become pixel.
Then, all regard the pixel that is labeled as 0,2,3 and 4 as background pixels, the image behind predetermined simple image mark is carried out mark according to the conventional tag method.Its step is as above described in the surface technology background parts:
(1) initialization label counter;
(2) temporary marker is right to produce temporary marker value and mark of equal value, and with mark of equal value to being stored in mark of equal value in the record sheet;
(3) merger mark of equal value is to produce label sets of equal value; Be stored in the corresponding storage unit corresponding pixel being refreshed mark and will refresh mark value with label sets of equal value and other marks of equal value.
Here just no longer specifically launch, unique different be that label counter (202 among Figure 10) is initialized as I mark value (in the present embodiment, being initialized as 5) the pixel mark value 2,3 and 4 of background value 0, pixel value to be marked 1 and above-mentioned simple image in the image to be marked after binaryzation.It should be noted that, Fig. 8 B is the image (the temporary marker unit 201 among Figure 10) after temporary marker, wherein the temporary marker value that produces after the temporary marker is stored in the corresponding storage unit (203 among Figure 10), and with mark of equal value to being stored in mark of equal value in the record sheet unit.Fig. 8 C be mark of equal value to record sheet, wherein every parity price mark certainly also can be without separator to separating with separator " 0 ".Fig. 8 D is a merger mark of equal value to produce the diagrammatic sketch after label sets of equal value and parity price label sets and other pairs of markings of equal value are newly adjusted mark value.(in the figure, separating with separator " 0 " between each mark value, certainly also can be) without separator.Fig. 8 E is the image after refreshing mark.
From this embodiment, as can be seen, because before temporary marker, earlier predetermined simple image is detected and mark, identical simple image is marked with identical value, so the maximum mark value that is produced in whole labeling process is 11, this will reduce much than maximum mark value in the prior art (mark 16 among Fig. 3 A).So just reduced the storage pressure of single storage unit greatly.When dimension of picture is big more, when image to be marked was complicated more, the advantage of carrying out mark with the method among the present invention was also obvious more.
(second embodiment)
Below, with reference to Fig. 9 A-9F and Figure 11, describe the second embodiment of the present invention in detail.Wherein, Fig. 9 A-9F shows under four connection situations, each labeling process in the image making method according to a second embodiment of the present invention.Figure 11 illustrates the block scheme with according to a second embodiment of the present invention the corresponding image labelling device of image making method.
If the memory space of storage unit limits in advance, the memory space MAX that for example limits storage unit in the present embodiment is 10, so when according to the markers step mark of the first embodiment pixel p (i=5 in Fig. 8 B, when j=2) producing new mark value 11, just can't store this new mark value with a storage unit, in light of this situation, the inventor proposes the second embodiment of the present invention, in this embodiment, image making method comprises the following steps:
1) as the first embodiment of the present invention, detect the predetermined simple image in image to be marked, each pixel to be marked that predetermined simple image is comprised carries out mark, and mark value is deposited in the corresponding storage unit, just no longer describe in detail here.
2) count value in the initialization label counter in the present embodiment, is initialized as current I mark value with it.At this moment, current I mark value is the I mark value the mark value 4 of the mark value 3 of the mark value 2 except background value 0, pixel value to be marked 1, isolated point image, 2 horizontal line section images and 2 vertical line section images, 5.What deserves to be mentioned is, but also the count value in the label counter can be initialized as current maximum mark value, in the present invention, be the memory space MAX (10) of storage unit.Can certainly be other count values, this decides according to the personal like.
3) treating described each pixel to be marked in the mark image, to carry out temporary marker right to produce temporary marker value and mark of equal value, and described temporary marker value is stored in the corresponding described storage unit.Temporary marker process in this step is identical with temporary marker process in the conventional tag, repeats no more here.
Wherein, in step 3), when satisfying the condition that produces new temporary marker value, with comparing with predetermined threshold in the described label counter because of producing described new temporary marker value desire variation count value before, to judge whether described label counter overflows, as for overflowing, then merger mark of equal value is to produce label sets of equal value, with described label sets of equal value, other described marks of equal value to and other described temporary marker values of in step 3), producing be arranged in order, corresponding pixel is refreshed mark, with will refresh mark value and be stored in the corresponding described storage unit, get back to step 2 then); As do not overflow, the count value before then described desire being changed is stored in the corresponding described storage unit as described new temporary marker value.
In this embodiment, but predetermined threshold is made as the maximum mark value, that is, and the storage cap value MAX=10 of storer.For example, when mark arrives pixel p (4,5), because p (4,5) top adjacent image point p (3,5)=0 and p (4,5) left adjacent image point p (4, when 4)=0 satisfying the condition that produces new temporary marker value, label counter among Figure 11 overflows decision circuitry 206 compares the count value in the label counter 202 (be 10 this moment) with predetermined threshold (being made as 10 in the present embodiment), count value in the label counter is then judged and is not overflowed not greater than predetermined threshold as a result, gives pixel p (4 with the count value 10 of this label counter 202 as new temporary marker value, 5), and be stored in the corresponding storage unit, the count value of label counter 202 increases progressively 1 at this moment, becomes 11.When mark arrives pixel p (5,2), because p (5,2) top adjacent image point p (4,2)=0 and the left adjacent image point p (5 of p (5,2), when 1)=0 satisfying the condition that produces new temporary marker value, the label counter overflows decision circuitry 206 compares the count value in the label counter 202 11 with predetermined threshold 10, the count value in the label counter then is judged as and overflows greater than this predetermined threshold as a result.At this moment, start mark of equal value among Figure 11 to merger, arrange and refresh indexing unit 207, merger be recorded in mark of equal value shown in Fig. 9 A to the mark of equal value in the record sheet to (5,6) and (8,10), and they and other temporary marker values are arranged in order, corresponding pixel is refreshed mark, shown in Fig. 9 B.Wherein, the parity price mark is to (5,6) corresponding pixel give refresh mark value 5, to temporary marker value 7 corresponding pixels give refresh mark value 6, to mark of equal value to (8,10) corresponding pixel is given and is refreshed mark value 7 and refresh mark value 8 to giving with temporary marker value 9 corresponding pixels, and they are stored in the corresponding storage unit.Fig. 9 C illustrates the result after refreshing mark.Then, get back to step 2), the count value in the initialization label counter is current I mark value 9, and begins to proceed temporary marker from pixel p (5,2).
Here, with interim label sets of equal value, other marks of equal value to and other temporary markers of being produced in the step in front to be arranged in order and to refresh mark successively be for the maximum mark value after compression refreshes as far as possible, thereby stay the value space of trying one's best big for later mark.
4) merger mark of equal value is to produce label sets of equal value, with label sets of equal value, other marks of equal value to and other temporary marker values of in step 3), producing be arranged in order, and corresponding pixel refreshed mark and will refresh mark value be stored in the corresponding storage unit.
Fig. 9 D shows mark his-and-hers watches of equal value, has wherein write down mark of equal value to (8,9) and (7,9).Then it is carried out the merger arrangement and refreshes mark.Shown in Fig. 9 E.Fig. 9 F shows the result who refreshes behind the mark.As seen this result and Fig. 8 E's is identical.
Certainly, when the count value in the label counter is stored in as new temporary marker value with the corresponding storage unit of pixel to be marked after, with in the label counter because of produce described new temporary marker value change the back (as increasing/subtract at 1 o'clock) count value compare with predetermined threshold.Promptly, arrive pixel p (4 at mark, 5) time, with the value 10 of label counter as new temporary marker value be stored in the corresponding storage unit of this pixel to be marked after, this count value increases progressively 1, becomes 11, and the label counter overflowed decision circuitry 206 and judged that at once the count value of label counter is greater than predetermined threshold 10 this moment, be judged as and overflow, just start mark of equal value to merger, arrange and refresh indexing unit 207.Its detailed process as mentioned above.
From second embodiment as seen, be 10 owing to predesignate the maximum storage of storage unit, so the maximum mark value that is produced is 10, so just satisfied memory requirement condition with higher in storage unit in whole labeling process.
The description that above-mentioned preferred embodiment is provided is can carry out and use the present invention for those skilled in the art that.But the description of preferable the foregoing description should not be regarded as limitation of the invention, for those skilled in the art that, is conspicuous to various variations of the present invention, additions and deletions.For example, but the initial value of label counter can be made as current maximum index value, like this, if the count value of label counter is lower than I mark value, promptly being judged as storage unit overflows, otherwise judges and do not overflow.
Secondly, in above-mentioned two preferred embodiments, traditional temporary marker is adopted be in " robot vision technology " book, describe at U.S. Patent number 5,432, the temporary marker method of describing in 619 (that is, described in the technical background).Should be understood that and also can adopt other traditional temporary marker methods, as at U.S. Patent number 5, (denomination of invention is " labeling method and device thereof ", people such as Nittaya to describe described labeling method in 432,619, promulgation on July 11 nineteen ninety-five), it roughly is divided into the following step:
(1) is present picture element with the upper left pixel in the square moving window of forming by four pixels, slips over image to be marked from left to right, from top to bottom;
(2) when present picture element be background pixels, then its background pixels is stored in the storage unit, be that next pixel to be marked is prepared temporary marker then;
(3) when present picture element be pixel to be marked, then pixel to be marked is marked with temporary marker, and it is stored in the storage unit, be that next pixel to be marked is prepared temporary marker simultaneously.
More than be several examples of traditional temporary marker, also have the method for other temporary markers, just repeat no more here.
Though should be noted also that preferred embodiment of the present invention is to describe according to four situations that are communicated with mark, it should be understood that the present invention is equally applicable to eight situations about being communicated with.Under eight situations about being communicated with, predetermined simple image is more complicated than four situations about being communicated with.Fig. 7 A-7E shows under eight situations about being communicated with, several examples of predetermined simple image.Wherein Fig. 7 A shows to show to show at 2 vertical line section images under eight situations about being communicated with and Fig. 7 D, 7E at 2 horizontal line section images, Fig. 7 C under eight situations about being communicated with at isolated point image, Fig. 7 B under eight situations about being communicated with and shows 2 oblique line section images under eight situations about being communicated with.Certainly, also have the example of other simple images, list no longer one by one here.But it should be noted that the pixel to be marked that is comprised in the different simple images should be marked with different mark value.Certainly, in preferred embodiment of the present invention, the oblique line section of 2 horizontal line sections, vertical line section and different directions is marked with different value, and if under the less demanding situation of image labelling, also can be with two dotted line segment marks with same value, this can be determined on a case-by-case basis.
In a word, scope of the present invention should be according to being decided by attached claims institute restricted portion.

Claims (6)

1. one kind is carried out the method for image labelling to the image to be marked after the binaryzation, it is characterized in that, may further comprise the steps:
A) detect predetermined simple image in described image to be marked, and, be marked with mark value respectively each pixel to be marked that described predetermined simple image comprised difference by predetermined simple image;
Wherein said simple image comprises:
A1) image of only being made up of a pixel to be marked all is a background pixels with described pixel neighboring pixels to be marked wherein;
B1) image of only forming by two adjacent pixels to be marked in the left and right sides, other wherein adjacent with described two pixels to be marked respectively pixel all is a background pixels;
C1) image of only forming by two neighbouring pixels to be marked, other wherein adjacent with described two pixels to be marked respectively pixel all is a background pixels;
D1) image of only forming by two oblique adjacent pixels to be marked, other wherein adjacent with described two pixels to be marked respectively pixel all is a background pixels;
E1) by the image of forming more than 2 pixel adjacent to be marked, other wherein adjacent with described pixel to be marked respectively pixel all is a background pixels;
B) treat in the mark image all not in step a) the pixel to be marked of mark carry out mark, all pixels to be marked that belong to same connected region are composed with same mark value, the pixel to be marked that belongs to different connected regions is composed with different mark value.
2. the described method of the image to be marked after the binaryzation being carried out image labelling of claim 1, it is characterized in that, describedly compose with same mark value belonging to all of same connected region pixels to be marked, the method that the pixel to be marked that belongs to different connected regions is composed with different mark value is:
A2) initialization label counter;
B2) treating each pixel to be marked in the mark image, to carry out temporary marker right to produce temporary marker value and mark of equal value, and this temporary marker value is stored in the corresponding storage unit; With
Wherein, at b2) in, when satisfying the condition that produces new temporary marker value, with comparing with predetermined threshold in the described label counter because of producing described new temporary marker value desire variation count value before, to judge whether described label counter overflows, as for overflowing, then merger mark of equal value is to produce label sets of equal value, with described label sets of equal value, other described marks of equal value to and at b2) in other described temporary marker values of producing be arranged in order, corresponding pixel is refreshed mark, with will refresh mark value and be stored in the corresponding described storage unit, get back to a2 then); As do not overflow, the counter before then described desire being changed is stored in the corresponding described storage unit as described new temporary marker value;
C2) the described mark of equal value of merger is to produce label sets of equal value, with described label sets of equal value, other described marks of equal value to and at b2) in other described temporary marker values of producing be arranged in order, and corresponding pixel is refreshed mark and the described mark value that refreshes is stored in the corresponding described storage unit.
3. the described image making method of claim 2 is characterized in that, the method for described temporary marker is:
A) be present picture element with the bottom right pixel in the square moving window of forming by four pixels, slip over described image to be marked from left to right, from top to bottom;
B) present picture element is a pixel to be marked as described, so:
B1) if the top adjacent image point of described pixel to be marked and left side adjacent image point all are background pixels, then the count value of described label counter is given this pixel to be marked, and it is stored in the corresponding described storage unit, and the count value of described label counter increases/subtracts 1;
B2) if the top adjacent image point of described pixel to be marked and left side adjacent image point one of them be not background pixels, then described pixel to be marked is marked with the mark value of the non-background pixels in described top adjacent image point and the described left side adjacent image point, and it is stored in the corresponding described storage unit;
B3) if the top adjacent image point of described pixel to be marked and left side adjacent image point are not background pixels, and both mark value are identical, then described pixel to be marked is marked with the mark value of described top adjacent image point or described left side adjacent image point, and it is stored in the corresponding described storage unit; With
B4) if the top adjacent image point of described pixel to be marked and left side adjacent image point are not background pixels, and both mark value differences, then described pixel to be marked is marked with the mark value of described top adjacent image point or described left side adjacent image point, and it is stored in the corresponding described storage unit, and the mark of equal value that the mark value of described top adjacent image point and described left side adjacent image point is formed is to being stored in mark of equal value in the record sheet;
C) present picture element is a background pixels as described, then its background value is stored in the described storage unit; And D) gets back to steps A).
4. a device that is used for the image to be marked after the binaryzation is carried out image labelling is characterized in that, described device comprises:
Simple image detects and indexing unit, is used for detecting the predetermined simple image at described image to be marked, to each pixel to be marked that described predetermined simple image comprised difference by predetermined simple image, is marked with mark value respectively;
Wherein said simple image comprises:
A4) image of only being made up of a pixel to be marked all is a background pixels with described pixel neighboring pixels to be marked wherein;
B4) image of only forming by two adjacent pixels to be marked in the left and right sides, other wherein adjacent with described two pixels to be marked respectively pixel all is a background pixels;
C4) image of only forming by two neighbouring pixels to be marked, other wherein adjacent with described two pixels to be marked respectively pixel all is a background pixels;
D4) image of only forming by two oblique adjacent pixels to be marked, other wherein adjacent with described two pixels to be marked respectively pixel all is a background pixels;
E4) by the image of forming more than 2 pixel adjacent to be marked, other wherein adjacent with described pixel to be marked respectively pixel all is a background pixels;
The temporary marker unit, it is right to produce temporary marker value and mark of equal value to be used for that the image after described simple image detection and indexing unit processing is carried out temporary marker;
The label counter is used for generating and storing next serviceable indicia value;
Mark of equal value is to the record sheet unit, and it is right to be used for being stored in the mark described of equal value that labeling process produces; With mark of equal value to merger with refresh indexing unit, be used for merger be stored in described mark of equal value to the mark described of equal value of record sheet unit to producing label sets of equal value, and to corresponding pixel being refreshed mark with described label sets of equal value and other described marks of equal value.
Storer is used for the storage mark value.
5. device as claimed in claim 4, it is characterized in that described mark of equal value is to merger and refresh indexing unit and have the label sets described of equal value that produces after the merger, other described marks of equal value function to arranging with other described temporary marker values that produced by described temporary marker unit.
6. device as claimed in claim 5, it is characterized in that, described labelling apparatus also comprises: the label counter overflows decision circuitry, be used for the count value of described label counter with overflow predetermined threshold and compare, the count value of label counter exceeds described predetermined threshold as described, then starts mark of equal value to merger with refresh indexing unit and carry out merger, arrange and refresh mark.
CN 00127312 2000-11-09 2000-11-09 Image making method and device Expired - Fee Related CN1205589C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 00127312 CN1205589C (en) 2000-11-09 2000-11-09 Image making method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 00127312 CN1205589C (en) 2000-11-09 2000-11-09 Image making method and device

Publications (2)

Publication Number Publication Date
CN1352437A CN1352437A (en) 2002-06-05
CN1205589C true CN1205589C (en) 2005-06-08

Family

ID=4592328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 00127312 Expired - Fee Related CN1205589C (en) 2000-11-09 2000-11-09 Image making method and device

Country Status (1)

Country Link
CN (1) CN1205589C (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100361134C (en) * 2004-12-16 2008-01-09 赵建洋 Automatic reading method for analog meter
CN104318543A (en) * 2014-01-27 2015-01-28 郑州大学 Board metering method and device based on image processing method

Also Published As

Publication number Publication date
CN1352437A (en) 2002-06-05

Similar Documents

Publication Publication Date Title
CN101034481A (en) Method for automatically generating portrait painting
CN1163841C (en) On-line hand writing Chinese character distinguishing device
CN1885311A (en) Two-dimensional code, encoding and decoding method thereof
CN107766854B (en) Method for realizing rapid page number identification based on template matching
CN1607542A (en) Image processing apparatus, image processing method, program and storage medium
CN104156706A (en) Chinese character recognition method based on optical character recognition technology
CN1237735A (en) Method and apparatus for character font generation within limitation of character output media and computer readable storage medium storing character font generation program
CN1856028A (en) Camera and method for taking picture compensation
Thakral et al. Devanagari handwritten text segmentation for overlapping and conjunct characters-A proficient technique
CN108664977B (en) Staff image identification and coding method and system based on real-time video stream
CN1172264C (en) Method for automatically identifying characters on texture background by means of combination of background and character model
CN1959704A (en) Method for converting 2D bar code symbols to coded information
CN1205589C (en) Image making method and device
CN101064008A (en) Method for recognizing print form italic character
Alaei et al. A painting based technique for skew estimation of scanned documents
CN109685061A (en) The recognition methods of mathematical formulae suitable for structuring
CN1710946A (en) Method for overlaying character on digital picture
CN104766043A (en) Method of fast identification of ballot image
CN111931778B (en) Method for recognizing print characters based on line and column segmentation
CN1265324C (en) Words and image dividing method on the basis of adjacent edge point distance statistics
Madushanka et al. Sinhala handwritten character recognition by using enhanced thinning and curvature histogram based method
CN108492345B (en) Data block dividing method based on scale transformation
CN101894277A (en) Container number identification method based on multi-category support vector machines
CN1278271C (en) Identifying method for fragmentary printed digits
JP2781150B2 (en) Character division method

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C06 Publication
PB01 Publication
C14 Grant of patent or utility model
GR01 Patent grant
C19 Lapse of patent right due to non-payment of the annual fee
CF01 Termination of patent right due to non-payment of annual fee