WO2009104325A1 - 線画処理装置、プログラム及び線画処理方法 - Google Patents

線画処理装置、プログラム及び線画処理方法 Download PDF

Info

Publication number
WO2009104325A1
WO2009104325A1 PCT/JP2008/072272 JP2008072272W WO2009104325A1 WO 2009104325 A1 WO2009104325 A1 WO 2009104325A1 JP 2008072272 W JP2008072272 W JP 2008072272W WO 2009104325 A1 WO2009104325 A1 WO 2009104325A1
Authority
WO
WIPO (PCT)
Prior art keywords
closed
line drawing
region
gradation
adjacent
Prior art date
Application number
PCT/JP2008/072272
Other languages
English (en)
French (fr)
Inventor
至 古川
剛 久保田
Original Assignee
大日本スクリーン製造株式会社
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 大日本スクリーン製造株式会社 filed Critical 大日本スクリーン製造株式会社
Priority to US12/520,963 priority Critical patent/US20110187721A1/en
Publication of WO2009104325A1 publication Critical patent/WO2009104325A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour

Definitions

  • the present invention relates to a line drawing processing technique for combining a plurality of areas defined by drawing lines.
  • Manga is a representative example of uncolored line drawings.
  • Manga (Manga), unlike English comics (Comics), is a (monochrome) line drawing with a unique Japanese texture.
  • gradation color
  • emotion the expression of gradation (color) and the emotion of the character are black and white patterns such as various tones (screen tones (Celsys registered trademark)), effect lines, solids (painting with a single color), And it is expressed by lines etc., and it is very different from comics with many color expressions.
  • Patent Document 1 discloses a technique for automating coloring work for an area in a digital line drawing.
  • Patent Document 1 is a technique for coloring a cell image drawn using a trace line assuming animation coloring.
  • a line drawing such as a manga
  • manga does not have trace lines predicated on coloring as in anime production, and the background and subject are combined into a single line drawing. For this reason, manga has many tones and fine written depictions, and there are many fine areas (small areas), so that there is a problem that manual clipping and coloring are troublesome.
  • the present invention has been made in view of the above problems, and an object of the present invention is to provide a technique for rationally and efficiently coupling a large number of microscopic areas to other areas.
  • a line drawing processing apparatus that combines closed regions separated by drawing lines, and a line drawing data acquisition unit that acquires digitized line drawing data;
  • a multi-gradation unit that obtains multi-gradation data having halftone pixels by spatially smoothing the line drawing data, and extracting the drawing line from the line drawing data, thereby drawing the drawing line
  • a region separating unit that separates a region surrounded by a plurality of closed regions, and two or more closed regions that are close to each other by a predetermined distance reference among the plurality of closed regions, and the multi-gradation corresponding to each of the closed regions
  • a region combination unit that combines the data portions according to the degree of coincidence of the gradation values.
  • the line drawing processing apparatus by combining two or more closed regions that are close to each other according to a predetermined distance reference according to the degree of coincidence with the gradation value of the multi-gradation data, Closed regions can be reasonably and automatically combined for regions with similar attributes. Therefore, it is possible to save the work of segmenting an area, for example, when coloring a line drawing.
  • the line drawing processing apparatus is the line drawing processing apparatus according to the first aspect, and the multi-gradation unit includes a reduction unit that reduces the image data.
  • a line drawing processing apparatus is the line drawing processing apparatus according to the first or second aspect, wherein the multi-gradation unit converts a value of each pixel with a multi-gradation by a filter of a predetermined size. Includes an averaging section to average.
  • the line drawing processing apparatus is the line drawing processing apparatus according to the first aspect, wherein the multi-gradation unit acquires each gradation value of a pixel in the vicinity of the target pixel, and A median filter processing unit that obtains a median value from the values and uses the median value as a gradation value of the pixel of interest;
  • the noise included in the image data can be eliminated by subjecting the image data to be processed to median filter processing, and the attributes of the original line drawing are reflected.
  • Gradation data can be acquired.
  • the line drawing processing apparatus is the line drawing processing apparatus according to the first aspect, wherein the region separating unit extracts a core line of the drawing line from the line drawing data, and extracts a region surrounded by the core line. Separate as multiple closed regions.
  • the line drawing processing apparatus is the line drawing processing apparatus according to the fifth aspect, wherein the region combining unit includes a first closed region smaller than a predetermined reference size among the plurality of closed regions.
  • a position information acquisition unit that selects and acquires position information of the first position included in the first closed region; a first gradation value corresponding to the first position; and the predetermined distance from the first position.
  • a gradation value acquisition unit that acquires a plurality of gradation values corresponding to two or more adjacent positions adjacent to each other from the reference, and the first floor of the plurality of gradation values.
  • a position selection unit that selects a second position having the gradation value by detecting a gradation value having a high degree of coincidence with the tone value, the first closed region including the first position, and the two positions By removing a boundary line interposed between the first closed region and the second closed region. Thereby coupling the frequency and the second closed region as a closed region.
  • the line drawing processing apparatus it is possible to automatically combine a relatively small closed region with another closed region having a gradation value close to the gradation value corresponding to the small closed region. it can. Therefore, the number of relatively small closed regions can be reduced.
  • the line drawing processing apparatus is the line drawing processing apparatus according to the fifth aspect, wherein the region combining unit includes a third closed region smaller than a predetermined reference size among the plurality of closed regions.
  • An adjacent closed region detection unit that selects and detects one or more adjacent closed regions adjacent to the third closed region, and a gradation value corresponding to a pixel included in the third closed region from the multi-gradation data The third average gradation value acquired and averaged, and one or more adjacent values obtained by averaging the gradation values corresponding to the pixels included in the one or more adjacent closed regions from the multi-gradation data.
  • the average gradation value calculation unit that calculates the average gradation value and the one or more adjacent average gradation values.
  • the approximate adjacent average gradation value is detected, and the one or more adjacent closed regions are Including a closed region selection unit for selecting one or more approximate adjacent closed regions corresponding respectively to approximate adjacent average gradation value equal to or greater than.
  • a line drawing processing apparatus is the line drawing processing apparatus according to the seventh aspect, wherein the region combining unit is configured to perform the above-described adjacent adjacent closed regions among the one or more approximate adjacent closed regions.
  • a comparison inspection unit for comparing approximate adjacent average gradation values, and combining the third closed region and the one or more approximate adjacent closed regions according to a result of the comparison inspection by the comparison inspection unit.
  • a program according to a ninth aspect for solving the above-described problem is a program that can be executed by a computer, and the line drawing data acquisition unit that acquires the line drawing data digitized by the computer when executed by the computer. And, by spatially smoothing the line drawing data, a multi-gradation unit that obtains multi-gradation data having halftone pixels, and extracting the drawing line from the line drawing data, An area separation unit that separates an area surrounded by a drawing line into a plurality of closed areas, and two or more closed areas that are close to each other on a predetermined distance basis among the plurality of closed areas, It is made to function as a line drawing processing apparatus provided with the area
  • a plurality of closed regions are combined by combining two or more closed regions that are close to each other according to a predetermined distance reference according to the degree of coincidence with the gradation value of the multi-gradation data.
  • a line drawing processing method for combining closed regions separated by drawing lines, and (a) a step of acquiring digitized line drawing data And (b) obtaining multi-gradation data having halftone pixels by spatially smoothing the line drawing data, and (c) extracting drawing lines from the line drawing data, Separating the region surrounded by the drawing line as a plurality of closed regions, and (d) two or more closed regions that are close to each other by a predetermined distance reference among the plurality of closed regions. And a step of combining in accordance with the degree of coincidence of the gradation values of the multi-gradation data portion.
  • the line drawing processing method by combining two or more closed regions that are close to each other according to a predetermined distance reference according to the degree of coincidence with the gradation value of the multi-gradation data, Closed regions can be reasonably and automatically combined for regions with similar attributes. Therefore, it is possible to save the work of segmenting an area, for example, when coloring a line drawing.
  • FIG. 1 is an external view of a line drawing processing apparatus according to a first embodiment of the present invention. It is a figure which shows each structure of a line drawing processing apparatus. It is a figure which shows the connection state of the functional block of a line drawing processing apparatus, and a memory
  • FIG. 5 is a diagram illustrating an example of multi-gradation data obtained by multi-grading the line drawing data illustrated in FIG. 4.
  • FIG. 5 is a diagram illustrating an example of thinned data obtained by thinning the line drawing data illustrated in FIG. 4.
  • FIG. 1 is an external view of a line drawing processing apparatus 1 according to the first embodiment of the present invention.
  • FIG. 2 is a diagram illustrating each configuration of the line drawing processing apparatus 1.
  • the line drawing processing apparatus 1 mainly includes a CPU 10, a storage unit 11, an operation unit 12, a display unit 13, a disk reading unit 14, a communication unit 15, and a scanner 16, and functions as a general computer. I have.
  • the CPU 10 operates according to the program 2 stored in the storage unit 11 to execute various data calculations and control signal generation, and controls each configuration of the line drawing processing apparatus 1.
  • the functional blocks realized by the CPU 10 will be described later.
  • the storage unit 11 includes a RAM and a hard disk, which serve as a temporary working area for the CPU 10, and a read-only ROM (not shown).
  • the storage unit 11 has a function as a recording medium for storing the program 2 and various data.
  • the program 2 may be transferred from the recording medium 9 to be described later to the storage unit 11 via the disk reading unit 14. Alternatively, the program 2 may be transferred to the storage unit 11 via the communication unit 15.
  • the operation unit 12 is used to input operator instructions to the line drawing processing apparatus 1. That is, the operation unit 12 functions as an input device in the line drawing processing apparatus 1. Specifically, the operation unit 12 corresponds to, for example, a keyboard, a mouse, a graphic tablet (pen tablet: registered trademark of Pentel Co., Ltd.), various buttons, and the like.
  • the display unit 13 displays various data as images on the screen. That is, the display unit 13 functions as a display device in the line drawing processing apparatus 1. Specifically, the display unit 13 corresponds to, for example, a CRT monitor or a liquid crystal display, but may have a part of the function of the operation unit 12 like a touch panel display.
  • the disk reading unit 14 is a device that reads data stored in the portable recording medium 9 and transfers the data to the storage unit 11. That is, the disk reading unit 14 functions as a data input device in the line drawing processing apparatus 1.
  • the line drawing processing apparatus 1 includes a CD-ROM drive as the disk reading unit 14.
  • the disk reading unit 14 is not limited to this, and may be, for example, an FD drive, a DVD drive, or an MO device. If the disk reading unit 14 has a function of recording data on the recording medium 9, the disk reading unit 14 can substitute a part of the function of the storage unit 11.
  • the communication unit 15 has a function for performing communication via the network between the line drawing processing device 1 and another device group (not shown).
  • the scanner 16 is a reading device for reading a non-colored line drawing, has a large number of image sensors, and has a function for acquiring the line drawing as digital data.
  • FIG. 3 is a diagram illustrating a connection state between the functional blocks of the line drawing processing apparatus 1 and the storage unit 11.
  • the multi-gradation unit 20, the region separation unit 21, and the region combination unit 22 illustrated in FIG. 3 are functional blocks that are realized mainly when the CPU 10 operates according to the program 2.
  • FIG. 4 is a diagram showing an example of line drawing data D1 read by the scanner 16. As shown in FIG. A line drawing (part of a manga) printed on such a printing substrate (paper or the like) is read by the scanner 16, and the acquired line drawing data D ⁇ b> 1 is stored in the storage unit 11.
  • the line drawing to be processed by the line drawing processing apparatus 1 may be an analog image (original) written on paper or the like, or may be an image digitized in the past for publication, in either case. It is a monochrome binary image (monochrome image).
  • multi-gradation in the previous stage of multi-gradation processing is just that each pixel is expressed by multiple bits, and actually only two levels of white and black are used. is there.
  • a general gray line drawing is provided with various tones (patterns) as monochrome patterns or patterns, and a background (for example, “sky” on the right side in FIG. 4).
  • the shade of the object (for example, “Leaf” or “Tree Branch” on the left side in FIG. 4) is expressed by attaching a tone.
  • the line drawing includes an image including a tone and a solid as well as a drawing line.
  • the multi-gradation unit 20 has a function of acquiring multi-gradation data D2 having halftone pixels by spatially smoothing monochrome line drawing data D1 as shown in FIG.
  • the multi-gradation unit 20 performs multi-gradation processing including reduction processing, averaging processing, and median filter processing described below.
  • FIG. 5 is a diagram illustrating a connection state between each functional block included in the multi-gradation unit 20 and the storage unit 11.
  • the multi-gradation unit 20 includes a reduction processing unit 201, an averaging processing unit 202, and a median filter processing unit 203. Each of these functional blocks performs each process described below.
  • the reduction processing unit 201 obtains reduced data D201 by reducing the line drawing data D1 (image data).
  • the reduction process is a process of reducing a pixel block region (N ⁇ N pixels) having a predetermined size to one pixel, and when reducing, all the pixels included in the pixel block region are respectively The average value of all pixel values in which the pixel density is expressed by a plurality of bits is calculated, and the pixel value of one pixel corresponding to the reduced area is set as the average value.
  • the reduction ratio N can be freely set by the operator.
  • N 1 / ⁇ 2.0 ⁇ (image resolution) / (number of tone lines) ⁇ It may be calculated by The number of tone lines is per unit interval (for example, centimeter or inch) according to the tone (screen tone (Celsys Inc.)) that is most often used in the achromatic line drawing to be processed. Is set as the number of lines.
  • the method of calculating the reduction ratio N is not limited to this.
  • the reduction process includes a process (enlargement process) for returning to the same pixel size as that of the original line drawing data D1, and this process is performed after, for example, an averaging process described later or a median process. It may be executed after the filtering process.
  • the averaging processing unit 202 has a function of averaging each pixel value of the reduced data D201 acquired by the reduction processing unit 201 with multiple gradations using a filter of a predetermined size.
  • the averaging process refers to a process for obtaining an average value of pixels included in the predetermined size by using a filter of a predetermined size (average filter). By performing this averaging process over the entire surface of the image data, the tones included in the original line drawing are further averaged and multi-graded.
  • the line drawing processing apparatus 1 can convert the monochrome tone included in the line drawing data D1 to an intermediate gradation value.
  • the averaged data D202 (image data) obtained by performing the reduction process and the averaging process may include image roughness (so-called “noise”). Such noise can be removed by median filter processing by the median filter processing unit 203.
  • the median filter processing is to obtain a plurality of gradation values of pixels in a region in the vicinity of the target pixel, arrange the plurality of gradation values in ascending order, and set a central value (median value) from among them. This is a process of acquiring and setting the median as the gradation value of the target pixel.
  • FIG. 6 is a diagram showing an example of multi-gradation data D2 obtained by multi-grading the line drawing data D1 shown in FIG. As shown in FIG. 6, in the multi-gradation data D2, the tone included in the line drawing data D1 is expressed as an intermediate gradation value.
  • the acquired multi-gradation data D2 is stored in the storage unit 11 (see FIGS. 3 and 5).
  • the region separation unit 21 has a function of extracting a drawing line included in the line drawing data D ⁇ b> 1 read by the scanner 16 and separating a plurality of closed regions surrounded by the drawing line. Specifically, the drawing line included in the line drawing data D1 is thinned to extract a core line (line having a width of one pixel) (thinning process), thereby separating the line drawing into a plurality of closed regions surrounded by the core line.
  • FIG. 7 is a diagram showing an example of thinned data D30 obtained by thinning the line drawing data D1 shown in FIG.
  • the region separation unit 21 thins the drawing line included in the line drawing data D1 into a core line having a width of one pixel by thinning the line drawing data D1.
  • the region separation unit 21 can extract a large number of closed regions whose boundary lines are core wires.
  • the region separation unit 21 generates region separation data D3 described below for information on each closed region surrounded by the core wire.
  • the region separation unit 21 attaches an ID number (labeling) to each closed region surrounded by the core line, and further, the closed region shape data corresponding to the ID number, Get the circumference of the closed region.
  • the “peripheral length” refers to the length of a line (closed curve) constituting the closed region.
  • the “closed curve” is defined as including a broken line in addition to the curve (thus, it can also be referred to as “closed loop”).
  • FIG. 8 is a diagram illustrating an example of the data structure of the region separation data D3. As shown in FIG. 8, in the area separation data D3, “closed area ID.”, “Core pixel data”, and “number of closed curve pixels (peripheral length)” are described in a table format.
  • core pixel data is data of the shape of a closed region, and indicates position information (represented in a two-dimensional format of (X, Y)) that constitutes a closed curve of the closed region.
  • “Closed curve pixel number (peripheral length)” is the perimeter of the closed region, and indicates the total number of pixels constituting the closed curve of the closed region.
  • the region separation unit 21 stores the generated region separation data D3 in the storage unit 11 (see FIG. 3).
  • the region combining unit 22 matches two or more closed regions that are close to each other with a predetermined distance reference from the multi-gradation data D2, the region separation data D3, and the thinning data D30, and matches the gradation values corresponding to the respective closed regions. Combine according to the degree.
  • FIG. 9 is a diagram illustrating each functional block included in the region combining unit 22.
  • the region combination unit 22 includes functional blocks of a position information acquisition unit 221, a gradation value acquisition unit 222, and a position selection unit 223, and generates region combination data D4 by executing predetermined processing.
  • the position information acquisition unit 221 has a function of acquiring center-of-gravity position information of a closed region that is smaller than a predetermined reference size. Specifically, first, by referring to the “number of closed curve pixels” of the area separation data D3, a closed area having a predetermined number of pixels (peripheral length) or less is selected, and the barycentric position included in the closed area is determined. .
  • centroid position of the closed region for example, a rectangle (including a square) circumscribing the closed region is generated, and the position where the diagonal lines of the rectangle intersect is set as the centroid position.
  • the average value of the X direction component and the Y direction component of the position information of all the pixels described in the “core pixel data” of the region separation data D3 is calculated, and the obtained value is obtained as the barycentric position information of the closed region May be.
  • the gradation value acquisition unit 222 calculates a gradation value corresponding to the centroid position acquired by the position information acquisition unit 221 and a gradation value corresponding to two or more adjacent positions that are close to the centroid position on a predetermined distance basis. Each has a function of acquiring from multi-gradation data D2. A specific example will be described below.
  • FIG. 10 and FIG. 11 are diagrams for explaining the processing by the region combining unit 22.
  • the position information acquisition unit 221 determines a point of the center of gravity position (the center of gravity point P0) of the closed region A0 having a predetermined circumference or less.
  • the gradation value acquisition unit 222 sets proximity points P1 to P8 that are positions that are separated in eight directions with respect to the gravity center point P0 and that are close to the gravity center point P0 on a predetermined distance basis.
  • the number of directions is not limited to this, it is desirable that the number of directions is two or more (for example, four directions).
  • each direction is set so that the adjacent directions are equiangular (45 degrees), but the present invention is not limited to this.
  • the distance between the centroid point P0 and an intersection P01 where a straight line extending from the centroid point P0 in the direction of the proximity point P1 intersects the closed curve L0 is defined as a boundary point distance DA, and from the centroid point P0.
  • the proximity point P1 is determined so that the proximity point distance DB is twice the boundary point distance DA.
  • the gradation value acquisition unit 222 sets the other adjacent points P2 to P8 in the same manner. Thereby, a plurality of proximity points P1 to P8 are set.
  • the gradation value acquisition unit 222 that has set the adjacent points P1 to P8 has the gradation values (hereinafter referred to as “corresponding floors”) of the portions of the multi-gradation data D2 respectively corresponding to the positions of the centroid point P0 and the adjacent points P1 to P8. This is referred to as “key value”. Specifically, referring to the multi-gradation data D2 based on the position information of the barycentric point P0 and the proximity points P1 to P8, the gradation value of the corresponding position (value shown in parentheses in FIG. 10) Get each.
  • the position selection unit 223 obtains each difference between the corresponding gradation value of the barycentric point P0 acquired by the gradation value acquisition unit 222 and the corresponding gradation value of each of the adjacent points P1 to P8, and has the smallest difference (that is, A proximity point having a corresponding gradation value (having the highest degree of coincidence with the corresponding gradation value of the barycentric point P0) is detected. For example, in the example illustrated in FIG. 10, since the difference between the corresponding gradation value (“125”) of the centroid point P0 and the corresponding gradation value (“120”) of the proximity point P1 is the smallest, the position selection unit 223 Point P1 is selected. Note that the position selection unit 223 is configured not to select a proximity point when the smallest difference value is larger than a predetermined threshold in order to perform the closed region combination process by the region combination unit 22 with higher accuracy. May be.
  • the region coupling unit 22 deletes a part of the boundary line interposed between the centroid point P0 and the proximity point P1 in the thinned data 30 to thereby close the closed region including the centroid point P0.
  • A0 and the closed region A1 including the proximity point P1 selected by the position selection unit 223 are combined as one closed region.
  • the region coupling unit 22 deletes the intersection P01 on the closed curve L0.
  • a combined closed region JA in which the closed region A0 and the closed region A01 are combined is generated.
  • the region combination unit 22 acquires data of a closed curve (indicated by a thick line in FIG. 11) that constitutes the combined closed region JA.
  • FIG. 12 is a diagram illustrating an example of the region combination data D4 acquired from the thinned data D30 illustrated in FIG.
  • the region combining unit 22 generates region combined data D4 from the thinned data D30 by repeating the above-described processing.
  • a large number of minute regions (each part of “sky”, “leaves”, and “branches”) included in the thinned data D30 shown in FIG. Based on the data D2, they are coupled to each other by the region coupling unit 22.
  • the proximity points P1 to P8 are located at positions twice the boundary point distance DA (generally a predetermined multiple) from the center of gravity point P0 (generally a predetermined point) of the focused closed region A0.
  • the focused closed area A0 is enlarged by a predetermined factor, and another closed area that overlaps with the enlarged closed area A0 is extracted as the closed area of the combination candidate. Therefore, “approaching by a predetermined distance reference” can be understood to be close enough to overlap with the closed region A0 enlarged by a predetermined magnification when the focused closed region A0 is enlarged by a predetermined magnification.
  • FIG. 13 is a flowchart for explaining the operation flow of the line drawing processing apparatus 1.
  • the line drawing processing apparatus 1 acquires the line drawing data D1 when the operator sets and reads a monochrome line drawing on the scanner 16 (step S1).
  • the line drawing processing apparatus 1 stores the acquired line drawing data D1 in the storage unit 11.
  • the line drawing processing apparatus 1 may store the electronic data in the storage unit 11 as line drawing data D1. Alternatively, the line drawing processing apparatus 1 may acquire line drawing electronic data via the communication unit 15.
  • the line drawing processing apparatus 1 generates multi-gradation data D2 by performing multi-gradation by the multi-gradation unit 20 (step S2).
  • the operation flow of the multi-gradation unit 20 will be described below.
  • FIG. 14 is a flowchart for explaining the operation flow of the multi-gradation unit 20.
  • the multi-gradation unit 20 acquires the reduced data D201 by reducing the line drawing data D1 acquired in step S1 with the reduction processing unit 201 (step S21).
  • the multi-gradation unit 20 acquires the averaged data D202 by performing the averaging process on the reduced data D201 acquired in step S21 by the averaging processor 202 (step S22).
  • the multi-gradation unit 20 determines whether or not the median filter process is necessary for the averaged data D202 acquired in step S22 (step S23). Note that the determination in step S23 is executed by setting in advance whether or not the operator executes the median filter processing in the line drawing processing apparatus 1. However, the present invention is not limited to this. For example, when the averaged data D202 is subjected to image analysis, and the amount of noise included in the averaged data D202 exceeds a predetermined reference value, the multi-gradation unit 20 performs median filter processing. The configuration may be such that it is determined to execute.
  • the multi-gradation unit 20 performs median filter processing on the averaged data D202 by the median filter processing unit 203, thereby performing multi-gradation.
  • the digitized data D2 is acquired (see FIG. 6) and stored in the storage unit 11 (see FIG. 3).
  • the multi-gradation unit 20 stores the averaged data D202 in the storage unit 11 as multi-gradation data D2 ( (See FIG. 3).
  • step S21 and step S22 are not limited to the order described above, and may be executed in the reverse order. Also, the operations of step S21 and step S22 do not necessarily have to be performed. That is, the multi-gradation unit 20 may be configured to execute either one.
  • the line drawing processing apparatus 1 acquires the thinned data D30 by thinning the drawing lines included in the line drawing data D1 by the region separating unit 21 (see step S3 and FIG. 7).
  • the line drawing processing apparatus 1 acquires region separation data D3 for a plurality of closed regions included in the thinned data D30 by the region separation unit 21 (see step S4, FIG. 8).
  • the acquired area separation data D3 is stored in the storage unit 11.
  • the line drawing processing apparatus 1 uses the region combining unit 22 to obtain the multi-gradation data D2 acquired in step S2, the thinned data D30 acquired in step S3, and the region separation data acquired in step S4.
  • the region combination data D4 is acquired from D3 (step S5, see FIG. 12). The operation flow of the region combining unit 22 will be described below.
  • FIG. 15 is a flowchart for explaining the operation flow of the region combination unit 22.
  • the region combination unit 22 refers to the region separation data D3 acquired in step S3 by the position information acquisition unit 221, and among the plurality of closed regions included in the thinned data D30, the region combination unit 22 has a predetermined reference size or less.
  • the closed region is selected, and position information of the point of the center of gravity position of the closed region (for example, the center of gravity point P0) is acquired (see step S51, FIG. 9 and FIG. 10).
  • the region combination unit 22 sets a plurality of proximity position points (for example, proximity points P1 to P8) that are close to the center of gravity acquired in step S51 on the basis of a predetermined distance by the gradation value acquisition unit 222. (Step S52). Further, the gradation value acquisition unit 222 acquires gradation values (corresponding gradation values) respectively corresponding to the barycentric point and the plurality of adjacent points from the multi-gradation data D2 acquired in step S2 (step S53). ).
  • the region combining unit 22 calculates the difference between the corresponding gradation value of the centroid point and the corresponding gradation value of the plurality of adjacent points by the position selection unit 223, and the region combination unit 22 is the largest in the corresponding gradation value of the centroid point. It is determined whether or not the closest corresponding gradation value is equal to or less than a predetermined reference value (step S54).
  • step S54 When it is determined in step S54 that the value is equal to or smaller than the predetermined reference value (in the case of YES), the line drawing processing apparatus 1 causes the position selection unit 223 to use the proximity point having the closest corresponding gradation value (for example, FIG. 10). Among them, the proximity point P1) is selected (step S55). Then, the region combination unit 22 combines these closed regions by deleting a part of the boundary line between the closed region including the center of gravity point and the closed region including the selected proximity point (step S56, FIG. 11). On the other hand, when the closest corresponding gradation value exceeds the predetermined reference value (NO) in step S54, the line drawing processing apparatus 1 advances the process to step S57.
  • the predetermined reference value in the case of YES
  • the region combination unit 22 refers to the region separation data D3 and determines whether there is another unprocessed closed region (step S57). For example, it is also effective to determine whether each closed region has been processed by setting a flag for the processed closed region of the region separation data D3. If there is an unprocessed closed region (in the case of YES), the region combining unit 22 returns to step S51 and executes the subsequent operations. On the other hand, when the processing has been completed for all closed regions (in the case of NO), the region combination unit 22 stores the result of the above combination processing in the storage unit 11 as region combination data D4.
  • a plurality of closed regions can be reasonably combined based on the multi-gradation data D2 reflecting the characteristics of the line drawing (pattern attached to the line drawing such as a tone). Therefore, when coloring a line drawing, it is possible to save the trouble of selecting and coloring relatively small closed regions (small regions) one by one.
  • the region combination data D4 is generated from the thinning data D30 (data obtained by thinning the drawing line of the line drawing data D1). Therefore, since it is possible to color the region combination data D4 and fit it into the line drawing data D1, the drawing line of the line drawing data D1 extends beyond the drawing line, or the color reaches the drawing line. Coloring mistakes such as absence can be prevented.
  • the region extraction operation and the coloring operation can be made efficient.
  • Second Embodiment> In the first embodiment, only one proximity point is set in each direction from the barycentric point P0. However, the accuracy of the joining process by the region joining unit 22 is improved by further executing a predetermined process. Can do.
  • FIG. 16 is a diagram for explaining processing by the region combination unit 22 according to the second embodiment of the present invention.
  • bond part 22 shown in FIG. 11 is shown.
  • the region combining unit 22 combines the closed region A0 and another closed region A1 after the proximity point P1 is selected by the position selection unit 223 (see step S56, FIG. 15).
  • the determination proximity point P1a located further away from the barycentric point P0 is further set by the determination proximity point distance DBa that is a predetermined multiple of the boundary point distance DA and shorter than the proximity point distance DB.
  • the position of the determination proximity point P1a is set so that the determination proximity point distance DBa is 1.5 times the boundary point distance DA.
  • the center of gravity point P0, the intersection P01, the proximity point P1, and the determination proximity point P1a are all on the same straight line, and the determination proximity point P1a is between the intersection P01 and the proximity point P1. Is set to be located at
  • the region combination unit 22 determines whether or not the corresponding gradation value of the proximity position P1 matches the corresponding gradation value of the determination proximity point P1a by taking a difference (determination process). If these corresponding gradation values do not match and a difference exceeding a predetermined reference value is obtained, the region combination unit 22 does not execute the combination process. In other cases, the region combining unit 22 executes a combining process that combines the closed region A0 and the closed region A1 as one closed region.
  • the region combining unit 22 performs the determination process by comparing the corresponding gradation value of the determination proximity point P1a with the corresponding gradation value of the proximity point P1, thereby further reducing the closed region A0. Since it can be surely combined with an adjacent closed region, the line drawing processing apparatus 1 can execute a highly accurate combining process.
  • the region coupling unit 22 selects two or more closed regions that are close to each other based on a predetermined distance reference based on the corresponding gradation values of the positions of the center of gravity point P0 and the proximity points P1 to P8. It has been described that the combination processing is performed according to the degree of coincidence of gradation values corresponding to the closed region.
  • the coupling method is not limited to this, and may be realized by other methods.
  • symbol is attached
  • the region combining unit 22a executes region combining processing by acquiring and comparing gradation values corresponding to the focused closed region and the adjacent closed region adjacent thereto.
  • FIG. 17 is a diagram illustrating each functional block included in the region combining unit 22a according to the third embodiment.
  • FIG. 18 is a diagram illustrating an example for explaining the combining process by the region combining unit 22a.
  • the region combination unit 22 a mainly includes functional blocks of an adjacent closed region detection unit 224, an average gradation value calculation unit 225, and a closed region selection unit 226. Each of these functional blocks will be described below.
  • the adjacent closed region detection unit 224 has a function of selecting a closed region smaller than a predetermined reference size and then detecting one or more adjacent closed regions adjacent to the closed region. Specifically, the adjacent closed region detection unit 224 refers to the “number of closed curve pixels” of the region separation data D3 as in the case of the position information acquisition unit 221 described in the first embodiment. Select a closed region less than the number (perimeter).
  • the adjacent closed region detection unit 224 refers to the “core pixel data” of the region separation data D3, and among the pixels constituting the closed curve of the closed region A0a, the adjacent closed region detection unit 224 also serves as a constituent pixel of the closed curve of the other closed region. A search is made as to whether or not a correct pixel exists. Thereby, an adjacent closed region adjacent to the closed region A0a is detected.
  • the closed region A0a is selected as a closed region smaller than a predetermined reference size, and the three adjacent closed regions A1a to 3a are adjacent to the closed region A0 by the adjacent closed region detection unit 224. Detected as a closed region.
  • the average gradation calculation unit 225 averages the corresponding gradation values of pixels included in the closed area A0a smaller than a predetermined reference size and the corresponding floors of pixels included in one or more adjacent closed areas. One or more adjacent average gradation values obtained by averaging the tone values are calculated.
  • the average gradation calculation unit 225 refers to the multi-gradation data D2 to determine the average gradation value “Ave0” for the closed region A0a and the adjacent closed regions A1a, A2a, A3a. Next, the adjacent average gradation values “Ave1”, “Ave2”, and “Ave3” are calculated.
  • the closed region selection unit 226 is adjacent to the average gradation value of the focused closed region among the one or more adjacent average gradation values calculated by the average gradation value calculation unit 225 (that is, the degree of coincidence is high). By detecting the average gradation value, it has a function of selecting the adjacent closed region corresponding to the adjacent average gradation value.
  • the criterion for determining the degree of coincidence between the average gradation values may be a criterion that “the degree of coincidence is high” when the difference between the average gradation values of the two regions to be compared is below a predetermined determination threshold. It is also possible to use a relative determination criterion that “the degree of coincidence” is the closest to the average gradation value of the focused closed area among the adjacent average gradation values of each of the plurality of adjacent closed areas. . Further, the latter criterion may be adopted when there are a plurality of adjacent closed regions, and the former criterion may be used when there is only one adjacent closed region.
  • the closed region selection unit 226 includes the average gradation value “Ave0” for the closed region A0a and the adjacent average gradation values “Ave1” and “Ave2” for the closed regions A1a, A2a, and A3a. And the difference from “Ave3”. Then, the closed region selection unit 226 detects the adjacent average gradation value having the smallest difference from “Ave0”, and detects the adjacent closed region corresponding to the adjacent average gradation value (for example, the average gradation value “Ave1”). Is detected, the adjacent closed region A1a) is selected.
  • the closed region selection unit 226 selects the adjacent average gradation value closest to the average gradation value for the closed region of interest by performing, for example, division instead of calculating the difference. It may be configured. Preferably, even if the adjacent average gradation value of the nearest value is equal to or greater than a predetermined reference value and is different from the average gradation value of the focused closed region, the adjacent average gradation value is selected.
  • the closed region selection unit 226 is configured so as not to do so.
  • the region combination unit 22a selects an adjacent closed region that is a candidate for combination from one or more adjacent closed regions adjacent to the target closed region. And the area
  • the closed region selection unit 226 selects the adjacent closed region A1a as a candidate for the closed region A0a
  • the boundary line interposed between the closed region A0a and the adjacent closed region A1a Delete some or all of them.
  • the closed region A0a and the adjacent closed region A1a are combined as one closed region.
  • the “boundary line” here refers to a portion where the closed curve surrounding the closed region A0a and the closed curve of the adjacent closed region A1a overlap.
  • the “closed curve” is defined as a concept including not only a curve but also a broken line.
  • the region combining unit 22a obtains closed curve data (specifically, position data of pixels constituting the closed curve) surrounding the combined closed regions. And after processing about a fully closed area
  • the region combining unit 22a repeatedly performs each process of each functional block on the thinned data D3 to combine a closed region smaller than a predetermined reference size with an adjacent adjacent closed region. Thereby, it can suppress that many fine closed areas generate
  • the region combining process is automatically executed according to the characteristics (tone, pattern, etc.) of the line drawing, it is possible to efficiently perform the area cutting operation when coloring the line drawing.
  • the region combining unit 22a selects a combination candidate from the adjacent closed regions adjacent to the focused closed region, so that adjacent closed regions can be reliably combined. Further, even in the closed regions adjacent to each other, it is possible to prevent erroneous combination when the degree of coincidence of the corresponding corresponding gradation values is low.
  • the multi-gradation data D2 It is possible to eliminate the possibility of being affected by noise contained in the.
  • the median filter processing by the median filter processing 203 is executed (see FIG. 5 and the like).
  • the median filter processing is executed.
  • the averaged data D202 can be used as the multi-gradation data D2.
  • the area combination unit 22a has the average gradation value Ave0 for the closed area A0a smaller than the predetermined reference size and the adjacent average gradation value Ave1 for the adjacent closed areas A1a, A2a, A3a. , Ave 2 and Ave 3 are compared, and by selecting one adjacent closed region having an average gradation value with the smallest difference, the closed region combining process is executed.
  • the combination processing method is not limited to this.
  • FIG. 19 is a diagram illustrating the functional blocks provided in the region combining unit 22b according to the fourth embodiment.
  • the region combination unit 22b mainly includes an adjacent closed region detection unit 224, an average gradation value calculation unit 225, a closed region selection unit 226a, and a combination inspection unit 227.
  • the adjacent closed region detection unit 224 and the average gradation value calculation unit 225 are the same as the configuration included in the region combination unit 22a, and thus detailed description thereof is omitted.
  • the closed region selection unit 226a includes an average gradation value for a focused closed region among one or more average gradation values calculated by the average gradation value calculation unit 225 and a predetermined threshold reference (“first threshold value”).
  • first threshold value a predetermined threshold reference
  • the average gradation value that is determined to be approximate that is, the degree of coincidence is high
  • the adjacent closed region corresponding to the adjacent average gradation value is selected. More specifically, the closed region selection unit 226a will be described with reference to FIG.
  • the closed region closed region selection unit 226a first compares the average gradation value Ave0 with the adjacent average gradation values Ave1, Ave2, and Ave3. This process is the same as that of the closed region selection unit 226. Then, the closed region selection unit 226a has an amount (difference in this case) that is different from the average gradation value Ave0 from the adjacent average gradation values Ave1, Ave2, and Ave3 that is equal to or less than a predetermined threshold (that is, a predetermined value). The approximate adjacent average gradation value (which is assumed to have a high degree of coincidence according to the threshold criterion) is detected.
  • a predetermined threshold that is, a predetermined value
  • the predetermined threshold value here may be a fixed value that is fixed in advance, or may be set as appropriate according to the state of the line drawing to be processed (such as style). Further, the comparison is not limited to the comparison of the degree of coincidence. For example, the comparison may be performed by division.
  • the closed region selection unit 226 detects only the adjacent average gradation value Ave1 closest to the average gradation value Ave0, whereas the closed region selection unit 226a detects the other adjacent average gradation values Ave2, If it is determined that Ave3 has a high degree of coincidence with the average gradation value Ave0, detection is performed in the same manner as the adjacent average gradation value Ave1. Then, the closed region selection unit 226a selects an adjacent closed region (approximate adjacent closed region) corresponding to the detected adjacent average gradation value (approximate adjacent average gradation value) as a combination candidate region of the closed region A0a.
  • the joint inspection unit 227 inspects the degree of coincidence of the average gradation values for the adjacent closed regions. It has the function to do. If it is determined that the approximation is performed based on a predetermined threshold criterion (referred to as “second threshold”) (that is, the degree of coincidence is high), the combination processing unit 22b selects the closed region selection unit 226a. The one or more adjacent closed regions and the focused closed region are combined. On the other hand, when the degree of coincidence is low, the combined process is not performed for the closed region having a low degree of coincidence. That is, according to the inspection result of the combination inspection unit 227, the combination processing unit 22b performs the combination process. More specifically, a description will be given with reference to FIG.
  • the closed region selection unit 226a selects all the adjacent closed regions A1a, A2a, A3a as the combination candidates with the closed region A0a (that is, any of the adjacent average gradation values Ave1, Ave2, Ave3). Is an approximate adjacent average gradation value approximated to Ave0).
  • the combination inspection unit 227 compares the average gradation values of the adjacent closed regions adjacent to each other among the selected adjacent closed regions A1a, A2a, A3a. That is, in the example shown in FIG. 18, specifically, “Ave1” and “Ave2”, “Ave2” and “Ave3”, “Ave3” and “Ave1” are respectively compared.
  • the combination inspection unit 227 determines that “combination is possible”. Then, the combination processing unit 22b performs a process of combining the closed region A0a and the adjacent closed regions A1a, A2a, A3a.
  • the combination checking unit 227 determines that “no combination”. to decide. Then, the combination processing unit 22b includes the adjacent closed region (A2a) corresponding to the average grayscale value Ave0 (here, “Ave2”) closer to the average grayscale value Ave0 among the adjacent average grayscale values Ave2 and Ave3. The closed region A0a is coupled. On the other hand, for the adjacent closed region (A3a) corresponding to the adjacent average gradation value (here, “Ave3”) having a low degree of coincidence, the combination processing unit 22b does not perform the combination processing.
  • the closed region selection unit 226a selects adjacent closed regions that are a plurality of combination candidates at a time, and therefore there is a possibility that the operator may select adjacent closed regions that are not intended to be combined.
  • the adjacent closed areas A2a and A3a should not be combined, but the closed area A0a is adjacent to the adjacent closed areas A2a and A3a. .
  • the comparison inspection unit 227 by providing the comparison inspection unit 227, the average gradation values Ave2 and Ave3 for the adjacent closed regions A2a and A3a are compared to determine whether or not they should be combined. Thereby, since the joining of the area
  • the first threshold value and the second threshold value described above may be the same value or different values.
  • the adjacent closed region detection unit 224 extracts all adjacent closed regions adjacent to the focused closed region, but the present invention is not limited to this.
  • FIG. 20 is a diagram illustrating each functional block included in the region combining unit 22c according to the fifth embodiment.
  • the region combination unit 22c according to the present embodiment mainly includes an adjacent closed region detection unit 224a, an average gradation value calculation unit 225, and a closed region selection unit 226a.
  • the adjacent closed region detection unit 224a first selects a closed region smaller than a predetermined reference size (referred to as a first reference size), and then selects a predetermined region from one or more adjacent closed regions adjacent to the closed region. It has a function of detecting only an adjacent closed region smaller than a reference size (referred to as a second reference size). Specifically, similarly to the adjacent closed region selection unit 224, the adjacent closed region selection unit 224a refers to the “core line pixel data” of the region separation data D3 and extracts the adjacent closed region, and the adjacent closed region Only when it is less than or equal to the predetermined circumference, it is detected as a candidate for combination.
  • the first reference and the second reference may be the same or different reference sizes.
  • FIG. 21 is a diagram showing an example of a part of the thinned data D30.
  • relatively large closed areas A5 and A6 are adjacent to each other across a small closed area A4.
  • the region combining unit 22b according to the fourth embodiment may combine all of the small closed region A4 and the large closed regions A5 and A6 as one region.
  • the adjacent closed region detection unit 224a selects the adjacent closed region to be selected that is equal to or smaller than a predetermined reference size, the large adjacent closed regions A5 and A6 illustrated in FIG. 21 are prevented from being combined. Can do.
  • the position information acquisition unit 221 acquires the position information of the center of gravity of the focused closed area A0.
  • the present invention is not limited to this.
  • the closed area A0 As long as it is included in the position information of any predetermined point.
  • the gradation value acquisition unit 222 sets each proximity point distance DB to be twice the boundary point distance DA.
  • the present invention is not limited to this. It is not a thing.
  • the level is set so that the proximity point is set so that the proximity point distance DB is larger than the boundary point distance DA. It is desirable to configure the tone value acquisition unit 222.
  • the position selection unit 223 examines the degree of coincidence between the corresponding gradation values of the centroid point P0 and the proximity points P1 to P8 by taking the difference.
  • the present invention is not limited to this.
  • a configuration may be used in which proximity points having corresponding gradation values to be approximated are selected by division.
  • the position selection unit 223 has been described as selecting the proximity point having the corresponding gradation value closest to the corresponding gradation value of the barycentric point P0 from the proximity points P1 to P8.
  • the present invention is not limited to this. For example, if the difference is small (the degree of coincidence is high), a plurality of proximity points may be selected at a time.
  • the position selection unit 223 when configured to select a plurality of proximity points, the corresponding gradation values of the plurality of proximity points are compared and inspected as in the combination inspection unit 227.
  • the combination processing unit 22 may be configured to combine only a closed region having a predetermined size or less from the closed region including the proximity point selected by the position selection unit 223 with the region of interest.
  • the configuration of the region separation data D3 is not limited to that shown in FIG. 8, and for example, the data of the shape of each closed region may be expressed in a vector format.
  • the number of closed curve pixels the number of pixels included inside the closed curve of the closed region may be described in the region separation data D3 as data indicating the size (area) of the closed region. Even such data representing the “area” of the closed region can be used when the position information acquisition unit 221 and the adjacent closed region detection unit 224 select a closed region smaller than a predetermined reference size. ,It is valid.
  • the area separation data D3 may include barycentric position information of each closed area.
  • each processing function of the line drawing processing apparatus 1 is realized by software.
  • a line drawing processing mechanism is realized by hardware by replacing each processing unit with a dedicated circuit. May be.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

 線画データD1を多階調化した多階調化データD2を取得するとともに、線画から芯線を抽出する。さらに、芯線で囲まれる閉領域であって、所定の基準よりも小さい閉領域を選択する。そして、選択した閉領域の重心点を決定し、当該重心点に対して所定の距離基準によって近接する複数の近接点を設定する。その後、多階調化データD2を参照して、重心点及び各近接点に対応する階調値を取得して比較する。さらに、重心点に対応する階調値に最も近い階調値を有する近接点を選択する。そして、重心点を含む閉領域と当該選択した近接点を含む閉領域との間に介在する境界線を削除する。

