Computer program, image processing device, and image processing method
Patent Information
- Application Number
- JP2020206379
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-12-12
- Publication Date
- 2025-02-20
- Estimated Expiration
- 2040-12-12
Smart Images

Figure 0007633589000001 
Figure 0007633589000002 
Figure 0007633589000003
Abstract
Description
[Technical field]
[0001] This specification relates to techniques for identifying edges of objects in an image. [Background technology]
[0002] It is common to specify edges of objects in an image. For example, an appearance inspection device described in Patent Document 1 specifies edges in a captured image of an object to be inspected, specifies edges in a model image of the object to be inspected, and compares these edges to specify the position and orientation of the object to be inspected in the captured image. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2017-96750 A [Patent Document 2] JP 2010-197336 A Summary of the Invention [Problem to be solved by the invention]
[0004] However, the above-mentioned technique does not provide sufficient ingenuity for identifying the edges of the target object with high accuracy. For this reason, for example, depending on the configuration of a part of the image that is different from the target object, many edges of that part may be detected together with the edges of the specific object. In this case, it is not possible to identify only the edges of the specific object with high accuracy.
[0005] This specification discloses a technique that can accurately identify the edges of objects in an image. [Means for solving the problem]
[0006] The technology disclosed in this specification can be realized in the following application examples.
[0007] [Application Example 1] A computer program that causes a computer to execute the following steps: an image acquisition process that acquires target image data indicative of a target image; a region setting process that sets a plurality of large regions and a plurality of small regions smaller than the large regions within the target image, where the small regions and the large regions each include a plurality of pixels; a calculation process that calculates a first feature amount for each of the plurality of small regions and a second feature amount for each of the plurality of large regions, where the first feature amount is calculated using values of a plurality of pixels in the small regions and the second feature amount is calculated using values of a plurality of pixels in the large region; a determination process that determines for each of the plurality of small regions whether the small region is an edge region including an edge based on a comparison between the first feature amount of the small region and the second feature amount of the large region that includes the small region; and a generation process that generates edge image data indicative of edges in the target image using a result of the determination of whether the small region is an edge region.
[0008] The second feature of the large region tends to reflect the overall feature of the target image, and the first feature of the small region tends to reflect the local feature of the target image. According to the above configuration, whether or not the small region is an edge region including an edge is determined based on a comparison between the first feature of the small region and the second feature of the large region. As a result, the edge of an object in the image can be identified with high accuracy. For example, since a small region including an edge different from edges distributed throughout the target image can be identified with high accuracy, a small region including an edge of an object existing in a part of the image can be identified separately from an area including only edges that extend throughout the entire image.
[0009] The technology disclosed in this specification can be realized in various forms, for example, in the form of an image processing method, an image processing device, a computer program for realizing the functions of the method or device, a recording medium on which the computer program is recorded (e.g., a non-temporary recording medium), etc. [Brief description of the drawings]
[0010] [Figure 1] FIG. 1 is a block diagram showing the configuration of a printing system 1000 according to an embodiment. [Diagram 2] FIG. 1 is a perspective view showing a schematic configuration of a printing system 1000. [Diagram 3] 4 is a flowchart of a template registration process and a print process. [Figure 4] FIG. 4 is a diagram showing an example of an image used in the present embodiment. [Diagram 5] 13 is a flowchart of matching pre-processing. [Figure 6] FIG. 11 is a diagram showing an example of an image used in matching pre-processing. [Figure 7] 13 is a flowchart of a local edge region determination process. [Figure 8] FIG. 4 is an explanatory diagram of a plurality of blocks arranged on a target image. [Figure 9] FIG. 4 is an explanatory diagram of local edge region data. [Figure 10] FIG. 13 is a diagram showing an example of a histogram. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] A. First Example: A-1: Configuration of the printing system 1000 Next, an embodiment will be described based on an example. Fig. 1 is a block diagram showing the configuration of a printing system 1000 of the example. The printing system 1000 includes a printer 200, a terminal device 300 as an image processing device of the example, and an imaging device 400. The printer 200 and the terminal device 300, and the imaging device 400 and the terminal device 300 are connected so as to be able to communicate with each other.
[0012] The terminal device 300 is a computer used by a user of the printer 200, such as a personal computer or a smartphone. The terminal device 300 includes a CPU 310 as a controller of the terminal device 300, a non-volatile storage device 320 such as a hard disk drive, a volatile storage device 330 such as a RAM, an operation unit 360 such as a mouse or a keyboard, a display unit 370 such as a liquid crystal display, and a communication unit 380. The communication unit 380 includes a wired or wireless interface for communicatively connecting to an external device, such as the printer 200 or the imaging device 400.
[0013] The volatile storage device 330 provides a buffer area 331 for temporarily storing various intermediate data generated when the CPU 310 performs processing. The non-volatile storage device 320 stores a computer program PG1. The computer program PG1 is provided by the manufacturer of the printer 200, for example, in a form downloaded from a server or stored on a DVD-ROM or the like. The CPU 310 executes the computer program PG1 to function as a printer driver that controls the printer 200. The CPU 310 as the printer driver executes, for example, a template registration process and a printing process, which will be described later.
[0014] The imaging device 400 is a digital camera that optically captures an image of a subject to generate image data (also called captured image data) representing the subject. The imaging device 400 generates the captured image data and transmits it to the terminal device 300 under the control of the terminal device 300.
[0015] The printer 200 includes, for example, a print mechanism 100, a CPU 210 as a controller for the printer 200, a non-volatile storage device 220 such as a hard disk drive, a volatile storage device 230 such as a RAM, an operation unit 260 such as buttons or a touch panel for acquiring operations by a user, a display unit 270 such as a liquid crystal display, and a communication unit 280. The communication unit 280 includes a wired or wireless interface for communicatively connecting to an external device, for example, a terminal device 300.
[0016] The volatile storage device 230 provides a buffer area 231 for temporarily storing various intermediate data generated when the CPU 210 performs processing. The non-volatile storage device 220 stores a computer program PG2. In this embodiment, the computer program PG2 is a control program for controlling the printer 200, and may be stored in the non-volatile storage device 220 when the printer 200 is shipped and provided. Alternatively, the computer program PG2 may be provided in a form downloaded from a server, or in a form stored in a DVD-ROM or the like. By executing the computer program PG2, for example, the CPU 210 controls the printing mechanism 100 according to print data transmitted from the terminal device 300 by a printing process described later, and prints an image on a print medium. Note that the printer 200 of this embodiment assumes fabric as the print medium, and can print an image on, for example, clothing S such as a T-shirt (see FIG. 2).
[0017] The printing mechanism 100 is an inkjet printing mechanism that performs printing by ejecting ink (droplets) of each of the colors C, M, Y, and K. The printing mechanism 100 includes a print head 110, a head driving unit 120, a main scanning unit 130, and a transport unit 140.
[0018] Further description will be made with reference to Fig. 2. Fig. 2 is a perspective view showing a schematic configuration of the printing system 1000. The +X direction, -X direction, +Y direction, -Y direction, +Z direction, and -Z direction in Fig. 2 are the left, right, front, rear, upper, and lower sides of the printer 200, respectively.
[0019] The main scanning unit 130 uses the power of a main scanning motor (not shown) inside the housing 201 to reciprocate a carriage (not shown) carrying the print head 110 along the main scanning direction (X direction in FIG. 2). This achieves main scanning by reciprocating the print head 110 along the main scanning direction (X direction) relative to a print medium such as clothing S.
[0020] The transport unit 140 includes a platen 142 and a tray 144 provided at the center of the housing 201 in the X direction. The top surface (surface in the +Z direction) of the plate-shaped platen 142 is a placement surface for placing a print medium such as clothes S. The platen 142 is fixed to a plate-shaped tray 144 arranged in the -Z direction of the platen 142. The tray 144 is one size larger than the platen 142. The platen 142 and the tray 144 hold the print medium such as clothes S. The platen 142 and the tray 144 are transported in a transport direction (Y direction in FIG. 2) intersecting the main operation direction by using the power of a sub-scanning motor (not shown). This realizes a sub-scan that transports the print medium such as clothes S in the transport direction relative to the print head 110.
[0021] The head drive unit 120 (FIG. 1) supplies a drive signal to the print head 110 to drive the print head 110 while the main scanning unit 130 is performing a main scan of the print head 110. The print head 110 has a plurality of nozzles (not shown), and ejects ink to form dots on a printing medium transported by a transport unit 140 in accordance with the drive signal.
[0022] 2, the imaging device 400 is supported by a support (not shown) and disposed in the +Z direction of the printer 200. The imaging device 400 is located at a location away from the printer 200, is provided facing the upper surface of the platen 142, and is capable of capturing an image of a print medium such as clothing S placed on the upper surface of the platen 142. This allows the imaging device 400 to generate captured image data that shows an image including a print medium such as clothing S.
[0023] A-2. Operation of the Printing System 1000 The operation of the printing system 1000 will be described. The printing system 1000 prints a predetermined image (for example, a pattern or a logo) on a print target area, which is a part of the clothing S as a print medium. In this embodiment, as shown in FIG. 2, the clothing S is a T-shirt, and the print target area is an area including a chest pocket PC provided on the T-shirt. The clothing S is placed on the platen 142, for example, by an operator. At that time, it is difficult to accurately place the clothing S on the platen so that the chest pocket PC is always placed in the same position on the platen 142. For this reason, the printing system 1000 has a function of specifying, as the print target area on the platen 142 on which the clothing S is placed, an area including the chest pocket PC, and performing printing on the specified print target area.
[0024] A-2-1. Template registration process The template registration process is a process for generating template image data for identifying a print target area in which a chest pocket PC is located in a print process described below, using a sample garment S. The sample garment S is, for example, one of multiple garments S to be printed.
[0025] 3(A) is a flowchart of the template registration process. The template registration process is started when, for example, sample clothing S is placed on platen 142 and the clothing S placed on platen 142 is in a state where it can be photographed from above by imaging device 400, and the user inputs a start command to terminal device 300. The template registration process is executed by CPU 310 of terminal device 300.
[0026] In S100, the CPU 310 acquires captured image data of the sample clothing S from the imaging device 400. Specifically, the CPU 310 transmits an imaging instruction to the imaging device 400. The imaging device 400 captures an image of the sample clothing S placed on the platen 142, generates captured image data, and transmits the captured image data to the terminal device 300. The captured image data is image data that includes, for example, a plurality of RGB values corresponding to a plurality of pixels, and indicates the color of each pixel by the RGB values. The RGB values are color values of the RGB color system that include three component values of RGB. The captured image data of the sample clothing S acquired in this step is also called sample image data, and the image indicated by the sample image data is also called a sample image.
[0027] Fig. 4 is a diagram showing an example of an image used in this embodiment. As shown in Fig. 4, the left-right direction of the image corresponds to the main scanning direction of the printer 200 (X direction in Fig. 2), and the up-down direction of the image corresponds to the transport direction of the printer 200 (Y direction in Fig. 2). Fig. 4(A) shows an example of a sample image It shown by sample image data. The sample image It includes an image showing a sample garment S placed on the platen 142. Hereinafter, the image showing the sample garment S included in the sample image It will be simply referred to as "garment St", and the image showing the chest pocket PC will be simply referred to as "chest pocket PCt".
[0028] In S105, the CPU 310 crops the print target area PAt in the sample image It based on the user's instruction. For example, the CPU 310 displays a user interface (UI) screen (not shown) on the display unit 370. The user inputs an instruction to specify the print target area PAt in the sample image It on the UI screen using a pointing device such as a mouse. In the example of FIG. 4(A), the print target area PAt including the chest pocket PC of the clothing St is illustrated. The CPU 310 executes a cropping process on the sample image data to generate partial sample image data corresponding to the print target area PAt. FIG. 4(B) illustrates an example of a partial sample image PIt indicated by the partial sample image data.
[0029] In S110, the CPU 310 performs matching pre-processing on the partial sample image data to generate processed partial sample image data. The processed partial sample image data is a process for extracting edges of objects (e.g., chest pocket PCt) in the image for the matching process described later. The matching pre-processing will be described later in detail. The processed partial sample image data is binary image data that indicates edge pixels and non-edge pixels for each pixel.
[0030] In S115, the CPU 310 stores the processed partial sample image data as template image data in the non-volatile storage device 220. An example of a template image TI represented by the template image data is shown in Fig. 4(C). The template image TI includes an edge Egt of an object in the partial sample image PIt, which in the example of Fig. 4(C) shows an edge Egt indicating the outer edge of the breast pocket PCt.
[0031] A-2-2. Printing process The printing process is a process in which a predetermined image (e.g., a pattern or logo) is printed on a print target area, which is a part of the clothing S as a printing medium, using the printer 200. FIG. 3(B) is a flowchart of the printing process. The printing process is started when the clothing S as a printing medium is placed on the platen 142, and the user inputs a start command to the terminal device 300 in a state in which the clothing S placed on the platen 142 can be photographed from above by the imaging device 400. The printing process is executed by the CPU 310 of the terminal device 300.
[0032] In S200, the CPU 310 acquires captured image data of the clothing S, which is a print medium, from the imaging device 400. The acquisition method is the same as that in S100 of Fig. 3(A). The captured image data of the clothing S, which is a print medium, acquired in this step is also called medium image data, and the image shown by the medium image data is also called a medium image.
[0033] 4(D) shows an example of a medium image Is shown by the medium image data. The medium image Is includes an image showing a sample garment S placed on the platen 142, similar to the sample image It. Hereinafter, the image showing the sample garment S included in the medium image Is will be simply referred to as "garment Ss," and the image showing the chest pocket PC will be simply referred to as "chest pocket PCs."
[0034] In S205, the CPU 310 performs matching pre-processing on the acquired media image data to generate processed media image data. The processed media image data is binary image data that indicates edge pixels and non-edge pixels for each pixel. The matching pre-processing is the same processing as S100 in FIG. 3(A), and its details will be described later. FIG. 4(E) illustrates a processed media image SI represented by the processed media image data. The processed media image SI includes edges Egs of objects in the media image Is, and in the example of FIG. 4(E), edges Egs that indicate the outer edges of the clothes Ss and the chest pocket PCs.
[0035] In S210, the CPU 310 executes a matching process to identify the print target area PAs in the processed medium image SI. The matching process is executed using the processed medium image data and the template image data (processed partial sample image data). The matching process is a process for determining the positional relationship between the processed medium image SI and the template image TI. The matching process is executed, for example, using a known pattern matching algorithm. For example, the pattern matching is a method for calculating the similarity between the two images SI and TI in the area where the processed medium image SI and the template image TI overlap while changing the positional relationship between the processed medium image SI and the template image TI, and searching for the positional relationship with the highest similarity. For example, the similarity between the two images SI and TI is determined by the number of pixels that overlap the edge pixels of the template image TI among the multiple edge pixels of the processed medium image SI.
[0036] The positional relationship between the two images SI and TI is indicated, for example, by the position (coordinates) of the template image TI relative to the processed medium image SI and the inclination (angle) of the template image TI relative to the processed medium image SI. The positional relationship may further include the size (scale) of the template image TI relative to the processed medium image SI. In FIG. 4(E), the rectangle indicated by the dashed line indicates the template image TI arranged on the processed medium image SI in a positional relationship determined by pattern matching. The CPU 310 specifies the print target area PAs based on the specified positional relationship. For example, the area of the template image TI superimposed on the processed medium image SI in the specified positional relationship (FIG. 4(E)) is specified as the print target area PAs. Note that the processed medium image SI and the medium image Is have a corresponding relationship, so specifying the print target area PAs in the processed medium image SI is equivalent to specifying the print target area PAs in the medium image Is.
[0037] In S210, the CPU 310 positions the print image (e.g., a pattern or logo) based on the specified print target area PAs and executes printing. For example, the CPU 310 generates print data and sends it to the printer 200 so that the print image is printed in an area on the garment S that corresponds to the print target area PAs specified in the processed medium image SI (e.g., an area of a chest pocket PC). The printer 200 controls the printing mechanism 100 according to the received print data to print the image on the garment S.
[0038] A-2-3. Matching pre-processing The matching pre-processing of S110 in Fig. 3(A) and S205 in Fig. 3(B) will be described. As described above, the matching pre-processing of S110 in Fig. 3(A) is executed with partial sample image data as target image data. As described above, the matching pre-processing of S205 in Fig. 3(B) is executed with medium image data as target image data. In the following, an example will be described in which the medium image data is the target image data.
[0039] 5 is a flowchart of the matching pre-processing. In S300, the CPU 310 executes edge detection processing on the target image data. The edge detection processing is a process of detecting edge pixels from among a plurality of pixels in the target image represented by the target image data, and generating edge image data indicating the detection result. The edge image data is binary image data indicating whether each pixel is an edge pixel or a non-edge pixel. Here, the edge image data generated in S300 is also called simple edge image data in order to distinguish it from local edge image data described later.
[0040] The edge pixel detection method may be various methods. In this embodiment, the Canny Edge method is used, which is preferable for detecting edge pixels that indicate the contour of an object in an image. Alternatively, for example, a method may be used in which edge strength is calculated using a Laplacian filter or a Sobel filter, and pixels whose edge strength is greater than a threshold value TH1 are detected as edge pixels.
[0041] FIG. 6 is a diagram showing an example of an image used in the matching pre-processing. FIG. 6(A) shows an example of a simple edge image EI shown by simple edge image data. The dashed area in the simple edge image EI is a pocket existence area AA including the chest pocket PCs of the clothing Ss in FIG. 4(D). The simple edge image EI includes edge pixels constituting the edges of the outer edges of the clothing Ss and the chest pocket PCs, but also includes a large number of edge pixels distributed throughout the clothing Ss. The large number of edge pixels distributed are edge pixels constituting the edges of fine structures such as the fabric of the clothing Ss. Hereinafter, edges that show the characteristics of objects that exist locally in an image, such as the edges of the outer edges of the clothing Ss and the chest pocket PCs, are also referred to as local edges, and edge pixels that constitute local edges are also referred to as local edge pixels. Edges that exist distributed in an image, such as the edges of fine structures such as the fabric of the clothing Ss, are also referred to as distributed edges, and edge pixels that constitute distributed edges are also referred to as distributed edge pixels. In order to identify an object (e.g., a pocket PC) that exists locally in an image by a matching process such as pattern matching, it is preferable to detect only local edge pixels and not scattered edge pixels. If a matching process is performed using simple edge image data, the scattered edges become noise, making it difficult to perform accurate matching.
[0042] In S310, the CPU 310 executes a local edge region determination process using the target image data. The local edge region determination process is a process for determining whether each of a plurality of small regions set in the target image (for example, the partial sample image PIt or the medium image Is) is a local edge region, and generating local edge region data indicating the determination result for each small region. Here, a local edge region is a region in which the possibility of the above-mentioned local edge pixel being present is higher than in a non-local edge region.
[0043] 7 is a flowchart of the local edge region determination process. In S410, CPU 310 converts the RGB values of each pixel of the target image data, which is RGB image data, into a luminance value, thereby converting the target image data from RGB image data to luminance image data. The luminance value of each pixel is, for example, a value of 256 gradations from 0 to 255. A known formula is used as the formula for converting the RGB values into luminance values.
[0044] In S415, the CPU 310 sets a large block of interest in a target image (for example, a medium image Is). FIG. 8 is an explanatory diagram of a plurality of blocks arranged on a target image. FIG. 8(A) illustrates a large block LB arranged on a medium image Is, which is an example of a target image. The numbers in parentheses attached to the symbols of the large blocks LB in FIG. 8(A) are numbers that identify each large block LB. FIG. 8(B) illustrates one large block LB. The number of pixels Wl in the X direction and the number of pixels Hl in the Y direction of one large block are, for example, 36 to 180. The shape of the large block LB is rectangular, and in this embodiment, it is square (Wl=Hl).
[0045] In this embodiment, the first large block of interest is the large block LB(1) at the top left of FIG. 8(A). One large block LB is a rectangular area including K pixels (K is an integer equal to or greater than 2). After the processes of S420 to S460 are completed for the first large block of interest (LB(1) in FIG. 8(A)), the second large block of interest set is the large block LB(2) in FIG. 8(A). The large block LB(2) is shifted by (Wl / 2) pixels in the +X direction with respect to the large block LB(1). Therefore, the +X half of the large block LB(1) and the -X half of the large block LB(2) overlap. In this way, the CPU 310 sequentially sets the large block of interest while shifting by (Wl / 2) pixels in the +X direction until it reaches the end of the medium image Is, which is the target image, in the +X direction. In the example of Fig. 8(A), large blocks LB(1), LB(2), LB(3) ... LB(p-1), LB(p) are successively set as target large blocks in the first row. The +X side end of the first large block LB(1) is adjacent to the -X side end of the third large block LB(3).
[0046] Next to the large block LB(p) at the end of the +X direction of the first row, the first large block LB(p+1) on the second row is set as the large block of interest. Large block LB(p+1) is shifted by (Hl / 2) pixels in the -Y direction with respect to the first large block LB(1) on the first row. Therefore, the -Y half of large block LB(1) overlaps with the +Y half of large block LB(p+1). The multiple large blocks LB on the second row are set with a shift of (Wl / 2) pixels in the +X direction, similar to the large block LB on the first row.
[0047] The CPU 310 sequentially sets the row of the target large block while shifting by (Hl / 2) pixels in the -Y direction until it reaches the end in the -Y direction of the medium image Is, which is the target image. Fig. 8(A) shows the first large block LB(q) and the second-to-last and last large blocks LB(e-1) and LB(e) of the multiple large blocks LB in the last row located at the end in the -Y direction.
[0048] In S420, the CPU 310 acquires the median M of the luminance values of the K pixels of the large block of interest as the feature value of the large block of interest. For example, when K is an even number, the median M is the average value of the (2 / K)th luminance value and the {(2 / K)+1}th luminance value when the luminance values of the K pixels are sorted in descending order. When K is an odd number, the median M is the {(K+1) / 2}th luminance value when the luminance values of the K pixels are sorted in descending order.
[0049] In S425, the CPU 310 sets a plurality of small blocks SB in the large block of interest. Figure 8(B) shows nine small blocks SB set in the large block LB. As shown in Figure 8(B), in this embodiment, the large block of interest (for example, the large block LB in Figure 8(B)) is divided into nine regions, and nine small blocks SB arranged in a matrix of three columns and three rows are set in one large block of interest. Therefore, in this embodiment, the number of pixels Ws in the X direction of the small block SB is (1 / 3) the number of pixels Wl in the X direction of the large block LB, and the number of pixels Hs in the Y direction of the small block SB is (1 / 3) the number of pixels Hl in the Y direction of the large block LB. The number of pixels N of the small block SB is (Ws x Hs).
[0050] In S430, the CPU 310 selects one small block of interest from among a plurality of small blocks SB (nine in this embodiment) set in the large block of interest.
[0051] In S435, CPU 310 calculates the total luminance value T of K pixels in the small block of interest. In S440, CPU 310 judges whether the difference {(M×N)-T} between the total luminance value T of the small block of interest and the value (M×N) obtained by multiplying the median value M of the large block of interest by the number of pixels N of the small block of interest is greater than a predetermined threshold value TH. This judgment is equivalent to a judgment of whether the difference {M-(T / N)} between the median value M of the block of interest and the average value (T / N) of the luminance values of the small block of interest is greater than a threshold value (TH / N).
[0052] If the difference {(M×N)-T} is greater than the threshold value TH (S440: YES), in S445, the CPU 310 determines that the target small block is a local edge region. In this case, in S455, the CPU 310 updates the local edge region data. FIG. 9 is an explanatory diagram of local edge region data. FIG. 9(A) illustrates a portion of a medium image Is. FIG. 9(B) illustrates a portion of a local edge region image AI indicated by the local edge region data. The portion of the local edge region image AI in FIG. 9(B) corresponds to a portion of the medium image Is in FIG. 9(A).
[0053] As described above, the large blocks LB set in the medium image Is are set in the X direction and the Y direction, shifted by half the number of pixels in the X direction and the Y direction, respectively. For this reason, each small block SB also partially overlaps with the adjacent small block SB. For example, the small block SB in the large block LB of an odd-numbered row overlaps with the small block in the large block LB of an even-numbered row adjacent in the X direction. The small block SB in the large block LB of an odd-numbered row overlaps with the small block SB in the large block LB of an even-numbered row adjacent in the Y direction. In the example of FIG. 9(A), the +X side half of the small block SB1b in the large block LB(1) overlaps with the -X side half of the small block SB2a in the large block LB(2) (the hatched small block in FIG. 9(A)). Also, the -X side half of the small block SB1c in the large block LB(1) overlaps with the +X side half of the small block SB2a in the large block LB(2). For this reason, the +X side end of the small block SB1b and the -X side end of the small block SB1c pass through the center in the X direction of the small block SB2a.
[0054] The local edge area image AI includes a plurality of pixels P corresponding to some small blocks SB that are set without gaps in the medium image Is without overlapping each other among a plurality of small blocks SB arranged in the medium image Is. In this embodiment, the local edge area image AI includes a plurality of pixels P arranged in a matrix of pixels corresponding to a plurality of small blocks SB in the large block LB in odd columns and odd rows. The local edge area image AI does not include pixels corresponding to the large block LB in the even columns and the small blocks SB in the large block LB in the even rows. For example, the 18 pixels P of the local edge area image AI in FIG. 9(A) correspond to the 18 solid-lined small blocks SB in the large blocks LB(1) and LB(3) in FIG. 9(A). For example, pixels P1a, P1b, P1c, P3a, P3b, and P3c in FIG. 9B correspond to small blocks SB1a, SB1b, SB1c, SB3a, SB3b, and SB3c in FIG. 9A, respectively.
[0055] The local edge area data is binary image data indicating whether the small block SB corresponding to each pixel is a local edge area or a non-local edge area. The initial values of the pixels included in the local edge area image AI are values (e.g., 0) indicating that they are non-local edge areas.
[0056] In S455, if there is a pixel P in the local edge region image AI corresponding to the small block of interest, the CPU 310 sets the value of the pixel P in the local edge region image AI corresponding to the small block of interest to a value indicating that it is a local edge region (for example, 1). If there is no pixel P in the local edge region image AI corresponding to the small block of interest, the CPU 310 sets the value of the pixel P in the local edge region image AI corresponding to the small block SB overlapping with the small block of interest to a value indicating that it is a local edge region.
[0057] If the difference {(M×N)-T} is equal to or smaller than the threshold value TH (S440: NO), then in S450, the CPU 310 determines that the small block of interest is not a local edge area. In other words, the CPU 310 determines that the small block of interest is a non-local edge area. In this case, the CPU 310 skips S455. That is, in this case, the local edge area data is not updated.
[0058] As can be seen from the above explanation, if at least one small block SB among a specific small block SB corresponding to a specific pixel P in the local edge area image AI and all other small blocks SB that overlap with the specific small block SB is determined to be a local edge area in S445, the specific small block SB is ultimately determined to be a local edge area.
[0059] In S460, the CPU 310 determines whether all small blocks SB in the large block of interest have been processed as small blocks of interest. If there are unprocessed small blocks SB in the large block of interest (S460: NO), the CPU 310 returns to S430 and selects an unprocessed small block SB as a new small block of interest. If all small blocks SB in the large block of interest have been processed (S460: YES), the CPU 310 advances the process to S465.
[0060] In S465, the CPU 310 judges whether or not a large block LB has been set over the entire target image (for example, medium image Is). For example, in the medium image Is of FIG. 8(A), if the last large block LB (e) in the last row has already been set as the target large block, it is judged that a large block LB has been set over the entire target image. If a large block LB has not been set over the entire target image (S465: NO), the CPU 310 returns to S415 and newly sets the next target large block. If a large block LB has been set over the entire target image (S465: YES), the CPU 310 ends the local edge area determination process.
[0061] When the local edge region determination process is completed, the final local edge region data is completed. Fig. 6(B) shows a local edge region image AI corresponding to the simple edge image EI of Fig. 6(A). In the local edge region image AI of Fig. 6(B), the portion where the multiple local edge regions Ea are located is shown in black. It can be seen that the probability that the portion where the edges of the contours of the clothing Ss and the chest pocket PCs exist is relatively high to be determined as the local edge region Ea, and the probability that the portion where only the edges of the fine structure of the fabric of the clothing Ss exist is relatively low to be determined as the local edge region Ea.
[0062] When the local edge region determination process is completed, in S320 of FIG. 5, the CPU 310 generates local edge image data indicating the local edge image LEI. The local edge image LEI is binary image data indicating local edge pixels and pixels other than the local edge pixels (non-local edge pixels). The local edge pixels are edge pixels specified in the simple edge image EI and pixels located in the local edge region. FIG. 6(C) illustrates the local edge image LEI corresponding to the simple edge image EI of FIG. 6(A) and the local edge region image AI of FIG. 6(B). For example, the local edge pixel LEp in the local edge image LEI of FIG. 6(C) is a pixel located in a plurality of local edge regions Ea specified in the local edge region image AI of FIG. 6(B) among a plurality of edge pixels Ep specified in the simple edge image EI of FIG. 6(A). In the local edge image LEI in Fig. 6(C), pixels constituting the edges of the contours of the clothes Ss and the chest pocket PCs are identified with a high probability as local edge pixels LEp, but pixels constituting the edges of the fine structure of the fabric of the clothes Ss are not identified very often as local edge pixels LEp. That is, in the local edge image data, pixels constituting local edges such as the contours of objects are identified with high accuracy, as compared to the simple edge image data, in distinction from pixels constituting edges dispersed throughout the image.
[0063] The local edge image data generated by executing the matching process of Fig. 5 using the medium image data as the target image data is the above-mentioned processed medium image data (S205 in Fig. 3(B), Fig. 4(E)). The local edge image data generated by executing the matching process of Fig. 5 using the partial sample image data as the target image data is the above-mentioned template image data (S110 in Fig. 3(A), Fig. 4(C)).
[0064] According to the embodiment described above, the CPU 310 sets a plurality of large blocks LB and a plurality of small blocks SB sub-regions smaller than the large blocks LB in the target image (for example, the medium image Is) (S415, S425 in FIG. 7, FIG. 8). The CPU 310 calculates the total luminance value T of each of the plurality of small blocks SB and the median value M of each of the plurality of large blocks LB (S420, S435 in FIG. 7). The CPU 310 judges whether or not each of the plurality of small blocks SB is a local edge region based on a comparison between the total luminance value T of the small block SB and the median value M of the large block LB including the small block SB (S440 to S450 in FIG. 7). The CPU 310 generates local edge image data indicating local edge pixels in the target image using the judgment result of whether or not it is a local edge region (S455 in FIG. 7, S320 in FIG. 5).
[0065] The median value M, which is the feature value of the large block LB, tends to reflect the overall feature of the target image, and the brightness value total value T, which is the feature value of the small block SB, tends to reflect the local feature of the target image. According to this embodiment, whether or not the small block SB is a local edge area is determined based on a comparison between the brightness value total value T of the small block SB and the median value M of the large block LB including the small block SB, so that the edge of the object in the target image can be accurately specified. For example, the small block SB including a local edge different from the distributed edges distributed throughout the target image can be accurately specified as the local edge area Ea. Specifically, the small block SB including the edge of an object that exists locally in the image (for example, the edge of the outline of the chest pocket PCs of the clothing Ss (FIG. 4(D))) can be specified separately from an area including only edges that extend throughout the medium image Is (for example, the edges that constitute the fabric of the clothing Ss).
[0066] For example, in the local edge area image AI in Fig. 6(B), within the pocket existence area AA, the small block SB including the edge of the contour of the chest pocket PCs is identified as the local edge area Ea with a relatively high probability. Also, the small block SB including the edge that constitutes the texture of the clothing Ss can be excluded from the local edge area Ea with a relatively high probability. For this reason, in the finally generated local edge image LEI in Fig. 6(C), compared to the simple edge image EI in Fig. 6(A), the edges that constitute the texture of the clothing Ss are excluded from the local edge pixels LEp with a relatively high probability, and the edges that constitute the contour of the chest pocket PCs and the clothing Ss are maintained as local edge pixels LEp with a relatively high probability.
[0067] According to this embodiment, the target image data for the matching pre-processing includes media image data showing the medium image Is. That is, the CPU 310 performs matching pre-processing with the medium image data as the target image data to generate processed media image data, which is local edge image data (S205 in FIG. 3B). Then, pattern matching is performed using the processed media image data to identify the chest pocket PCs, which is an object in the medium image Is (S210 in FIG. 3B). As a result, pattern matching can be performed using the processed media image data in which the edges of the contour of the chest pocket PCs in the medium image Is are accurately identified, so that the chest pocket PCs in the medium image Is can be accurately identified.
[0068] For example, as shown in the local edge image LEI in Fig. 6(C), not all edges constituting the outline of the chest pocket PCs can be maintained, and not all edges constituting the fabric texture can be removed. However, when performing matching processing in S210 in Fig. 3(B) using the processed medium image data, which is the local edge image data, the edge pixels constituting the outline of the chest pocket PCs can be identified as local edge pixels LEp in the local edge image LEI with an accuracy sufficient to improve the matching accuracy.
[0069] Furthermore, according to this embodiment, the number of edge pixels to be used in pattern matching can be reduced, so that the speed of pattern matching can be increased.
[0070] Furthermore, according to this embodiment, the target image data for the matching pre-processing includes partial sample image data indicating the partial sample image PIt. That is, the CPU 310 performs matching pre-processing using the partial sample image data as the target image data to generate template image data, which is local edge image data (S115 in FIG. 3(A)). Then, by performing pattern matching using the template image data, the chest pocket PCs, which is an object in the medium image Is, is identified (S210 in FIG. 3(B)). As a result, in the template image TI (FIG. 4(C)), the edges indicating the outline of the chest pocket PCt are maintained with a high probability, and the edges constituting the fabric grain are excluded with a high probability. Therefore, the chest pocket PCs in the medium image Is can be identified with even greater accuracy by pattern matching.
[0071] Here, as described above, the total brightness value T, which is the feature of the small block SB, becomes the average value (T / N) when divided by the number of pixels N in the small block SB. For this reason, it can be said that the total brightness value T is a value related to the average value of multiple pixels in the small block SB. And the feature of the large block LB is the median value M. Thus, in this embodiment, the feature of the small block SB is a value related to the average value, and the feature of the large block LB is a value related to the median value M. As a result, since appropriate features are used, the edges of objects in the image can be identified with even greater accuracy.
[0072] Further detailed explanation will be given. As shown in Fig. 8(B), the large block LB includes a background color portion BS including dispersed edges SE such as fine edges of the fabric, and a contour edge LE of a local object such as a chest pocket PCs. In such a case, the large block LB includes a small block SBa including the background color portion BS and the contour edge LE, and a small block SBb including the background color portion BS but not including the contour edge LE (Fig. 8(A)).
[0073] Fig. 10 shows an example of a histogram. Fig. 10(A) shows a histogram of the large block LB of Fig. 8(B). Fig. 10(B) shows a histogram of the small block SBa of Fig. 8(B). Fig. 10(C) shows a histogram of the small block SBb of Fig. 8(B). Each histogram is a graph with the luminance value on the horizontal axis and the number of pixels classified into each luminance value class on the vertical axis.
[0074] The histogram of the large block LB in FIG. 10(A) includes a first peak MP1 corresponding to the background color portion BS and a second peak MP2 corresponding to the edge LE of the outline. Since the background color portion BS is a portion showing a single color of fabric, the first peak MP1 corresponding to the background color portion BS has one peak Pk1 and is considered to have a shape that follows a normal distribution. The background color portion BS has a fine structure such as a cloth texture, so there are unevenness in brightness. For this reason, the first peak MP1 has a relatively wide shape. The edge LE of the outline is a single color portion that forms a thin, dark shadow, so the brightness is significantly lower than that of the background color portion BS. For this reason, the second peak MP2 corresponding to the edge LE of the outline has one peak Pk2 and is considered to have a shape that follows a normal distribution. Here, since the edge LE of the outline is a thin linear portion, the number of pixels is significantly smaller than that of the background color portion BS. From this, it is considered that the median M of the large block LB is approximately equal to the peak Pk1 of the first peak MP1. If the average value of the large blocks LB is used instead of the median value M of the large blocks LB, for example, when the peaks Pk1 and Pk2 are far apart, the influence of the peak Pk2 becomes stronger, and the average value is likely to shift toward the peak Pk2 side rather than the peak Pk1. It is preferable that the feature amount of the large blocks LB indicates the features of the background color portion BS of the large blocks LB regardless of the presence or absence of the edge LE of the contour, and therefore it is preferable that the feature amount of the large blocks LB takes a value close to the value of the peak Pk1 regardless of the presence or absence of the edge LE of the contour. For this reason, it is preferable to use the median value M rather than the average value as the feature amount of the large blocks LB.
[0075] The histogram of the small block SBa in Fig. 10(B) includes a first peak MP1a corresponding to the background color portion BS and a second peak MP2a corresponding to the edge LE of the contour. The position of the peak Pk1a of the first peak MP1a of the histogram of the small block SBa and the position of the peak Pk2a of the second peak MP2a are almost the same as the positions of the peaks Pk1 and Pk2 of the histogram of the large block LB in Fig. 10(A). Since the small block SB is smaller than the large block LB, the probability that the edge LE of the contour will be included is smaller than that of the large block LB. However, if the edge LE of the contour is included, the proportion of the number of pixels of the edge LE of the contour to the total number of pixels of the small block SB will be high. For this reason, the relative height of the peak Pk2a of the second peak MP2a to the peak Pk1a of the first peak MP1a in the histogram of the small block SBa is higher than the relative height of the peak Pk2 to the peak Pk1 in the histogram of the large block LB.
[0076] Small block SBb includes a background color portion BS but does not include a contour edge LE (FIG. 8(A)). For this reason, the histogram of small block SBb in FIG. 10(C) includes a first peak MP1b corresponding to the background color portion BS, but does not include a peak corresponding to the contour edge LE. The position of peak Pk1b of the first peak MP1b in the histogram of small block SBb is approximately the same as the position of peak Pk1 in the histogram of large block LB in FIG. 10(A).
[0077] When the small block SB includes the edge LE of the contour, as in the case of the small block SBa, the proportion of pixels of the edge LE of the contour is relatively high, so that the average value of the small block SB differs between the case where the edge LE of the contour is included in the small block SB and the case where the edge LE of the contour is not included. Specifically, since the small block SBb in FIG. 8B does not include the edge LE of the contour, the average value Ab of the small block SBb in FIG. 10C is almost the same as the peak Pk1b of the first peak MP1b. In contrast, since the small block SBa in FIG. 8B includes the edge LE of the contour, the average value Aa of the small block SBa in FIG. 10B is shifted toward the peak Pk1b side from the peak Pk1a of the first peak MP1a. Such a difference in the feature amount is more likely to appear when the average value is used as the feature amount than when the median value M is used. In particular, when the peaks Pk1a and Pk1b of the first peak are far from the peak Pk2a of the second peak, it is preferable to use the average value.
[0078] As described above, the median M of the large block LB is approximately equal to the peaks Pk1, Pk1a, and Pk1b of the first peaks MP1, MPa, and MPb. Therefore, when the small block SB includes the contour edge LE, the difference between the median M of the large block LB and the average value of the small block SB is larger than when the small block SB does not include the contour edge LE.
[0079] As described above, by using the median M as the feature of the large block LB and the average value as the feature of the small block SB, the edges of local objects within the image, for example the edges that form the contour of a chest pocket PCs, can be identified with even greater accuracy.
[0080] Furthermore, as described with reference to FIG. 9A, the multiple small blocks SB set in this embodiment include a first small block (e.g., SB1b in FIG. 9A) and a second small block (e.g., SB2a in FIG. 9A) that partially overlaps with the first small block and through which the outer edge of the first small block passes. The CPU 310 determines that the first small block is a local edge area when at least one of the first small block and the second small block satisfies a determination condition based on the feature amount (median value M) of the large block LB and the feature amount (total brightness value T) of the small block SB, which in this embodiment is {(M×N)-T}>TH (S440 to S455 in FIG. 7). As a result, for example, the CPU 310 can appropriately determine that the first small block is a local edge area even if a local edge exists along the outer edge of the first small block. This makes it possible to suppress oversight of detection of the local edge. For example, when a local edge exists at the boundary between the first small block SB1b and the small block SB1c in FIG. 9A, only a part of the pixels constituting the local edge may be included in the small block SB1b, and only a part of the remaining pixels may be included in the small block SB1c. In this case, neither the small block SB1b nor the small block SB1c may contain a sufficient number of pixels constituting the local edge, and neither the small block SB1b nor the small block SB1c may satisfy the judgment condition and may not be determined to be a local edge area. On the other hand, when a local edge exists at the boundary between the small block SB1b and the small block SB1c, the entire local edge is included in the second small block SB2a, so the second small block SB2a is appropriately determined to be a local edge area by satisfying the above judgment condition. In this way, in this embodiment, even when a local edge exists at the boundary between the first small block SB1b and the small block SB1c, it is possible to suppress missed detection of the local edge.
[0081] Furthermore, according to this embodiment, the CPU 310 generates local edge image data (S320 in Fig. 5) that indicates, as local edge pixels, pixels included in the small block SB that have been determined to be pixels that form an edge by the edge detection process in S300 in Fig. 5 and that have been determined to be a local edge region by 310 in Fig. 5. As a result, edge image data can be generated in which the edge of a local object in the image is precisely identified for each pixel.
[0082] As can be seen from the above explanation, the small block SB in this embodiment is an example of a small region, and the large block LB is an example of a large region. The median value M in this embodiment is an example of a first feature, and the brightness value sum T is an example of a second feature. The medium image data in this embodiment is an example of the first image data, and the sample image data is an example of the second image data.
[0083] B. Modifications (1) In the above embodiment, the local edge image data is used as the processed medium image data and the template image data to identify the printing target area in the garment S. The local edge image data is not limited to this, and is used for various other purposes. For example, in order to identify the printing target area in the paper, the local edge image data of the scan data obtained by scanning the paper may be used to identify the marker indicating the printing target area in the paper. In addition, the local edge image data of the captured image data may be used when identifying an industrial part in a captured image in order to operate the industrial part with a robot. In addition, the local edge image data may be used to identify an edge to be emphasized, not only for identifying an object in a captured image or a scanned image, but also for performing local edge emphasis processing to emphasize only a local edge in a captured image or a scanned image.
[0084] (2) In the above embodiment, the local edge image data is finally generated using the local edge area data and the simple edge image data (S320 in FIG. 5). Alternatively, the local edge area data may be used as coarse edge image data to perform the pattern matching process. In this case, the matching accuracy may be lower than in the embodiment, but the matching speed can be further increased.
[0085] (3) In the above embodiment, matching pre-processing is performed on both the medium image data and the partial sample image data to generate the processed medium image data and the template image used in pattern matching. Alternatively, the template image may be generated without using matching pre-processing. For example, when the object to be identified is an industrial part as described above, template image data that represents the object in line drawing may be generated using CAD data of the industrial part.
[0086] (4) In the above embodiment, the median M is used as the feature of the large block LB, and the brightness sum T, which is a value related to the average value, is used as the feature of the small block SB. Instead of this, other feature values may be used. For example, a value related to the average value may also be used as the feature of the large block LB. For example, a numerical value obtained by analyzing a histogram may be used as the feature. For example, the peak value of the highest mountain in the histogram may be used as the feature of the large block LB, and the average value of the peak values of one or more mountain parts having a height equal to or higher than a reference value in the histogram may be used as the feature of the small block SB.
[0087] (5) In the above embodiment, the method of setting the large block LB and the small block SB is merely an example and is not limited to this. For example, the large block LB and the small block SB may be set so as not to overlap each other. Furthermore, the large block LB may be a block that is larger than the small block of interest to be processed and has the small block of interest at its center. Furthermore, instead of the large block LB, a circular area including the small block of interest may be used.
[0088] (6) The device that executes all or part of the template registration process in FIG. 3(A) and the print process in FIG. 3(B) may be various other devices instead of terminal device 300. For example, CPU 210 of printer 200 or a CPU of imaging device 400 may execute the template registration process in FIG. 3(A) and the print process in FIG. 3(B). In this case, terminal device 300 is not required. In addition, the device that executes the template registration process in FIG. 3(A) and the print process in FIG. 3(B) may be a server connected to at least one of printer 200, terminal device 300, and imaging device 400 via the Internet. In this case, the server may be a so-called cloud server configured by a plurality of computers that can communicate with each other.
[0089] (7) In each of the above embodiments, part of the configuration realized by hardware may be replaced by software, and conversely, part or all of the configuration realized by software may be replaced by hardware.
[0090] Furthermore, when some or all of the functions of the present invention are realized by a computer program, the program can be provided in a form stored in a computer-readable recording medium (e.g., a non-transitory recording medium). The program can be used in a state stored in the same or a different recording medium (computer-readable recording medium) from when it was provided. "Computer-readable recording medium" is not limited to portable recording media such as memory cards and CD-ROMs, but can also include internal storage devices within a computer, such as various ROMs, and external storage devices connected to a computer, such as a hard disk drive.
[0091] The present invention has been described above based on examples and modifications, but the above-described embodiments of the invention are intended to facilitate understanding of the present invention and are not intended to limit the present invention. The present invention may be modified or improved without departing from the spirit of the invention, and equivalents thereof are included in the present invention. [Explanation of symbols]
[0092] 100...printing mechanism, 1000...printing system, 110...printing head, 120...head driving section, 130...main scanning section, 140...conveying section, 142...platen, 144...tray, 200...printer, 201...housing, 210...CPU, 220...non-volatile storage device, 230...volatile storage device, 260...operation section, 270...display section, 280...communication section, 300...terminal device, 310...CPU, 320...non-volatile storage device, 330...volatile storage device, 360...operation section, 370...display section, 380...communication section, 400...imaging device, AI...local edge area image, EI...simple edge image, Is...medium image, It...sample image, LB...large block, LEI...local edge image, PG1, PG2...computer program, PIt...partial sample image, SB...small block, TI...template image
Claims
1. A computer program comprising: an image acquisition process for acquiring target image data representing a target image; a region setting process for setting a plurality of large regions and a plurality of small regions smaller than the large regions within the target image, the small regions and the large regions each including a plurality of pixels; A calculation process for calculating a first feature amount for each of the plurality of small regions and a second feature amount for each of the plurality of large regions, the first feature amount being calculated using values of a plurality of pixels in the small regions, and the second feature amount being calculated using values of a plurality of pixels in the large region; a determination process for determining whether or not each of the plurality of small regions is an edge region including an edge based on a comparison between the first feature amount of the small region and the second feature amount of the large region including the small region; a generation process of generating edge image data indicating edges in the target image using a result of the determination of whether or not the target image is an edge region; A computer program that causes a computer to execute the following:
2. 2. A computer program according to claim 1, comprising: The target image data includes first image data representing a first image, The computer program comprises: a process of executing the area setting process, the calculation process, the determination process, and the generation process on the first image data to generate first edge image data; identifying an object in the target image by performing pattern matching using the first edge image data and template image data representing a template image corresponding to the object; A computer program that causes a computer to execute the following:
3. 3. A computer program according to claim 2, comprising: The target image data further includes second image data showing an object; The computer program further comprises: A process of generating second edge image data by executing the area setting process, the calculation process, the determination process, and the generation process on the second image data. Run the following on your computer: The pattern matching is performed using the second edge image data as the template image data.
4. A computer program according to any one of claims 1 to 3, the first feature value is a value related to an average value of a plurality of pixels in the small region, The second feature is a value related to a median of a plurality of pixels within the large region.
5. 5. A computer program according to claim 4, comprising: The computer program product, wherein the determination process is a process of determining that the small region is the edge region when a difference between the first feature amount and the second feature amount is greater than a reference value.
6. A computer program according to any one of claims 1 to 5, The plurality of small regions include a first small region and a second small region that partially overlaps with the first small region, the second small region having an outer edge passing through an inside of the first small region, The judgment process determines that the first small region is the edge region when at least one of the first small region and the second small region satisfies a judgment condition based on the first feature amount and the second feature amount.
7. The computer program according to any one of claims 1 to 6, further comprising: executes an edge detection process for determining whether or not each pixel of the target image data is a pixel that constitutes an edge; A computer program, wherein the generation process is a process of generating edge image data that indicates, as edge pixels, pixels that are determined to be pixels that constitute the edge by the edge detection process and that are included in the small area that is determined to be the edge area by the judgment process.
8. An image processing device, an image acquisition unit that acquires target image data representing a target image; a region setting unit that sets a plurality of large regions and a plurality of small regions smaller than the large regions within the target image, the small regions and the large regions each including a plurality of pixels; a calculation unit that calculates a first feature amount for each of the plurality of small regions and a second feature amount for each of the plurality of large regions, the first feature amount being calculated using values of a plurality of pixels in the small regions, and the second feature amount being calculated using values of a plurality of pixels in the large region; a determination unit that determines, for each of the plurality of small regions, whether or not the small region is an edge region including an edge based on a comparison between the first feature amount of the small region and the second feature amount of the large region including the small region; a generation unit that generates edge image data indicating edges in the target image using a result of the determination of whether or not the target image is an edge region; An image processing device comprising:
9. an image acquisition step of acquiring target image data indicative of a target image; a region setting step of setting a plurality of large regions and a plurality of small regions smaller than the large regions within the target image, the small regions and the large regions each including a plurality of pixels; a calculation step of calculating a first feature amount for each of the plurality of small regions and a second feature amount for each of the plurality of large regions, the first feature amount being calculated using values of a plurality of pixels in the small regions, and the second feature amount being calculated using values of a plurality of pixels in the large region; a determination step of determining, for each of the plurality of small regions, whether or not the small region is an edge region including an edge based on a comparison between the first feature amount of the small region and the second feature amount of the large region including the small region; a generating step of generating edge image data indicating edges in the target image using a result of the determination of whether or not the target image is an edge region; An image processing method comprising:
Citation Information
Patent Citations
Edge detection
JP1988250973A
Method and detector for detecting image data outline part
JP1994083961A
Image processing unit and control method therefor, and computer program
JP2008262424A
Device, method and program for detecting artifact
JP2010197336A
Image processing system
JP2012048593A