Description

線画処理装置、プログラム及び線画処理方法
 本発明は、描画線で規定された複数の領域を結合する線画処理技術に関する。
 未彩色の線画の代表的なものとしてマンガがある。マンガ(Manga)は、英語のコミック(Comic)とは異なり、日本独自の風合いを持つ(モノクロ)線画である。すなわち、マンガでは、階調(色合い)の表現やキャラクターの感情などが、様々なトーン(スクリーントーン(株式会社セルシス登録商標))、効果線、ベタ(単色での塗り)などの白黒の模様、および、線等で表現されており、カラー表現が多いコミックとは大きく異なる。
 伝統的にマンガは紙上に印刷して市場に供給されてきており、カラー印刷コストがかかりすぎるなどの理由のために、雑誌などの巻頭カラーページ以外はモノクロ(未彩色)でしか制作されていなかった。
 しかし、携帯電話などの端末装置の通信技術の発達により、デジタル化されたマンガを、通信回線を介して購読できるサイトが急増しており、マンガを液晶モニタなどで鑑賞できる機会が増え、カラー化(彩色、色付け)されたマンガの需要が大きくなっている。また、日本国外においては、モノクロマンガの伝統がないため、マンガビジネスを国際的に普及する上では、モノクロマンガを彩色する必要がある。そのため、モノクロマンガを彩色するための制作作業がなされている。ここで、デジタル線画中の領域について、彩色作業を自動化する技術は、例えば特許文献1に開示されている。
特許第2835752号公報
 ところが、特許文献1に開示された技術は、アニメ彩色を想定してトレース線を用いて描かれたセル画に対して彩色を行う技術であり、マンガなどの線画を自動彩色する際に、そのまま適用することは困難であった。
 すなわち、マンガには、アニメ制作のように彩色を前提としたトレース線がなく、背景や被写体なども一枚の線画に合成されている。そのため、マンガには、トーンや細かな書き込み描写が多く、細かな領域(微少領域)が多数存在するため、手作業による切り抜きや色塗りに手間がかかるという問題があった。
 特に、カケ網などのトーンが付された領域において、微少領域が多数発生する場合には、彩色のための作業が非常に煩雑となっている。
 以上のように、モノクロマンガの彩色作業の効率化が強く望まれているが、微少領域の扱いが非常に煩雑となっている。
 本発明は、上記課題に鑑みなされたものであり、多数発生する微小領域を合理的に、かつ効率的に他の領域と結合させる技術を提供することを目的とする。
 上記課題を解決するため、第1の態様に係る線画処理装置は、描画線により分離された閉領域を結合する線画処理装置であって、デジタル化した線画データを取得する線画データ取得部と、前記線画データを空間的に平滑化することにより、中間調の画素を持つ多階調化データを取得する多階調化部と、前記線画データから前記描画線を抽出することによって、前記描画線で囲まれる領域を複数の閉領域として分離する領域分離部と、前記複数の閉領域のうち所定の距離基準で近接する2以上の閉領域を、それぞれの閉領域に対応する前記多階調化データの部分の階調値の一致度に応じて結合する領域結合部とを備える。
 第1の態様に係る線画処理装置によれば、所定の距離基準によって近接する2以上の閉領域を、多階調化データの階調値との一致度に応じて結合することにより、複数の閉領域を、属性が類似した領域ごとに合理的かつ自動的に結合させることができる。したがって、例えば線画を彩色するときなどの、領域の切り出し作業を省力化できる。
 第2の態様に係る線画処理装置は、第1の態様に係る線画処理装置であって、前記多階調化部は、画像データを縮小処理する縮小化部を含む。
 第3の態様に係る線画処理装置は、第1または第2の態様に係る線画処理装置であって、前記多階調化部は、所定サイズのフィルタにより、各画素の値を多階調で平均化する平均化部を含む。
 第4の態様に係る線画処理装置は、第1の態様に係る線画処理装置であって、前記多階調化部は、注目画素の近傍の画素の各階調値を取得して、前記各階調値から中央値を取得し、当該中央値を前記注目画素の階調値とするメディアンフィルタ処理部、を含む。
 第4の態様に係る線画処理装置によれば、被処理対象の画像データをメディアンフィルタ処理することによって、画像データに含まれるノイズを消去することができ、元の線画の属性を反映させた多階調化データを取得することができる。
 第5の態様に係る線画処理装置は、第1の態様に係る線画処理装置であって、前記領域分離部は、前記線画データから前記描画線の芯線を抽出し、当該芯線で囲まれる領域を複数の閉領域として分離する。
 第6の態様に係る線画処理装置は、第5の態様に係る線画処理装置であって、前記領域結合部は、前記複数の閉領域のうち、所定の基準サイズよりも小さい第1閉領域を選択し、当該第1閉領域内に含まれる第1位置の位置情報を取得する位置情報取得部と、前記第1位置に対応する第1階調値と、前記第1位置から前記所定の距離基準で近接する2以上の近接位置に対応する複数の階調値とを、それぞれ前記多階調化データから取得する階調値取得部と、前記複数の階調値のうち、前記第1階調値と一致度が高い階調値を検出することによって、当該階調値を有する第2位置を選択する位置選択部とを含み、前記第1位置を含む前記第1閉領域と前記2位置を含む第2閉領域との間に介在する境界線を削除することによって、前記第1閉領域と前記第2閉領域とを1の閉領域として結合させる。
 第6の態様に係る線画処理装置によれば、比較的小さな閉領域と、当該小さな閉領域に対応する階調値に近い階調値を有する他の閉領域とを自動的に結合させることができる。したがって、比較的小さな閉領域の数を減らすことができる。
 第7の態様に係る線画処理装置は、第5の態様に係る線画処理装置であって、前記領域結合部は、前記複数の閉領域のうち、所定の基準サイズよりも小さい第3閉領域を選択し、当該第3閉領域に隣接する1以上の隣接閉領域を検出する隣接閉領域検出部と、前記第3閉領域に含まれる画素に対応する階調値を前記多階調化データから取得して平均化した第3平均階調値と、前記1以上の隣接閉領域に含まれる画素に対応する階調値を前記多階調化データからそれぞれ取得して平均化した1以上の隣接平均階調値を算出する平均階調値算出部と、前記1以上の隣接平均階調値のうち、所定の判定基準によって前記第3平均階調値との一致度が高いと判定される1以上の近似隣接平均階調値を検出し、前記1以上の隣接閉領域のうちから前記1以上の近似隣接平均階調値にそれぞれ対応する1以上の近似隣接閉領域を選択する閉領域選択部と、を含む。
 第8の態様に係る線画処理装置は、第7の態様に係る線画処理装置であって、前記領域結合部は、前記1以上の近似隣接閉領域のうち互いに隣接する近似隣接閉領域についての前記近似隣接平均階調値を比較する比較検査部、を含み、前記比較検査部による比較検査の結果に応じて、前記第3閉領域と前記1以上の近似隣接閉領域とを結合させる。
 また、上記課題を解決するための第9の態様に係るプログラムは、コンピュータによって実行可能なプログラムであって、前記コンピュータによる実行により、前記コンピュータを、デジタル化した線画データを取得する線画データ取得部と、前記線画データを空間的に平滑化することにより、中間調の画素を持つ多階調化データを取得する多階調化部と、前記線画データから前記描画線を抽出することによって、前記描画線で囲まれる領域を複数の閉領域として分離する領域分離部と、前記複数の閉領域のうち所定の距離基準で近接する2以上の閉領域を、それぞれの閉領域に対応する前記多階調化データの部分の階調値の一致度に応じて結合する領域結合部とを備える線画処理装置として機能させる。
 第9の態様に係るプログラムによれば、所定の距離基準によって近接する2以上の閉領域を、多階調化データの階調値との一致度に応じて結合することにより、複数の閉領域を、属性が類似した領域ごとに合理的かつ自動的に結合させることができる。したがって、例えば線画を彩色するときなどの、領域の切り出し作業を省力化できる。
 また、上記課題を解決するための第10の態様に係る線画処理方法は、描画線により分離された閉領域を結合する線画処理方法であって、(a)デジタル化した線画データを取得する工程と、(b)前記線画データを空間的に平滑化することにより、中間調の画素を持つ多階調化データを取得する工程と、(c)前記線画データから描画線を抽出することによって、前記描画線で囲まれる領域を複数の閉領域として分離する工程と、(d)前記複数の閉領域のうち所定の距離基準で近接する2以上の閉領域を、それぞれの閉領域に対応する前記多階調化データの部分の階調値の一致度に応じて結合する工程とを有する。
 第10の態様に係る線画処理方法によれば、所定の距離基準によって近接する2以上の閉領域を、多階調化データの階調値との一致度に応じて結合することにより、複数の閉領域を、属性が類似した領域ごとに合理的かつ自動的に結合させることができる。したがって、例えば線画を彩色するときなどの、領域の切り出し作業を省力化できる。
 この発明の目的、特徴、局面、および利点は、以下の詳細な説明と添付図面とによって、より明白となる。
本発明の第1の実施の形態に係る線画処理装置の外観図である。 線画処理装置の各構成を示す図である。 線画処理装置の機能ブロックと記憶部との接続状態を示す図である。 スキャナによって読み取られた線画データの一例を示す図である。 多階調化部が備える各機能ブロックと記憶部との接続状態を示す図である。 図4に示した線画データを多階調化した多階調化データの一例を示す図である。 図4に示した線画データを細線化処理した細線化データの一例を示す図である。 領域分離データのデータ構造の一例を示す図である。 領域結合部が備える各機能ブロックを示す図である。 領域結合部による処理を説明するための図である。 領域結合部による処理を説明するための図である。 図7に示した細線化データから取得される領域結合データの一例を示す図である。 線画処理装置の動作フローを説明するための流れ図である。 多階調化部の動作フローを説明するための流れ図である。 領域結合部の動作フローを説明するための流れ図である。 本発明の第2の実施の形態に係る領域結合部による処理を説明するための図である。 第3の実施の形態に係る領域結合部が備える各機能ブロックを示す図である。 領域結合部による結合処理を説明するための一例を示す図である。 第4の実施の形態に係る領域結合部が備える各機能ブロックを示す図である。 第5の実施の形態に係る領域結合部が備える各機能ブロックを示す図である。 細線化データの一部の一例を示す図である。
 以下、本発明の好適な実施の形態について、添付の図面を参照しつつ、詳細に説明する。
 <1. 第1の実施の形態>
 <1.1.線画処理装置の構成及び機能>
 <概略構成>
 図1は、本発明の第1の実施の形態に係る線画処理装置1の外観図である。また、図2は、線画処理装置1の各構成を示す図である。線画処理装置1は、主としてCPU10と、記憶部11と、操作部12と、表示部13と、ディスク読取部14と、通信部15と、スキャナ16とを備え、一般的なコンピュータとしての機能を備えている。
 CPU10は、記憶部11に記憶されているプログラム2にしたがって動作することによって、各種データの演算や制御信号の生成を実行し、線画処理装置1の各構成を制御する。CPU10によって実現される機能ブロックについては後述する。
 記憶部11は、CPU10の一時的なワーキングエリアとなるRAM及びハードディスクや、読み取り専用のROMを備えている(図示せず)。記憶部11は、プログラム2や各種データを記憶する記録媒体としての機能を有している。なお、プログラム2は、後述する記録媒体9からディスク読取部14を介して記憶部11に転送されてもよい。あるいは、プログラム2が通信部15を介して、記憶部11に転送されてもよい。
 操作部12は、線画処理装置1に対してオペレータの指示を入力するために使用される。すなわち、操作部12は、線画処理装置1における入力装置として機能する。具体的に操作部12は、例えばキーボードやマウス、グラフィックタブレット(ペンタブレット:ぺんてる株式会社登録商標))及び各種ボタン類などが該当する。
 表示部13は、各種データを画像として画面に表示する。すなわち表示部13は、線画処理装置1における表示装置として機能する。具体的に表示部13は、例えばCRTモニタや液晶ディスプレイなどが該当するが、タッチパネルディスプレイのように、操作部12の機能を一部有しているものでもよい。
 ディスク読取部14は、可搬性の記録媒体9に記憶されているデータを読み取って記憶部11に転送する装置である。すなわち、ディスク読取部14は線画処理装置1におけるデータ入力装置として機能する。
 なお、本実施の形態に係る線画処理装置1は、ディスク読取部14としてCD-ROMドライブを備えている。しかし、ディスク読取部14はこれに限られるものではなく、例えばFDドライブ、DVDドライブ、MO装置などであってもよい。なお、ディスク読取部14が記録媒体9にデータを記録させる機能を有する場合には、ディスク読取部14に記憶部11の機能の一部を代行させることも可能である。
 通信部15は、線画処理装置1と図示しない他の装置群との間でネットワークを介した通信を行うための機能を有する。
 スキャナ16は、未彩色の線画を読み取るための読取装置であって、多数のイメージセンサを有しており、線画をデジタルデータとして取得するための機能を有する。
 図3は、線画処理装置1の機能ブロックと記憶部11との接続状態を示す図である。図3に示す多階調化部20、領域分離部21、領域結合部22は、主にCPU10がプログラム2に従って動作することにより実現される機能ブロックである。
 <線画>
 図4は、スキャナ16によって読み取られた線画データD1の一例を示す図である。このような印刷基材(紙など)に印刷された線画(マンガの一部)がスキャナ16によって読み取られ、取得された線画データD1は、記憶部11に格納される。
 なお、線画処理装置1の処理対象となる線画は、紙などに記載されたアナログ画像(原稿)の場合もあり、出版用に過去にデジタル化された画像の場合もあるが、いずれの場合も白黒2値画像(モノクロ画像)である。
 アナログ画像の場合には、スキャナ16などを用いた光電読取りによってデジタル化するにあたって2値画像としての読取りでもよいが、その場合には、下記に説明する多階調化処理の前に、複数ビットを用いたモノクロ多階調(たとえば4ビット=16階調、8ビット=256階調)画像表現に変換しておく。
 また、最初からモノクロ多階調での画像読取りであってもよい。もっとも、多階調化処理の前段階での「多階調」は各画素が複数ビットで表現されているというだけであり、実際には白、黒の2つのレベルが用いられているだけである。
 なお、図4に示すように、一般的な未彩色の線画には、様々なトーン(模様)がモノクロのパターンまたは絵柄として付されており、背景(例えば図4中、右側の「空」)や物(例えば図4中、左側の「木の葉」や「木の枝」)の色合い等が、トーンを付着させることによって表現されている。ここでの線画とは、描画線の他、トーンやベタなどを含む画像が含まれる。
 <多階調化部20>
 多階調化部20は、図4に示したようなモノクロの線画データD1を空間的に平滑化することにより、中間調の画素を持つ多階調化データD2を取得する機能を有する。なお、本実施の形態において、多階調化部20は、以下に説明する縮小処理、平均化処理、メディアンフィルタ処理を含む多階調化処理を行う。
 図5は、多階調化部20が備える各機能ブロックと記憶部11との接続状態を示す図である。多階調化部20は、縮小処理部201、平均化処理部202及びメディアンフィルタ処理部203を有する。これらの各機能ブロックは、以下に説明する各処理を行う。
 <縮小処理部201>
 縮小処理部201は、線画データD1(画像データ)を縮小処理することによって、縮小データD201を取得する。ここで、縮小処理とは、所定のサイズを持つ画素ブロック領域(N×N画素)を1画素に縮小する処理であって、縮小する際に、当該画素ブロック領域に含まれる全画素について、それぞれの画素濃度が複数ビットで表現された全画素値の平均値を算出して、縮小後の当該領域に対応する1画素の画素値を当該平均値とする処理をいう。
 線画データD1を縮小化処理することによって、線画に含まれるトーンは、平均化され中間調へと階調化される。なお、縮小率Nについては、オペレータが自由に設定することができるが、例えば以下の式
N=1/{2.0×(画像解像度)/(トーン線数)}
によって算出すればよい。なお、トーン線数は、処理対象の未彩色の線画の中で一番良く使用されているトーン(スクリーントーン(株式会社セルシス登録商標))に合わせて、単位間隔(たとえばセンチメートルまたはインチ)あたりの線数として設定される。ただし、縮小率Nの算出法は、これに限定されるものではない。また、本実施の形態では、この縮小処理には、元の線画データD1と同じ画素サイズに戻す処理(拡大処理)を含むものとするが、この処理は、例えば後述する平均化処理の後や、メディアンフィルタ処理の後に実行されてもよい。
 <平均化処理部202>
 平均化処理部202は、上記の縮小処理部201により取得した縮小データD201の各画素の値を、所定サイズのフィルタにより、多階調で平均化処理する機能を有する。なお、ここでいう平均化処理とは、所定サイズのフィルタ(平均化フィルタ)を使用することによって、当該所定のサイズに含まれる画素の平均値を得る処理をいう。この平均化処理を、画像データの全面に渡って行うことによって、元の線画に含まれていたトーンはさらに平均化されて多階調化される。
 なお、平均化フィルタのサイズ(M×M画素)は、例えば以下の式
M=2.0×(画像解像度)/(トーン線数)
によって算出すればよい。ただし、平均化フィルタのサイズの算出法は、これに限定されるものではなく、オペレータが適宜設計変更することも可能である。
 以上の縮小処理部201による縮小処理及び平均化処理部202による平均化処理を組み合わせることによって、線画処理装置1は、線画データD1に含まれるモノクロのトーンを中間階調値化することができる。
 <メディアンフィルタ処理部203>
 上記縮小処理、平均化処理を行って得られる平均化データD202(画像データ)には、画像の荒れ(いわゆる「ノイズ」)が含まれているおそれがある。このようなノイズは、メディアンフィルタ処理部203によるメディアンフィルタ処理によって除去することができる。
 なお、メディアンフィルタ処理とは、注目画素の近傍の領域内の画素の複数の階調値を取得して、当該複数の階調値を小さい順に並べ、その中から中央の値(中央値)を取得して、当該中央値を注目画素の階調値とする処理をいう。
 図6は、図4に示した線画データD1を多階調化した多階調化データD2の一例を示す図である。図6に示すように、多階調化データD2では、線画データD1に含まれるトーンが中間階調値として表現される。そして取得された多階調化データD2は、記憶部11に格納される(図3及び図5参照)。
 <領域分離部21>
 図3に戻って、領域分離部21は、スキャナ16に読み取られた線画データD1に含まれる描画線を抽出し、描画線によって囲まれる複数の閉領域を分離する機能を有する。具体的には、線画データD1に含まれる描画線を細線化して芯線(1画素幅の線)を抽出することによって(細線化処理)、線画を芯線で囲まれる複数の閉領域に分離する。
 図7は、図4に示した線画データD1を細線化処理した細線化データD30の一例を示す図である。領域分離部21は、線画データD1を細線化処理することによって、線画データD1に含まれる描画線を1画素幅の芯線に細線化する。その結果、領域分離部21は、図7に示すように、境界線が芯線で構成される多数の閉領域を抽出することができる。なお、芯線で囲まれる各閉領域の情報について、領域分離部21は、以下に説明する領域分離データD3を生成する。
 すなわち、領域分離部21は、図7に示した細線化データD30において、芯線で囲まれる各閉領域にID番号を付け(ラベリング)、さらにID番号に対応した閉領域の形状のデータと、当該閉領域の周長とを取得する。ここで、「周長」とは、閉領域を構成する線(閉曲線)の長さをいう。また、「閉曲線」とは、曲線以外に折れ線をも含むものとして定義する(したがって、「閉ループ」と称することもできる)。
 図8は、領域分離データD3のデータ構造の一例を示す図である。図8に示すように、領域分離データD3には、「閉領域 ID.」と、「芯線画素データ」と、「閉曲線画素数(周長)」とが表形式で記述されている。
 なお、「芯線画素データ」は、閉領域の形状のデータであって、閉領域の閉曲線を構成する画素の位置情報((X,Y)の2次元形式で表現される。)を示す。また、「閉曲線画素数(周長)」は、閉領域の周長であって、当該閉領域の閉曲線を構成する画素の総数を示す。なお、領域分離部21は、生成した領域分離データD3を記憶部11に格納する(図3参照)。
 <領域結合部22>
 領域結合部22は、多階調化データD2、領域分離データD3及び細線化データD30から、所定の距離基準で近接する2以上の閉領域を、それぞれの閉領域に対応する階調値の一致度に応じて結合する。
 図9は、領域結合部22が備える各機能ブロックを示す図である。領域結合部22は、位置情報取得部221、階調値取得部222及び位置選択部223の各機能ブロックを備え、所定の処理を実行することにより領域結合データD4を生成する。
 <位置情報取得部221>
 位置情報取得部221は、所定の基準サイズよりも小さい閉領域の重心位置情報を取得する機能を有する。具体的には、まず領域分離データD3の「閉曲線画素数」を参照することによって、所定の画素数(周長)以下の閉領域を選択し、当該閉領域内に含まれる重心位置を決定する。
 ここで、閉領域の重心位置の決定方法としては、例えば閉領域に外接する長方形(正方形を含む)を生成して、当該長方形の対角線が交わる位置を重心位置とする。あるいは、領域分離データD3の「芯線画素データ」に記述されている全画素の位置情報のX方向成分及びY方向成分の平均値を演算し、得られる値を当該閉領域の重心位置情報として取得してもよい。
 <階調値取得部222>
 階調値取得部222は、位置情報取得部221によって取得した重心位置に対応する階調値と、重心位置から所定の距離基準で近接する2以上の近接位置に対応する階調値とを、それぞれ多階調化データD2から取得する機能を有する。以下に具体例をあげて説明する。
 図10及び図11は、領域結合部22による処理を説明するための図である。図10に示す例では、位置情報取得部221によって、所定の周長以下の閉領域A0の重心位置の点(重心点P0)が決定されている。階調値取得部222は、重心点P0に対して8方向に離間する位置であって、重心点P0と所定の距離基準で近接する位置の近接点P1~P8を設定する。なお、方向の数はこれに限られるものではないが、2以上の方向(例えば4方向など)であることが望ましい。また、本実施の形態では図10に示すように、隣り合う各方向の間が等角度(45度)となるように、各方向を設定しているが、これに限られるものではない。
 なお、図10に示すように、例えば重心点P0と、重心点P0から近接点P1方向に延びる直線が閉曲線L0と交差する交差点P01との間の距離を境界点距離DAとし、重心点P0から近接点P1までの距離を近接点距離DBとしたとき、近接点距離DBが境界点距離DAの2倍となるように、近接点P1を決定する。また、階調値取得部222は、他の近接点P2ないしP8についても、同様に設定する。これにより、複数の近接点P1~P8が設定される。
 近接点P1~P8を設定した階調値取得部222は、重心点P0と近接点P1~P8との位置にそれぞれ対応する多階調化データD2の部分の階調値(以下、「対応階調値」と称する。)を取得する。具体的には、重心点P0と近接点P1~P8の位置情報を元に多階調化データD2を参照して、対応する位置の階調値(図10中、括弧内に示した値)をそれぞれ取得する。
 <位置選択部223>
 位置選択部223は、階調値取得部222によって取得された重心点P0の対応階調値と各近接点P1~P8の対応階調値との各差分を求め、最も差分の小さい(すなわち、重心点P0の対応階調値と最も一致度が高い)対応階調値を有する近接点を検出する。例えば図10に示す例では、重心点P0の対応階調値(「125」)と近接点P1の対応階調値(「120」)との差分が最も小さいため、位置選択部223は、近接点P1を選択する。なお、領域結合部22による閉領域の結合処理を、より精度良く行うため、位置選択部223は、最も小さい差分の値が所定の閾値よりも大きい場合には、近接点を選択しないように構成されていてもよい。
 領域結合部22は、図11に示すように、細線化データ30における重心点P0と近接点P1との間に介在する境界線の一部を削除することによって、重心点P0が含まれる閉領域A0と、位置選択部223によって選択された近接点P1が含まれる閉領域A1とを、1の閉領域として結合させる。具体的には、領域結合部22は、閉曲線L0上の交差点P01を削除する。これによって、閉領域A0と閉領域A01とが結合された結合閉領域JAが生成される。さらに、領域結合部22は、結合閉領域JAを構成する閉曲線(図11中、太線で示す。)のデータを取得する。
 図12は、図7に示した細線化データD30から取得される領域結合データD4の一例を示す図である。領域結合部22は、上述した処理を繰り返すことによって、細線化データD30から、領域結合データD4を生成する。図12に示すように、図7に示す細線化データD30に含まれていた多数の微小領域(「空」「木の葉」「木の枝」の各部分)は、図6に示す多階調化データD2に基づいて、領域結合部22により互いに結合されている。
 なお、本実施の形態では、着目した閉領域A0の重心点P0(一般的には所定点)から、境界点距離DAの2倍(一般的には所定倍)の位置に近接点P1~P8を設定しているが、換言すれば、着目した閉領域A0を所定倍に拡大して、当該拡大した閉領域A0と重なる他の閉領域を、結合候補の閉領域として抽出している。したがって、「所定の距離基準によって近接する」とは、着目した閉領域A0を所定倍に拡大したときに当該所定倍に拡大した閉領域A0と重なる程度に近接する、と捉えることもできる。
 以上が、本実施の形態に係る線画処理装置1の構成及び機能の説明である。
 <1.2.線画処理装置の動作フロー>
 次に、線画処理装置1の動作フローについて説明する。なお、線画処理装置1が備える各部の詳細な処理について、既に説明したものは適宜省略する。
 <線画データD1の取得>
 図13は、線画処理装置1の動作フローを説明するための流れ図である。まず、オペレータがモノクロの線画をスキャナ16にセットして読み取らせることによって、線画処理装置1は、線画データD1を取得する(ステップS1)。線画処理装置1は、取得した線画データD1を記憶部11に格納する。
 なお、線画が他のコンピュータ上によって描画されたことなどによって、例えば記録媒体9に電子データとして記録されているような場合には、オペレータが当該記録媒体9をディスク読取部6によって読み取り、読み取った電子データを線画処理装置1が線画データD1として記憶部11に格納すればよい。または、線画処理装置1は、通信部15を介して線画の電子データを取得してもよい。
 <多階調化データD2の取得>
 次に、線画処理装置1は、多階調化部20によって多階調化することで、多階調化データD2を生成する(ステップS2)。多階調化部20の動作フローについて、以下に説明する。
 図14は、多階調化部20の動作フローを説明するための流れ図である。
 まず、多階調化部20は、縮小処理部201により、ステップS1にて取得した線画データD1を縮小処理することによって、縮小データD201を取得する(ステップS21)。次に、多階調化部20は、平均化処理部202により、ステップS21にて取得した縮小データD201を平均化処理することによって、平均化データD202を取得する(ステップS22)。
 さらに、多階調化部20は、ステップS22にて取得した平均化データD202について、メディアンフィルタ処理が必要か否かを判断する(ステップS23)。なお、あらかじめオペレータがメディアンフィルタ処理を実行するかどうかを線画処理装置1に対して設定することによって、ステップS23の判断が実行される。ただし、これに限られず、例えば平均化データD202を画像解析することによって、平均化データD202に含まれるノイズの量が所定の基準値を超えた場合に、多階調化部20がメディアンフィルタ処理を実行するように決定する構成であってもよい。
 ステップS23にて、メディアンフィルタ処理が必要である場合(YESの場合)には、多階調化部20は、メディアンフィルタ処理部203により平均化データD202をメディアンフィルタ処理することによって、多階調化データD2を取得し(図6参照)、記憶部11に格納する(図3参照)。一方、ステップS23にて、メディアンフィルタ処理が不要である場合(NOの場合)には、多階調化部20は、平均化データD202を多階調化データD2として記憶部11に格納する(図3参照)。
 なお、ステップS21及びステップS22の動作は、上記の順序に限られるものではなく、逆の順で実行されてもよい。また、ステップS21とステップS22の動作は、必ずしも両方を実行しなければならないものではない。すなわち、多階調化部20は、どちらか一方を実行する構成であってもよい。
 <細線化データD30の取得>
 図13に戻って、線画処理装置1は、領域分離部21により線画データD1に含まれる描画線を細線化することによって、細線化データD30を取得する(ステップS3、図7参照)。
 <領域分離データD3の取得>
 さらに、線画処理装置1は、領域分離部21により、細線化データD30に含まれる複数の閉領域についての領域分離データD3を取得する(ステップS4、図8参照)。取得された領域分離データD3は、記憶部11に格納される。
 <領域結合データD4の取得>
 次に、線画処理装置1は、領域結合部22により、ステップS2にて取得した多階調化データD2と、ステップS3にて取得した細線化データD30と、ステップS4にて取得した領域分離データD3とから、領域結合データD4を取得する(ステップS5、図12参照)。領域結合部22の動作フローについて、以下に説明する。
 図15は、領域結合部22の動作フローを説明するための流れ図である。まず、領域結合部22は、位置情報取得部221により、ステップS3にて取得された領域分離データD3を参照して、細線化データD30に含まれる複数の閉領域のうち、所定の基準サイズ以下の閉領域を選択して、当該閉領域の重心位置の点(例えば、重心点P0)の位置情報を取得する(ステップS51、図9及び図10参照)。
 次に、領域結合部22は、階調値取得部222により、ステップS51にて取得した重心点から所定の距離基準で近接した複数の近接位置の点(例えば、近接点P1~P8)を設定する(ステップS52)。さらに、階調値取得部222は、重心点と複数の近接点とにそれぞれ対応する階調値(対応階調値)をステップS2にて取得した多階調化データD2から取得する(ステップS53)。
 次に、領域結合部22は、位置選択部223により、重心点の対応階調値と、当該複数の近接点の対応階調値との差分を算出し、重心点の対応階調値に最も近い対応階調値が、所定の基準値以下であるか否かを判定する(ステップS54)。
 ステップS54において、所定の基準値以下であると判定した場合(YESの場合)には、線画処理装置1は、位置選択部223により、当該最も近い対応階調値を有する近接点(例えば図10中、近接点P1)を選択する(ステップS55)。そして、領域結合部22は、重心点が含まれる閉領域と、選択された近接点が含まれる閉領域の境界線の一部を削除することにより、これら閉領域を結合させる(ステップS56、図11参照)。一方、ステップS54にて、最も近い対応階調値が所定の基準値を超えていた場合(NOの場合)には、線画処理装置1は、ステップS57へ処理を進める。
 次に、領域結合部22は、領域分離データD3を参照して、他に未処理の閉領域が存在するか否かを判断する(ステップS57)。例えば、領域分離データD3の処理済の閉領域について、フラグを設定することによって、各閉領域が処理済みかどうかを判断することも有効である。そして未処理の閉領域が存在する場合(YESの場合)には、領域結合部22は、ステップS51に戻って以降の動作を実行する。一方、すべての閉領域について処理が終了している場合(NOの場合)には、領域結合部22は、以上の結合処理の結果を領域結合データD4として記憶部11に格納する。
 以上が、線画処理装置1の動作フローの説明である。
 <1.3.効果>
 線画処理装置1によれば、線画の特徴(トーンなど線画に付された模様)を反映する多階調化データD2にもとづいて、複数の閉領域を合理的に結合させることができる。したがって、線画を彩色処理する場合などにおいて、比較的小さな閉領域(微少領域)を一つずつ選択して彩色するなどの手間を省くことができる。
 また、線画処理装置1によれば、微少領域が多数発生することを防止できるため、彩色作業時における未彩色領域の見落としを少なくすることができる。
 また、線画処理装置1によれば、細線化データD30(線画データD1の描画線を細線化処理して得られるデータ)から領域結合データD4を生成する。したがって、領域結合データD4に対して彩色して、線画データD1に嵌め込むことが可能であるため、線画データD1の描画線をはみ出して色が塗られるなどや、描画線にまで色が届いていないなどの彩色ミスを防止することができる。
 また、線画処理装置1によれば、閉領域の抽出作業などを自動化できるため、領域の抽出作業や彩色作業を効率化できる。
 <2. 第2の実施の形態>
 第1の実施の形態では、重心点P0から各方向について1つの近接点のみを設定していたが、さらに所定の処理を実行することによって、領域結合部22による結合処理の精度を向上させることができる。
 図16は、本発明の第2の実施の形態に係る領域結合部22による処理を説明するための図である。なお、図16では、図11に示した領域結合部22の処理について、さらなる処理(判定処理)を行う様子を示している。
 本実施の形態に係る領域結合部22は、位置選択部223によって近接点P1が選択された後、閉領域A0と他の閉領域A1とを結合させる際に(ステップS56、図15参照)、境界点距離DAの所定倍であって近接点距離DBよりも短い判定用近接点距離DBa分だけ、重心点P0から離れて位置する判定用近接点P1aをさらに設定する。なお、図16に示す例では、判定用近接点距離DBaが境界点距離DAの1.5倍となるように、判定用近接点P1aの位置が設定されている。また、図16に示すように、重心点P0、交差点P01、近接点P1及び判定用近接点P1aは、いずれも同一直線上であって、判定用近接点P1aが交差点P01と近接点P1の間に位置するように設定される。
 そして、領域結合部22は、近接位置P1の対応階調値と判定用近接点P1aの対応階調値とが一致するか否かを、差分をとることによって判断する(判定処理)。仮に、これらの対応階調値が一致しない場合であって、所定の基準値を超えるような差分が得られた場合には、領域結合部22は、結合処理を実行しない。それ以外の場合には、領域結合部22は閉領域A0と閉領域A1とを1の閉領域として結合する結合処理を実行する。
 以上のように、領域結合部22が当該判定用近接点P1aの対応階調値と近接点P1の対応階調値とを比較して判定する判定処理を実行することによって、閉領域A0をより確実に隣接する閉領域と結合させることが可能となるため、線画処理装置1は、より精度の高い結合処理を実行することができる。
 <3. 第3の実施の形態>
 上記実施の形態では、領域結合部22は、重心点P0と近接点P1~P8とのそれぞれの位置の対応階調値を基に、所定の距離基準で近接する2以上の閉領域を、それぞれの閉領域に対応する階調値の一致度に応じて結合処理すると説明した。しかし、結合方法はこれに限られるものではなく、他の方法で実現されていてもよい。なお、ここでは上記実施の形態と同一の構成については適宜同符号を付し、詳細を省略する。
 <領域結合部22a>
 本実施の形態に係る領域結合部22aは、着目した閉領域とこれに隣接する隣接閉領域とにそれぞれ対応する階調値を取得して比較することによって、領域の結合処理を実行する。
 図17は、第3の実施の形態に係る領域結合部22aが備える各機能ブロックを示す図である。また、図18は、領域結合部22aによる結合処理を説明するための一例を示す図である。図17に示すように、領域結合部22aは、主として隣接閉領域検出部224、平均階調値算出部225及び閉領域選択部226の各機能ブロックを備える。以下に、これら各機能ブロックについてそれぞれ説明する。
 <隣接閉領域検出部224>
 隣接閉領域検出部224は、所定の基準サイズよりも小さい閉領域を選択し、次いで当該閉領域に隣接する1以上の隣接閉領域を検出する機能を有する。具体的には、隣接閉領域検出部224は、第1の実施の形態で説明した位置情報取得部221と同様に、領域分離データD3の「閉曲線画素数」を参照することによって、所定の画素数(周長)以下の閉領域を選択する。
 そして隣接閉領域検出部224は、領域分離データD3の「芯線画素データ」を参照し、閉領域A0aの閉曲線を構成する画素のうち、他の閉領域の閉曲線の構成画素にもなっているような画素が存在するかどうかを検索する。これにより、閉領域A0aと隣接する隣接閉領域を検出する。
 例えば図18に示す例では、所定の基準サイズよりも小さい閉領域として閉領域A0aが選択されており、隣接閉領域検出部224によって、3つの隣接閉領域A1aないし3aが、閉領域A0の隣接閉領域として検出される。
 <平均階調値算出部225>
 平均階調算出部225は、所定の基準サイズよりも小さい閉領域A0aに含まれる画素の対応階調値を平均化した平均階調値と、1以上の隣接閉領域に含まれる画素の対応階調値を平均化した1以上の隣接平均階調値とを、それぞれ算出する。
 例えば図18に示す例では、平均階調算出部225が、多階調化データD2を参照することによって、閉領域A0aについての平均階調値「Ave0」と、隣接閉領域A1a,A2a,A3aについての隣接平均階調値「Ave1」、「Ave2」及び「Ave3」とを、それぞれ算出する。
 <閉領域選択部226>
 閉領域選択部226は、平均階調値算出部225により算出された1以上の隣接平均階調値のうち、着目した閉領域についての平均階調値に近い(すなわち、一致度が高い)隣接平均階調値を検出することによって、当該隣接平均階調値に対応する隣接閉領域を選択する機能を有する。
 なお、平均階調値の一致度の判定基準としては、比較すべき2つの領域の平均階調値の相違が所定の判定閾値を下回る場合に「一致度が高い」とする基準であってもよく、複数の隣接閉領域のそれぞれの隣接平均階調値のうち、着目した閉領域の平均階調値に最も近いものを「一致度が高い」とする相対的な判定基準であってもよい。また、隣接閉領域が複数存在するときには、後者の基準を採用し、隣接閉領域が一つだけのときには、前者の基準を用いるといった併用なども可能である。
 例えば図18に示す例では、閉領域選択部226は、閉領域A0aについての平均階調値「Ave0」と、閉領域A1a,A2a,A3aについての隣接平均階調値「Ave1」、「Ave2」及び「Ave3」との差分をそれぞれ算出する。そして、閉領域選択部226は、最も「Ave0」との差分が最も小さかった隣接平均階調値を検出し、当該隣接平均階調値に対応する隣接閉領域(例えば平均階調値「Ave1」が検出されれば、隣接閉領域A1a)を選択する。
 なお、閉領域選択部226は、差分を算出するのではなく、例えば除算を実行することによって、着目した閉領域についての平均階調値に最も近い値の隣接平均階調値を選択するように構成されていてもよい。また、好ましくは、最も近い値の隣接平均階調値であっても、所定の基準値以上に、着目した閉領域についての平均階調値と異なる場合には、当該隣接平均階調値を選択しないように閉領域選択部226を構成する。
 以上が、領域結合部22aが備える各機能ブロックについての説明である。
 これら各部の処理機能によって、領域結合部22aは、着目した閉領域に隣接する1以上の隣接閉領域の中から結合候補となる隣接閉領域を選択する。そして、領域結合部22aは、着目した閉領域と選択なった隣接閉領域との間に介在する境界線を削除することによって、これらの閉領域を1の閉領域として結合する。
 例えば図18に示す例において、閉領域選択部226により閉領域A0aの結合候補として隣接閉領域A1aが選択された場合には、閉領域A0aと隣接閉領域A1aとの間に介在する境界線の一部、または全部を削除する。これにより、閉領域A0aと隣接閉領域A1aとが、1の閉領域として結合される。
 なお、ここでいう「境界線」とは、閉領域A0aを囲む閉曲線と、隣接閉領域A1aの閉曲線とが重なっている部分を指す。また、「閉曲線」については、前述したように、曲線だけではなく折れ線を含む概念として定義される。
 そして、領域結合部22aは、結合した閉領域を囲む閉曲線のデータ(具体的には、当該閉曲線を構成する画素の位置データ)を取得する。そして全閉領域について処理を行った後、当該結果を領域結合データD4として記憶部11に格納する(図3参照)。
 領域結合部22aは、上記各機能ブロックの各処理を細線化データD3に対して繰り返し実行することで、所定の基準サイズよりも小さい閉領域を隣接する隣接閉領域と結合させる。これにより、微少な閉領域が多数発生することを抑制することができる。また、領域の結合処理は、線画の特徴(トーンや模様など)に応じて自動的に実行されるため、線画を彩色する際などにおける領域の切出作業などを効率的に行うことができる。
 また、本実施の形態によれば、領域結合部22aは、着目した閉領域に隣接する隣接閉領域から、結合候補を選択するため、確実に隣接する閉領域同士を結合させることができる。また、互いに隣接する閉領域であっても、平均化された対応階調値の一致度が低い場合には誤って結合されることを防止することができる。
 また、領域結合部22のように、一画素の対応階調値ではなく、各閉領域に含まれる画素の対応階調値の平均値を基にして比較を行うため、多階調化データD2に含まれるノイズの影響を受けるおそれをなくすことができる。また、上記第1の実施の形態や第2の実施の形態では、メディアンフィルタ処理203によるメディアンフィルタ処理を実行していたが(図5など参照)、本実施の形態では、メディアンフィルタ処理を実行することなく、例えば平均化データD202を多階調化データD2として使用することが可能である。
 <4. 第4の実施の形態>
 上記第3の実施の形態では、領域結合部22aが、所定の基準サイズよりも小さい閉領域A0aについての平均階調値Ave0と、隣接閉領域A1a,A2a,A3aについての隣接平均階調値Ave1,Ave2,Ave3とをそれぞれ比較し、最も差分の小さい平均階調値をもつ隣接閉領域を1つ選択することによって、閉領域の結合処理が実行されると説明した。しかし、結合処理の方法は、これに限られるものではない。
 <領域結合部22b>
 図19は、第4の実施の形態に係る領域結合部22bが備える各機能ブロックを示す図である。領域結合部22bは、主に隣接閉領域検出部224、平均階調値算出部225、閉領域選択部226a及び結合検査部227とを備える。なお、隣接閉領域検出部224及び平均階調値算出部225については、領域結合部22aが備える構成と同様であるため、詳細な説明を省略する。
 <閉領域選択部226a>
 閉領域選択部226aは、平均階調値算出部225により算出された1以上の平均階調値のうち、着目した閉領域についての平均階調値と所定の閾値基準(「第1閾値」と呼ぶ。)によって近似していると判断される(すなわち、一致度が高い)平均階調値を検出し、当該隣接平均階調値に対応する隣接閉領域を選択する機能を有する。より具体的には、閉領域選択部226aについて、図18を参照しつつ説明する。
 図18に示す例において、閉領域閉領域選択部226aは、まず、平均階調値Ave0と、隣接平均階調値Ave1,Ave2,Ave3とをそれぞれ比較する。この処理は、閉領域選択部226と同様である。そして、閉領域選択部226aは、隣接平均階調値Ave1,Ave2,Ave3のうちから、平均階調値Ave0との相違する量(ここでは差分)が所定の閾値以下である(すなわち、所定の閾値基準によって、一致度が高いとされる)近似隣接平均階調値を検出する。
 なお、ここでいう所定の閾値は、あらかじめ固定された固定値であってもよいし、処理すべき線画の状態(作風など)に応じて適宜設定されてもよい。また、減算による一致度の比較に限られるものではなく、例えば除算することによって比較がなされてもよい。
 このように、閉領域選択部226は、平均階調値Ave0と最も近い隣接平均階調値Ave1のみを検出するのに対して、閉領域選択部226aは、その他の隣接平均階調値Ave2,Ave3についても平均階調値Ave0と一致度が高いと判断される場合には、隣接平均階調値Ave1と同様に検出する。そして、閉領域選択部226aは、検出された隣接平均階調値(近似隣接平均階調値)に対応する隣接閉領域(近似隣接閉領域)を、閉領域A0aの結合候補領域として選択する。
 <結合検査部227>
 結合検査部227は、閉領域選択部226aによって選択された1以上の隣接閉領域において、互いに隣接する隣接閉領域がある場合に、それぞれの隣接閉領域についての平均階調値の一致度について検査する機能を有する。そして、所定の閾値基準(「第2閾値」と呼ぶ。)によって近似していると判断される(すなわち、一致度が高い)場合には、結合処理部22bは、閉領域選択部226aが選択した1以上の隣接閉領域と、着目した閉領域とを結合処理する。一方、一致度が低い場合には、一致度の低い閉領域については、結合処理を行わないものとする。すなわち、結合検査部227の検査結果に応じて、結合処理部22bは、結合処理を行う。より具体的には、図18を参照しつつ説明する。
 なお、ここでは、閉領域選択部226aが閉領域A0aとの結合候補として、全ての隣接閉領域A1a,A2a,A3aを選択した場合(すなわち、隣接平均階調値Ave1,Ave2,Ave3のいずれもが、Ave0と近似する近似隣接平均階調値である場合)を想定して説明する。この場合、結合検査部227は、選択した隣接閉領域A1a,A2a,A3aのうちの互いに隣接する隣接閉領域同士の平均階調値を比較する。すなわち、図18に示す例では、具体的には、「Ave1」と「Ave2」、「Ave2」と「Ave3」、「Ave3」と「Ave1」、をそれぞれ比較する。
 比較検査の結果、いずれもが所定の閾値以下の相違であれば(すなわち、一致度が高い場合)、結合検査部227は、「結合可」と判断する。すると、結合処理部22bは、閉領域A0aと、隣接閉領域A1a,A2a,A3aとを結合する処理を行う。
 一方、比較検査を行った結果、例えば、「Ave2」と「Ave3」が、所定の閾値を超えて相違する場合(すなわち、一致度が低い場合)、結合検査部227は、「結合不可」と判断する。すると、結合処理部22bは、隣接平均階調値Ave2,Ave3のうち、平均階調値Ave0とより近い方の平均階調値(ここでは「Ave2」)に対応する隣接閉領域(A2a)と、閉領域A0aとを結合させる。一方、一致度が低い隣接平均階調値(ここでは「Ave3」)に対応する隣接閉領域(A3a)については、結合処理部22bは、結合処理を行わない。
 以上のように、本実施の形態では、閉領域選択部226aは、一度に複数の結合候補である隣接閉領域を選択するため、オペレータが結合を意図しない隣接閉領域を選択するおそれがある。具体的には、図18に示す例において、仮に、「Ave2」と「Ave3」とが大きく相違する値であって、「Ave0」と「Ave2」、「Ave0」と「Ave3」が、それぞれ近似しているとした場合、隣接閉領域A2a,A3aは本来結合すべきではないにもかかわらず、閉領域A0aが隣接閉領域A2a,A3aにそれぞれ隣接するため、1の領域とされるおそれがある。
 ところが、本実施の形態では、比較検査部227を備えることによって、隣接閉領域A2a,A3aについての平均階調値Ave2,Ave3が比較され、結合すべきか否かが判断される。これにより、オペレータが意図しない領域の結合を防止できるため、閉領域の結合精度を高めることができる。なお、上述の第1閾値と第2閾値とは、同じ値であってもよいし、異なる値であってもよい。
 <5. 第5の実施の形態>
 上記実施の形態では、隣接閉領域検出部224は、着目した閉領域に隣接する隣接閉領域をすべて抽出するものとしているが、もちろんこれに限られるものではない。
 <領域結合部22c>
 図20は、第5の実施の形態に係る領域結合部22cが備える各機能ブロックを示す図である。本実施の形態に係る領域結合部22cは、主に隣接閉領域検出部224a、平均階調値算出部225および閉領域選択部226aを備える。
 <隣接閉領域検出部224a>
 隣接閉領域検出部224aは、まず、所定の基準サイズ(第1基準サイズとする。)よりも小さい閉領域を選択し、次いで当該閉領域に隣接する1以上の隣接閉領域のうちから、所定の基準サイズ(第2基準サイズとする。)よりも小さい隣接閉領域のみを検出する機能を有する。具体的には、隣接閉領域選択部224aは、隣接閉領域選択部224と同様に、領域分離データD3の「芯線画素データ」を参照して、隣接する閉領域を抽出し、当該隣接閉領域が所定の周長以下の場合であったのみ、結合候補として検出する。なお、第1基準と第2基準は、同じものであってもよいし、異なる基準サイズとしてもよい。
 図21は、細線化データD30の一部の一例を示す図である。図21に示す例では、小サイズの閉領域A4を挟んで、比較的大サイズの閉領域A5,A6が互いに隣接している。この場合、上記第4の実施の形態に係る領域結合部22bは、小閉領域A4、大閉領域A5,A6の全てを一つの領域として結合処理することが起こりえる。
 ところが、一般的に、大サイズの閉領域については、そもそも他の閉領域と統合する必要性は少なく、また、大きなサイズの閉領域同士を結合したことによる弊害も多い(例えば、線画の彩色処理時に、塗り分けができない等)。したがって、図21に示す例のように、小閉領域A4を挟んで、大閉領域A5,A6が隣接している場合には、大閉領域A5,A6を結合しないことが一般に望まれる。
 本実施の形態では、隣接閉領域検出部224aが、選択する隣接閉領域を所定の基準サイズ以下のものを選択するため、図21に示す、大きな隣接閉領域A5,A6の結合を防止することができる。
 <6. 変形例>
 以上、本発明の実施の形態について説明してきたが、本発明は上記実施の形態に限定されるものではなく様々な変形が可能である。
 例えば、第1および第2の実施の形態では、位置情報取得部221は、注目した閉領域A0についての重心の位置情報を取得しているが、これに限られるものではなく、例えば閉領域A0に含まれるのであれば、どのような所定点の位置情報を取得してもよい。
 また、第1および第2の実施の形態において、階調値取得部222において、それぞれの近接点距離DBが、境界点距離DAの2倍となるように設定しているが、これに限られるものではない。ただし、確実に閉領域A0の外側の領域にある近接点の対応階調値を取得するため、近接点距離DBが、境界点距離DAよりも大きくなるように近接点を設定するように、階調値取得部222を構成するのが望ましい。
 また、第1および第2の実施の形態において、位置選択部223では、差分をとることによって重心点P0と近接点P1~P8との各対応階調値の一致度を調べると説明したが、これに限られるものではなく、例えば除算することによって、近似する対応階調値を有する近接点を選択する構成であってもよい。
 また、第1および第2の実施の形態において、位置選択部223は、近接点P1~P8から、重心点P0の対応階調値と最も近い対応階調値を有する近接点を選択すると説明したが、これに限られるものではなく、例えば、差分が小さい(一致度が高い)のであれば、一度に複数の近接点を選択するように構成してもよい。
 また、上述のように、位置選択部223が複数の近接点を選択するように構成した場合には、結合検査部227のように、当該複数の近接点同士の対応階調値を比較検査して、当該近接点を選択するか否かを判断する処理機構を備えることで、結合処理の精度を高めることができる。また、結合処理部22が、位置選択部223により選択した近接点が含まれる閉領域うちから、所定サイズ以下の閉領域のみを着目領域と結合処理するように構成されてもよい。
 また、上記実施の形態において、領域分離データD3の構成は、図8に示すようなものに限られるものではなく、例えば、各閉領域の形状のデータがベクトル形式で表現されていてもよい。また、「閉曲線画素数」の代わりに、閉領域の閉曲線の内側に含まれる画素数を、当該閉領域の大きさ(面積)を示すデータとして領域分離データD3に記述されていてもよい。このような閉領域の「面積」を表すデータであっても、位置情報取得部221や隣接閉領域検出部224が、所定の基準サイズよりも小さい閉領域を選択する際に利用することができ、有効である。また、領域分離データD3に、各閉領域の重心位置情報などが含まれていてもよい。
 また、上記実施の形態では、線画処理装置1の各処理機能が、ソフトウェア的に実現されるが、各処理部を専用の回路に置き換えて構成することによって、ハードウェア的に線画処理機構が実現されてもよい。
 もちろん、上記実施形態及び各変形例で説明した各構成は、上述した以外にも、相互に矛盾しない限り適宜組合わせることができる。

Claims (10)

  1.  描画線により分離された閉領域を結合する線画処理装置(1)であって、
     デジタル化した線画データ(D1)を取得する線画データ取得部と、
     前記線画データを空間的に平滑化することにより、中間調の画素を持つ多階調化データ(D2)を取得する多階調化部(20)と、
     前記線画データから前記描画線を抽出することによって、前記描画線で囲まれる領域を複数の閉領域として分離する領域分離部(21)と、
     前記複数の閉領域のうち所定の距離基準で近接する2以上の閉領域を、それぞれの閉領域に対応する前記多階調化データの部分の階調値の一致度に応じて結合する領域結合部(22)と、
    を備えることを特徴とする線画処理装置。
  2.  請求項1に記載の線画処理装置であって、
     前記多階調化部は、
     画像データを縮小処理する縮小化部(201)、
    を含むことを特徴とする線画処理装置。
  3.  請求項1に記載の線画処理装置であって、
     前記多階調化部は、
     所定サイズのフィルタにより、各画素の値を多階調で平均化する平均化部(202)、
    を含むことを特徴とする線画処理装置。
  4.  請求項1に記載の線画処理装置であって、
     前記多階調化部は、
     注目画素の近傍の画素の各階調値を取得して、前記各階調値から中央値を取得し、当該中央値を前記注目画素の階調値とするメディアンフィルタ処理部(203)、
    を含むことを特徴とする線画処理装置。
  5.  請求項1に記載の線画処理装置であって、
     前記領域分離部は、
     前記線画データから前記描画線の芯線を抽出し、当該芯線で囲まれる領域を複数の閉領域として分離することを特徴とする線画処理装置。
  6.  請求項5に記載の線画処理装置であって、
     前記領域結合部は、
     前記複数の閉領域のうち、所定の基準サイズよりも小さい第1閉領域を選択し、当該第1閉領域内に含まれる第1位置の位置情報を取得する位置情報取得部(221)と、
     前記第1位置に対応する第1階調値と、前記第1位置から前記所定の距離基準で近接する2以上の近接位置に対応する複数の階調値とを、それぞれ前記多階調化データから取得する階調値取得部(222)と、
     前記複数の階調値のうち、前記第1階調値と一致度が高い階調値を検出することによって、当該階調値を有する第2位置を選択する位置選択部(223)と、
    を含み、
     前記第1位置を含む前記第1閉領域と前記2位置を含む第2閉領域との間に介在する境界線を削除することによって、前記第1閉領域と前記第2閉領域とを1の閉領域として結合させることを特徴とする線画処理装置。
  7.  請求項5に記載の線画処理装置であって、
     前記領域結合部は、
     前記複数の閉領域のうち、所定の基準サイズよりも小さい第3閉領域を選択し、当該第3閉領域に隣接する1以上の隣接閉領域を検出する隣接閉領域検出部(224)と、
     前記第3閉領域に含まれる画素に対応する階調値を前記多階調化データから取得して平均化した第3平均階調値と、前記1以上の隣接閉領域に含まれる画素に対応する階調値を前記多階調化データからそれぞれ取得して平均化した1以上の隣接平均階調値を算出する平均階調値算出部(225)と、
     前記1以上の隣接平均階調値のうち、所定の判定基準によって前記第3平均階調値との一致度が高いと判定される1以上の近似隣接平均階調値を検出し、前記1以上の隣接閉領域のうちから前記1以上の近似隣接平均階調値にそれぞれ対応する1以上の近似隣接閉領域を選択する閉領域選択部(226)と、
    を含むことを特徴とする線画処理装置。
  8.  請求項7に記載の線画処理装置であって、
     前記領域結合部は、
     前記1以上の近似隣接閉領域のうち互いに隣接する近似隣接閉領域についての前記近似隣接平均階調値を比較する比較検査部(227)、
    を含み、
     前記比較検査部による比較検査の結果に応じて、前記第3閉領域と前記1以上の近似隣接閉領域とを結合させることを特徴とする線画処理装置。
  9.  コンピュータによって実行可能なプログラムであって、
     前記コンピュータによる実行は、前記コンピュータを、
     デジタル化した線画データ(D1)を取得する線画データ取得部と、
     前記線画データを空間的に平滑化することにより、中間調の画素を持つ多階調化データ(D2)を取得する多階調化部(20)と、
     前記線画データから前記描画線を抽出することによって、前記描画線で囲まれる領域を複数の閉領域として分離する領域分離部(21)と、
     前記複数の閉領域のうち所定の距離基準で近接する2以上の閉領域を、それぞれの閉領域に対応する前記多階調化データの部分の階調値の一致度に応じて結合する領域結合部(22)と、
    を備える線画処理装置(1)として機能させることを特徴とするプログラム。
  10.  描画線により分離された閉領域を結合する線画処理方法であって、
     (a) デジタル化した線画データ(D1)を取得する工程と、
     (b) 前記線画データを空間的に平滑化することにより、中間調の画素を持つ多階調化データ(D2)を取得する工程と、
     (c) 前記線画データから描画線を抽出することによって、前記描画線で囲まれる領域を複数の閉領域として分離する工程と、
     (d) 前記複数の閉領域のうち所定の距離基準で近接する2以上の閉領域を、それぞれの閉領域に対応する前記多階調化データの部分の階調値の一致度に応じて結合する工程と、
    を有することを特徴とする線画処理方法。
PCT/JP2008/072272 2008-02-21 2008-12-08 線画処理装置、プログラム及び線画処理方法 WO2009104325A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US12/520,963 US20110187721A1 (en) 2008-02-21 2008-12-08 Line drawing processing apparatus, storage medium storing a computer-readable program, and line drawing processing method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008-039992 2008-02-21
JP2008039992A JP2009199308A (ja) 2008-02-21 2008-02-21 線画処理装置、プログラム及び線画処理方法

Publications (1)

Publication Number Publication Date
WO2009104325A1 true WO2009104325A1 (ja) 2009-08-27

Family

ID=40985217

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2008/072272 WO2009104325A1 (ja) 2008-02-21 2008-12-08 線画処理装置、プログラム及び線画処理方法

Country Status (4)

Country Link
US (1) US20110187721A1 (ja)
JP (1) JP2009199308A (ja)
TW (1) TW200937342A (ja)
WO (1) WO2009104325A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110148897A1 (en) * 2009-12-10 2011-06-23 The Chinese University Of Hong Kong Apparatus and methods for processing images

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2504966A (en) 2012-08-15 2014-02-19 Ibm Data plot processing
CN111951290B (zh) * 2019-05-16 2023-11-03 杭州睿琪软件有限公司 一种图像中物体的边缘检测方法及装置
CN111161373B (zh) * 2019-12-09 2022-06-03 北京理工大学 一种基于正弦曲线灰度显示的绘画方法
CN111913644B (zh) * 2020-07-29 2022-06-24 北京大麦地信息技术有限公司 一种白板的线条绘制方法及装置、可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005165969A (ja) * 2003-12-05 2005-06-23 Canon Inc 画像処理装置、及び方法
JP2006031688A (ja) * 2004-06-16 2006-02-02 Atsushi Kasao 画像加工装置、画像加工方法及び画像加工プログラム
JP2006078299A (ja) * 2004-09-09 2006-03-23 Dainippon Screen Mfg Co Ltd 画像領域の抽出による画像の領域分割
JP2006208339A (ja) * 2005-01-31 2006-08-10 Olympus Corp 領域抽出装置、顕微鏡システムおよび領域抽出プログラム

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3865165B2 (ja) * 1996-10-30 2007-01-10 株式会社沖データ 画像データの拡大/縮小方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005165969A (ja) * 2003-12-05 2005-06-23 Canon Inc 画像処理装置、及び方法
JP2006031688A (ja) * 2004-06-16 2006-02-02 Atsushi Kasao 画像加工装置、画像加工方法及び画像加工プログラム
JP2006078299A (ja) * 2004-09-09 2006-03-23 Dainippon Screen Mfg Co Ltd 画像領域の抽出による画像の領域分割
JP2006208339A (ja) * 2005-01-31 2006-08-10 Olympus Corp 領域抽出装置、顕微鏡システムおよび領域抽出プログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
EIJI OKANO ET AL.: "Tegaki Gazo tono Matching ni yoru Gazo Kensaku", IEICE TECHNICAL REPORT, IE93-89-97, GAZO KOGAKU, vol. 93, no. 450, 27 January 1994 (1994-01-27), pages 53 - 60 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110148897A1 (en) * 2009-12-10 2011-06-23 The Chinese University Of Hong Kong Apparatus and methods for processing images

Also Published As

Publication number Publication date
TW200937342A (en) 2009-09-01
US20110187721A1 (en) 2011-08-04
JP2009199308A (ja) 2009-09-03

Similar Documents

Publication Publication Date Title
US20070253040A1 (en) Color scanning to enhance bitonal image
US20030179935A1 (en) Image processing apparatus, image processing method, image processing program, and computer-readable record medium storing image processing program
JP5387193B2 (ja) 画像処理システム、画像処理装置およびプログラム
JP2001109895A (ja) 複数のディジタル画像の処理方法
JP2002142128A (ja) 画像処理装置及び記録媒体
JP2001101426A (ja) ディジタル画像処理方法
WO2009104325A1 (ja) 線画処理装置、プログラム及び線画処理方法
JP4772819B2 (ja) 画像検索装置および画像検索方法
JP2008052602A (ja) 画像濃度変換方法、画像強調処理装置、およびそのプログラム
JP2011013898A (ja) 画像処理装置、画像処理方法、及び、プログラム
US6360006B1 (en) Color block selection
JP4942623B2 (ja) 彩色処理装置、彩色処理方法およびプログラム
JP3438440B2 (ja) 画像処理装置
JP2006279442A (ja) 画像処理方法および装置並びにプログラム
JP4804382B2 (ja) 画像処理方法、画像処理プログラムおよび画像処理装置
US7020328B2 (en) Electronic color dropout utilizing spatial context to enhance accuracy
JP4441300B2 (ja) 画像処理装置、画像処理方法、画像処理プログラムおよびこのプログラムを記憶した記録媒体
JP2004120092A (ja) 画像処理装置、画像処理システム、画像処理方法、記憶媒体、及びプログラム
JP2004199622A (ja) 画像処理装置、画像処理方法、記録媒体およびプログラム
CN111062924A (zh) 图像处理方法、装置、终端和存储介质
JP2008158847A (ja) 画像配信装置および画像配信方法
JP3897306B2 (ja) 地理画像間変化領域の抽出の支援方法及び地理画像間変化領域の抽出を支援可能なプログラム
JP5395722B2 (ja) 線画処理装置、線画処理方法およびプログラム
JP2009272665A (ja) 画像処理装置、画像処理方法およびプログラム
JP5149034B2 (ja) 線画処理装置、プログラムおよび線画処理方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 12520963

Country of ref document: US

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08872636

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08872636

Country of ref document: EP

Kind code of ref document: A1