Program and data processing device
The program uses clustering algorithms to identify color unevenness in printed images by classifying partial images, addressing the inadequacies of existing methods and ensuring precise detection of color uniformity.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2026-03-13
AI Technical Summary
Existing methods for determining color unevenness in images are inadequate.
A program that classifies partial images into clusters based on color similarity and applies clustering algorithms to determine the presence of color unevenness in solid color regions, using techniques such as DBSCAN clustering and threshold-based analysis.
Effectively detects color unevenness in areas with small color variations, providing accurate identification of color uniformity issues in printed images.
Smart Images

Figure 2026046193000001_ABST
Abstract
Description
Technical Field
[0001] This specification relates to a technique for determining whether an image has color unevenness.
Background Art
[0002] Patent Document 1 discloses a method for detecting color unevenness of a printed matter. In this detection method, a television camera captures a printed surface of a reference printed matter in monochrome. The entire reference printed matter is displayed on a monitor television. An operator designates a location where color unevenness is to be detected. A specific area in a solid portion of the same color is designated. For the specific area of the reference printed matter, an average value of video levels is supplied to a reference value memory. The reference value memory stores, as a reference value, a value obtained by including an allowable value of variation in the average value. For a specific area of the printed surface of the inspected printed matter, brightness data is periodically obtained. By comparing it with the reference value, the presence or absence of color unevenness is detected.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] However, there is room for improvement in determining whether an image has color unevenness.
[0005] This specification discloses a technique for determining whether an image has color unevenness.
Means for Solving the Problems
[0006] The technique disclosed in this specification can be realized as the following application examples.
[0007] [Application Example 1] A program that enables a computer to implement a classification function, which classifies a plurality of partial images into N clusters (where N is an integer of 1 or more) by performing clustering using the respective colors of a plurality of partial images that form a solid color region, wherein the solid color region is a region included in the image to be processed that satisfies a predetermined solid color condition indicating that the color variation is small, and the clustering is configured to automatically determine the total number of clusters N; and a cluster determination function that determines that the solid color region has color unevenness in a first specific case where the total number of clusters N is 2 or more.
[0008] With this configuration, in a first specific case where the total number of clusters N obtained by clustering is 2 or more, it can be appropriately determined that the solid-colored area has color unevenness.
[0009] [Application Example 2] A program that enables a computer to implement the following: a classification function that classifies a plurality of partial images into k clusters (where k is an integer of 2 or more) by performing clustering using the respective colors of a plurality of partial images that form a solid color region, wherein the solid color region is a region included in the image to be processed that satisfies predetermined solid color conditions indicating that the color variation is small, and the total number of clusters k is predetermined; and a cluster determination function that determines whether a particular solid color region has color unevenness using one or more types of information from: first type information indicating the distance between the k clusters, second type information indicating the number of elements in each cluster, and third type information indicating the degree of color variation between the plurality of partial images within the cluster.
[0010] With this configuration, it is possible to appropriately determine whether a particular solid-color area has color unevenness using the k clusters obtained by clustering.
[0011] Furthermore, the technologies disclosed herein can be implemented in various forms, for example, as data processing methods and data processing devices, computer programs for realizing the functions of such methods or devices, and recording media (e.g., non-temporary recording media) on which such computer programs are recorded. [Brief explanation of the drawing]
[0012] [Figure 1] This is an explanatory diagram showing a data processing device as one embodiment. [Figure 2] This is a perspective view showing an example of the reading device 100. [Figure 3] (A) is a diagram showing an example of an image represented by image data for printing. (B) is a diagram showing an example of a fully scanned image. [Figure 4] This is a flowchart illustrating an example of the inspection process. [Figure 5] This is a flowchart illustrating an example of the color uniformity inspection process. [Figure 6] This is a flowchart illustrating an example of the color uniformity inspection process. [Figure 7] This flowchart illustrates an example of the process for determining uniformity for each block. [Figure 8] (A) and (B) are diagrams that show examples of blocks within read image IMs. [Figure 9] (A) is a diagram showing an example of a solid color area. (B) is a diagram showing an example of multiple sub-images PI. (C) is a diagram showing an example of the size of a sub-image PI. (D) is a diagram showing an example of a colored point. (E) is a diagram showing the breakdown of clusters CL1 and CL2. [Figure 10] (A) and (B) are diagrams illustrating examples of clustering. (C) is a diagram illustrating an example of adjusting the processing condition Cp. [Figure 11] This flowchart illustrates an example of a process for determining the presence or absence of color unevenness. [Figure 12] (A) is a diagram representing an example of Type 1 result information. (B) is a diagram representing an example of Type 2 result information. [Figure 13] (A) and (B) are diagrams showing another embodiment of clustering. (C) is a diagram showing an example of adjusting processing conditions. [Figure 14] (A) and (B) are diagrams showing another embodiment of clustering. (C) is a diagram showing an example of adjusting processing conditions. [Figure 15] It is a flowchart showing an example of a determination process for the presence or absence of color unevenness. [Figure 16] It is a flowchart showing another embodiment of the color unevenness inspection process. [Figure 17] It is a flowchart showing another embodiment of the color unevenness inspection process. [Figure 18] It is a flowchart showing an example of a superpixel extraction process. [Figure 19] (A) and (B) are diagrams showing an example of calculating superpixels.
Modes for Carrying Out the Invention
[0013] A. First Embodiment: A1. Device Configuration: FIG. 1 is an explanatory diagram showing a data processing device as an embodiment. The data processing device 200 is, for example, a personal computer. The data processing device 200 executes an inspection process for a printed image. The data processing device 200 includes a processor 210, a storage device 215, a display unit 240, an operation unit 250, and a communication interface 270. These elements are connected to each other via a bus. The storage device 215 includes a volatile storage device 220 and a non-volatile storage device 230.
[0014] The processor 210 is a device configured to perform data processing, such as a Central Processing Unit (CPU) or a System on a Chip (SoC). The volatile memory device 220 is, for example, Dynamic Random Access Memory (DRAM), and the non-volatile memory device 230 is, for example, flash memory. The non-volatile memory device 230 stores data for the program 231, size settings 235 representing the height Hus and width Wus, and processing conditions Cp. Details of this information will be described later.
[0015] The display unit 240 is a device configured to display images, such as a liquid crystal display or an organic EL display. The operation unit 250 is a device configured to receive user input, such as buttons, levers, or a touch panel superimposed on the display unit 240. The display unit 240 and the operation unit 250 may form a so-called touchscreen. The user can input various requests and instructions to the data processing device 200 by operating the operation unit 250. The display unit 240 may display elements for operation (e.g., buttons, sliders, etc.), and the displayed elements may be operated through the operation of the operation unit 250.
[0016] The communication interface 270 is an interface for communicating with other devices (for example, one or more of the following: USB interface, wired LAN interface, IEEE 802.11 wireless interface, industrial camera interface (e.g., CameraLink, CoaXPress, etc.)). In this embodiment, the reading device 100 is connected to the communication interface 270. The reading device 100 generates data of a read image representing the object by optically reading the object to be read. Hereinafter, the reading device 100 will read a T-shirt containing a printed image.
[0017] Figure 2 is a perspective view showing an example of the reading device 100. In the figure, the first direction Da and the second direction Db represent horizontal directions, and the third direction Dc represents the vertically upward direction. The first direction Da and the second direction Db are perpendicular to each other.
[0018] The reading device 100 comprises a housing 190, a table 130, a support part 140 fixed to the upper surface of the table 130, a transport device 120, a reading sensor 180, and a control device 110. The control device 110, the transport device 120, and the reading sensor 180 are fixed to the housing 190.
[0019] The support portion 140 is a plate-shaped member that forms a flat top surface for supporting the object to be read (such a member is also called a platen). In the figure, a T-shirt 700 with a printed image IMpp is placed on the support portion 140.
[0020] The conveying device 120 is configured to convey the table 130 in a direction parallel to the second direction Db. Although not shown in the figures, the conveying device 120 includes rails that support the table 130 so as to be slidable in a direction parallel to the second direction Db, and a plurality of pulleys, belts, and an electric motor for moving the table 130 along the rails. The conveying device 120 further includes a position sensor 122 (e.g., a rotary encoder) for detecting the position of the table 130 on the conveying path.
[0021] The reading sensor 180 is positioned higher than the support portion 140 in the middle of the transport path Pth of the support portion 140. The reading sensor 180 includes a line sensor formed by a plurality of photoelectric conversion elements arranged in a direction intersecting the transport direction Db (in this embodiment, in the direction Da perpendicular to the transport direction Db) (for example, a Contact Image Sensor (CIS) or a Charge Coupled Device (CCD)). The reading sensor 180 faces downward. The reading sensor 180 can read the portion of the object supported by the support portion 140 that is located below the reading sensor 180.
[0022] When reading the T-shirt 700, the reading device 100 transports the table 130 in a direction parallel to the second direction Db. The reading sensor 180 repeatedly reads the T-shirt 700 during transport. As a result, the reading sensor 180 can read approximately the entire portion of the T-shirt 700 that is supported by the support portion 140.
[0023] The control device 110 is an electrical circuit configured to control the transport device 120 and the reading sensor 180. The control device 110 is configured using, for example, a computer or dedicated hardware (such as an Application Specific Integrated Circuit (ASIC)). The control device 110 generates data of the read image by controlling the transport device 120 and the reading sensor 180.
[0024] A2. Printing process: In this embodiment, an image is printed on a T-shirt 700 (Figure 2). The image printing is performed, for example, as part of a T-shirt sales service. The T-shirt sales service may include on-demand printing. The customer orders on-demand printing from the service provider. The service provider prints the image on the T-shirt 700 using image data provided by the customer, in accordance with the customer's order.
[0025] Figure 3(A) shows an example of an image represented by print-ready image data (referred to as print-ready image IMp). In this embodiment, print-ready image IMp is a rectangular image having two sides parallel to the first direction Dx and two sides parallel to the second direction Dy (the second direction Dy is perpendicular to the first direction Dx). Hereafter, in the figures, the right direction will represent the first direction Dx, and the downward direction will represent the second direction Dy. The same applies to other figures described later.
[0026] The data for the printable image IMp is bitmap data representing the color values (here, the grayscale values of red R, green G, and blue B, e.g., values between zero and 255) of multiple pixels arranged in a matrix along the first direction Dx and the second direction Dy. In the example in Figure 3(A), the printable image IMp represents the background BG and the object OB. The object OB contains three regions PA1-PA3. The first region PA1 and the third region PA3 are monochromatic regions. On the printable image IMp, multiple pixels in the first region PA1 show the same color value. Multiple pixels in the third region PA3 show the same color value. The second region PA2, unlike the other regions PA1 and PA3, represents an object with a complex shape (here, a string). The printable image IMp is printed on a T-shirt 700 using a printing device (not shown). The printing device prints the printable image IMp using, for example, ink.
[0027] In image printing, color unevenness can occur due to various reasons. For example, if the characteristics of the printing medium, such as the fabric forming the T-shirt 700 (e.g., ink adhesion), are not uniform, the printed image may have color unevenness. Also, when printing an image on fabric such as the T-shirt 700, a pre-treatment agent may be applied to the fabric beforehand. If the pre-treatment agent is applied unevenly, the printed image may have color unevenness. Furthermore, color unevenness can occur due to malfunctions in the printing equipment (e.g., tilt of the print head).
[0028] In areas with large color variations (for example, areas representing objects with complex shapes, such as the second area PA2), color unevenness is less noticeable. On the other hand, in areas with small color variations (for example, monochromatic areas, such as areas PA1 and PA3), color unevenness is more noticeable. The data processing device 200 uses the read image of the T-shirt 700 to detect color unevenness in areas with small color variations through an inspection process described later. In this embodiment, the data of the print image IMp is used in the inspection process. After printing the print image IMp, the data of the print image IMp is stored in the storage device 215 (for example, the non-volatile storage device 230) of the data processing device 200 for the inspection process.
[0029] A3. Inspection process: Figure 4 is a flowchart illustrating an example of the inspection process. For inspection, the T-shirt 700 is placed on the support unit 140 of the reader 100 (Figure 2) so that the printed image IMpp is visible. In this embodiment, an operator places the T-shirt 700 on the support unit 140. Alternatively, a machine (e.g., a robotic arm) may place the T-shirt 700 on the support unit 140. After the T-shirt 700 is placed, an instruction to start the inspection process is input to the data processing device 200 (Figure 1). In this embodiment, the operator inputs the instruction to start the inspection by operating the operation unit 250. The processor 210 starts the inspection process in response to the instruction to start. The instruction to start the inspection process may be input to the data processing device 200 via the communication interface 270 by a device other than the data processing device 200.
[0030] The processor 210 of the data processing device 200 executes the inspection process according to the program 231. In S110, the processor 210 accepts user-specified parameters. In this embodiment, the operator can set the height Hus and width Wus, represented by the size setting 235, by operating the operation unit 250. The processor 210 stores the data of the size setting 235, which represents the height Hus and width Wus set by the user, in the non-volatile storage device 230. As will be described later, height Hus and width Wus indicate the height and width of the color unevenness to be detected (the unit is, for example, the number of pixels).
[0031] The inspection process (Figure 4) is repeated for multiple objects (in this case, T-shirts). The size setting 235 set by the operator may be used in common for multiple inspection processes. For example, after the size setting 235 is set by the operator in S110, the operator may omit setting a new size setting 235 for a new inspection process. In this case, the processor 210 may use the size setting 235 already stored in the non-volatile memory device 230.
[0032] In S120, the T-shirt 700 is photographed. The processor 210 supplies a read instruction to the reading device 100. The control device 110 of the reading device 100 reads the T-shirt 700 by controlling the reading sensor 180 and the transport device 120 in response to the read instruction. The control device 110 generates data of a read image representing the read T-shirt 700. The processor 210 of the data processing device 200 acquires the read image data from the control device 110 of the reading device 100 and stores the acquired read image data in the storage device 215 (for example, the non-volatile storage device 230).
[0033] Figure 3(B) is a diagram showing an example of an overall read image, which is a read image obtained from the reading device 100. In this embodiment, the overall read image IMr is a rectangular image having two sides parallel to the first direction Dx and two sides parallel to the second direction Dy. The data of the overall read image IMr is bitmap data representing the color values (here, the gradation values of red R, green G, and blue B (for example, values between zero and 255)) of multiple pixels arranged in a matrix along the first direction Dx and the second direction Dy. The overall read image IMr in the figure represents the portion of the T-shirt 700 that includes the printed image IMpp. Here, the printed image IMpp is assumed to be an image obtained by printing the printable image IMp (Figure 3(A)). The printed image IMpp represents object OBp, which corresponds to object OB of the printable image IMp. Object OBp includes regions PA1p-pA3p, which correspond to regions PA1-PA3 of object OB of the printable image IMp, respectively.
[0034] The processor 210 extracts a specific portion from the overall read image IMr that represents the printed image IMpp, as read image IMs. The read image IMs is a rectangular image having two sides parallel to the first direction Dx and two sides parallel to the second direction Dy. The extracted portion is predetermined to include the printed image IMpp. Alternatively, the processor 210 may extract the portion representing the printed image IMpp from the overall read image IMr by template matching using the printable image IMp.
[0035] In S130, the processor 210 performs a color uniformity inspection using the read images IMs. Figures 5 and 6 are flowcharts illustrating an example of the color uniformity inspection process. Figure 6 is a continuation of Figure 5. In S210, the processor 210 acquires inspection parameters. In this embodiment, the processor 210 acquires data for size settings 235 (height Hus and width Wus) and processing conditions Cp from the non-volatile storage device 230.
[0036] In S215, the processor 210 converts the color space of the read image IMs (in this case, the RGB color space) to the CIELAB color space (also known as the L*a*b* color space). The processor 210 converts the color space using a predetermined correspondence (e.g., a lookup table) between the color space before and after the conversion.
[0037] In S220, the processor 210 determines the uniformity of each block. Figure 7 is a flowchart illustrating an example of the process for determining the uniformity of each block. As will be described later, the processor 210 determines the uniformity of each of the multiple blocks contained in the read image IMs. The processor 210 adopts areas formed by multiple overlapping uniform blocks as solid-color areas. Solid-color areas are examples of areas with small color variations. Then, the processor 210 detects color unevenness from the solid-color areas.
[0038] Figures 8(A) and 8(B) show examples of blocks within the read image IMs. Figure 8(A) shows the read image IMs and three example blocks BL1, BL2, and BLq. Block BL1 is a block BL located in the upper left corner of the read image IMs. In the figure, block BL1 is hatched. Block BL2 is a block BL adjacent to block BL1 in the first direction Dx. Block BLq is a block BL adjacent to block BL1 in the second direction Dy. The width Wims indicates the size of the read image IMs in the first direction Dx, and the height Hims indicates the size of the read image IMs in the second direction Dy (unit: number of pixels). The width Wbl indicates the size of a single block BL in the first direction Dx, and the height Hbl indicates the size of a single block BL in the second direction Dy (unit: number of pixels). The width Wbl and height Hbl of a block BL are predetermined (details will be described later). Multiple blocks BL are arranged in a grid along the first direction Dx and the second direction Dy. Two adjacent blocks BL in the first direction Dx (for example, blocks BL1 and BL2) overlap each other by half. Similarly, two adjacent blocks BL in the second direction Dy (for example, blocks BL1 and BLq) overlap each other by half.
[0039] In S410 (Figure 7), the processor 210 initializes the position Py of the block of interest in the second direction Dy to zero. In S415, the processor 210 initializes the position Px of the block of interest in the first direction Dx to zero. In this embodiment, the position (Px, Py) of block BL refers to the position of the pixel at the top-left corner of block BL in the figure. The top-left corner is the angle formed by the edge on the -Dx direction side and the edge on the -Dy direction side of block BL. Also, "Px=0, Py=0" refers to the position of the pixel at the top-left corner of the read image IMs in the figure. The position of each pixel in the read image IMs is represented by a combination of a position in the first direction Dx that is greater than or equal to zero and a position in the second direction Dy that is greater than or equal to zero.
[0040] In S420, the processor 210 calculates the average pixel value within the block of interest. In this embodiment, the L* value of CIELAB is used as the pixel value. In S425, the processor 210 uses the average value calculated in S420 to calculate the standard deviation sd of the pixel values within the block of interest. The processor 210 may calculate the standard deviation sd of multiple color components (for example, L* value, a* value, and b* value) instead of a single color component.
[0041] In S430, the processor 210 determines whether the standard deviation sd is less than the threshold sd_th. The threshold sd_th may be determined experimentally in advance such that when the block represents an object with a complex shape, the standard deviation sd is greater than or equal to the threshold sd_th, and when the block represents a region of a single color, the standard deviation sd is less than the threshold sd_th. The width Wbl and height Hbl of the block BL may be determined experimentally in advance such that the block BL contains a sufficient number of pixels to properly perform the determination in S430.
[0042] When the standard deviations sd of multiple color components are calculated, the threshold sd_th may be determined for each color component. The result of S430 may be Yes if the standard deviations sd of all color components are less than the corresponding threshold sd_th. The result of S430 may be No if the standard deviations sd of one or more color components are greater than or equal to the corresponding threshold sd_th.
[0043] If the result of the decision in S430 is Yes, the processor 210 classifies the block of interest as a homogeneous block in S435 and proceeds to S445. If the result of the decision in S430 is No, the processor 210 classifies the block of interest as a heterogeneous block in S440 and proceeds to S445.
[0044] In S445, the processor 210 updates the position Px of the block of interest in the first direction Dx to the position of the next block. In this embodiment, the processor 210 adds half the width Wbl to the position Px. In S450, the processor 210 determines whether the updated position Px is within the read image IMs. In this embodiment, the determination result is Yes if the position Px is less than the width Wims of the read image IMs.
[0045] If the result of S450 is Yes, processor 210 moves to S420 and processes the new block of interest.
[0046] If the result of the determination in S450 is No, then in S455, the processor 210 updates the position Py of the block of interest in the second direction Dy to the position of the next block. In this embodiment, the processor 210 adds half of the height Hbl to the position Py. In S460, the processor 210 determines whether the updated position Py is within the read image IMs. In this embodiment, the determination is Yes if the position Py is less than the height Hims of the read image IMs.
[0047] If the result of S460 is Yes, processor 210 moves to S415 and processes the new block of interest.
[0048] If the result of S460 is No, then all block BLs in the read image IMs have been processed. The processor 210 terminates the process shown in Figure 7, i.e., the process shown in S220 of Figure 5.
[0049] Figure 8(B) shows an example of the processing results of Figure 7 on the read image IMs. Multiple block BLs representing the first region PA1p and the third region PA3p are classified as uniform block BLe. Multiple block BLs representing the second region PA2p are classified as non-uniform block BLu.
[0050] In S225 (Figure 5), the processor 210 performs labeling of solid-color areas that satisfy the solid-color condition. In this embodiment, the processor 210 adopts a single continuous area obtained by linking multiple overlapping uniform blocks as a single solid-color area. The solid-color condition is that the area of interest is a single continuous area represented by multiple uniform blocks, and each uniform block overlaps with one or more other uniform blocks. Labeling distinguishes multiple solid-color areas that are separated from each other.
[0051] In the example shown in Figure 8(B), multiple uniform blocks BLe representing the first region PA1p form the first solid color region AL1, and multiple uniform blocks BLe representing the second region PA2p form the second solid color region AL2. In the figure, each solid color region AL1 and AL2 is hatched.
[0052] In S230 (Figure 5), the processor 210 selects an unprocessed solid-color area as the area of interest. In S232, the processor 210 determines whether the size of the area of interest is larger than the reference size. Color unevenness in smaller areas is less noticeable. The reference size may be determined experimentally in advance such that when the area of interest is large enough to make the color unevenness noticeable, the size of the area of interest is larger than the reference size, and when the area of interest is small and the color unevenness is not noticeable, the size of the area of interest is less than or equal to the reference size. The size comparison may be performed by the total number of pixels. Alternatively, the length in the first direction Dx and the length in the second direction Dy may be compared with the corresponding threshold (the unit of length is the number of pixels). In this case, if both the length in the first direction Dx and the length in the second direction Dy are greater than the corresponding threshold, it may be determined that the size of the area of interest is larger than the reference size.
[0053] If the size of the region of interest is larger than the reference size (S232: Yes), in S252-S258, the processor 210 determines whether the region of interest has color unevenness by performing clustering using the respective colors of the multiple subimages that make up the region of interest. If the region of interest has color unevenness, the clustering forms a cluster of subimages that do not represent color unevenness and a cluster of subimages that represent color unevenness.
[0054] Figure 9(A) shows an example of a region of interest (i.e., a solid color region). The figure shows a first solid color region AL1. Here, the first solid color region AL1 is assumed to have color unevenness CC. In the example in Figure 9(A), the shape of the first solid color region AL1 is rectangular. However, the shape of a solid color region is not limited to a rectangle and can take various shapes.
[0055] Figure 9(B) shows an example of multiple partial images PI forming the first solid color region AL1. In this embodiment, the shape of the partial images PI is rectangular. The multiple partial images PI are arranged in a grid along the first direction Dx and the second direction Dy. In the example in Figure 9(B), partial images PI1 and PI2 represent color unevenness CC. Note that if a partial image PI is located at the edge of the first solid color region AL1, a part of the partial image PI may extend outside the first solid color region AL1. The extended portion may be removed from the partial image PI.
[0056] In S252 (Figure 5), the processor 210 determines the size of the partial image PI using the height Hus and width Wus represented by the size setting 235 (Figure 1). Figure 9(C) shows an example of the size of the partial image PI. The first size set SPa indicates the size of the partial image PI used in this embodiment. The height Hpi indicates the size of the partial image PI in the second direction Dy, and the width Wpi indicates the size of the partial image PI in the first direction Dx (unit: number of pixels). The sizes Hpi and Wpi are set to half of the sizes Hus and Wus represented by the size setting 235, respectively. Here, it is assumed that the sizes Hus and Wus represented by the size setting 235 represent the size of the smallest color unevenness to be detected. If the size of the partial image PI is less than or equal to half the size of the smallest color unevenness to be detected, the partial image PI located in the part representing the color unevenness within the solid color area can represent the color unevenness with an area of more than half of the partial image PI. In addition, multiple partial image PIs can represent color unevenness. Therefore, clustering can appropriately form clusters that represent the smallest color variations in the detected area.
[0057] The sizes Hus and Wus represented by size setting 235 can be assumed to represent half the size of the smallest color unevenness to be detected. In this case, the sizes Hpi and Wpi of the partial image PI can be the same as the sizes Hus and Wus represented by size setting 235 (this set of sizes Hpi and Wpi is called the second size set SPb).
[0058] Furthermore, the smaller the size of the partial image PI, the easier it is to form clusters representing small color variations (i.e., the size of the smallest detectable color variation becomes smaller). However, the computational burden increases. Therefore, it is preferable that the size of the partial image PI be half the size of the smallest color variation to be detected.
[0059] In S252 (Figure 5), the processor 210 acquires multiple partial image PIs that form the region of interest according to the determined sizes (Hpi, Wpi) of the partial image PIs (Figure 9(B)). In this embodiment, the processor 210 divides the region of interest into multiple partial image PIs. The positions of the partial image PIs relative to the region of interest can be various. For example, multiple partial image PIs may be arranged such that the upper left corner of each partial image PI overlaps with the upper left corner of the region of interest.
[0060] In S254, the processor 210 performs clustering of multiple sub-images PI according to the clustering conditions. Color points representing the colors of the sub-images PI are used for clustering. Figure 9(D) shows an example of color points. The first type color point PT shows the color point used in this embodiment (simply called color point PT). The color point PT is represented by a three-dimensional vector representing the average L* value Ave_L, the average a* value Ave_a, and the average b* value Ave_b of multiple pixels Pxl included in the sub-image PI. Such a color point PT represents the typical color of the sub-image PI. Various color points representing the colors of the sub-images PI may be used for clustering. For example, a second type color point PTb representing the L* value, a* value, and b* value of each of the multiple pixels Pxl included in the sub-image PI may be used. The dimension of the second type color point PTb is Hpi*Wpi*3. When a second-class color point PTb is used, the partial image PI, which includes parts outside the region of interest, may be excluded from clustering.
[0061] Figures 10(A) and 10(B) illustrate examples of clustering. In this embodiment, processor 210 performs clustering according to an algorithm called Density-based spatial clustering of applications with noise (DBSCAN). A library called "sklearn" (also known as scikit-learn) may be used for DBSCAN clustering.
[0062] The overview of DBSCAN is as follows. Figure 10(A) shows the processing condition Cp. The processing condition Cp is a condition used to judge color unevenness and includes the clustering condition C1. The clustering condition C1 represents the radius Rd and the threshold Npth. The processor 210 calculates the distance between the color point of interest PTi and other color points PT. The distance may be, for example, the Euclidean distance. The distance between two color points PT indicates the difference in color between the two color points PT. The shorter the distance, the more similar the colors of the two color points PT. The processor 210 counts the total number Np of color points PT that have a distance of radius Rd or less. The total number Np represents the total number of color points PT contained in a sphere of radius Rd centered on the color point of interest PTi (the sphere is represented by the number of dimensions of the color points PT). If the total number Np is greater than or equal to the threshold Npth, the processor 210 classifies the Np color points PT into the same cluster. The processor 210 expands the cluster by performing the above process using radius Rd and threshold Npth for each of the multiple color points PT that are included in the same cluster. This causes multiple subimages PI representing similar colors to form a single cluster. If the total number Np is less than the threshold Npth, the processor 210 classifies the color point PTi of interest as noise. The processor 210 classifies each of the multiple color points PT as either a cluster or noise by performing the above process using radius Rd and threshold Npth for each of the multiple color points PT.
[0063] As shown in the first solid-color region AL1 in Figure 9(B), when the region of interest represents a color unevenness CC, the colors of the partial images PI1 and PI2 representing the color unevenness CC may differ from the colors of the partial image PI that does not represent the color unevenness CC. In this case, the multiple partial images PI that do not represent the color unevenness CC and the partial images PI1 and PI2 that represent the color unevenness CC may form different clusters from each other. When the region of interest does not represent a color unevenness, the total number of clusters formed is usually 1.
[0064] Figure 10(B) is a diagram illustrating an example of clustering. The figure shows multiple color points PT. Clusters are formed using spheres with radius Rd centered around each color point PT. In the example in Figure 10(B), a first cluster CL1 and a second cluster CL2 are formed. Some color points PTn may be classified as noise. The partial image PI associated with such color points PTn may also represent color unevenness.
[0065] Figure 9(E) shows the breakdown of clusters CL1 and CL2. The first cluster CL1 contains a large number of partial images PI. The first cluster CL1 includes several partial images PI that do not represent color unevenness CC (Figure 9(B)). The second cluster CL2 includes partial images PI1 and PI2 that represent color unevenness CC.
[0066] The clustering condition C1 (here, radius Rd and threshold Npth) may be experimentally determined in advance so that the total number of clusters formed is 1 when the region of interest does not show color unevenness, and the total number of clusters formed is 2 or more when the region of interest shows color unevenness. The threshold Npth may be, for example, 2 or 3 or more. The radius Rd may be determined using multiple read images representing various color unevennesses. For example, the radius Rd may be determined to be smaller than the distance between the color point PT of a partial image PI representing color unevenness and the color point PT of a partial image PI that does not show color unevenness. This makes it possible to separate the color point PT of a partial image PI representing color unevenness from the color point PT of a partial image PI that does not show color unevenness.
[0067] In S256 (Figure 5), the processor 210 uses the clustering results from S254 to determine whether or not there is color unevenness. Figure 11 is a flowchart showing an example of the process for determining the presence or absence of color unevenness. In S510, the processor 210 determines whether or not there are color points PT that are classified as noise. If noise color points PT exist (S510: Yes), in S515, the processor 210 classifies the partial image PI associated with the noise color points PT into a color unevenness region, which is a partial region with color unevenness. Then, the process proceeds to S520. If noise color points PT do not exist (S510: No), the processor 210 skips S515 and proceeds to S520.
[0068] In S520, the processor 210 determines whether the total number of clusters N is 2 or greater. If the total number N is 2 or greater (S520: Yes), in S522, the processor 210 calculates the distance dCL between clusters. Figure 10(B) shows an example of the distance dCL. The processor 210 calculates the centroid points PCT1 and PCT2 of each cluster CL1 and CL2. The centroid points are the centroids of the color points PT included in the cluster. The processor 210 calculates the distance between the two centroid points as the distance between the two clusters.
[0069] As shown in the example in Figure 10(B), if the two clusters CL1 and CL2 are cluster CL1 which does not represent color unevenness and cluster CL2 which does represent color unevenness, the distance dCL will be large. Even if the region of interest does not represent color unevenness, multiple partial images PI may form two or more clusters due to various causes such as noise contained in the read images IMs. In this case, the distance dCL will be small. If the total number of clusters N is 3 or more, the processor 210 calculates the distance dCL of all cluster pairs formed by the N clusters.
[0070] In S524 (Figure 11), the processor 210 determines whether a distance dCL greater than or equal to the distance threshold dCLth has been calculated. The distance threshold dCLth may be determined experimentally in advance such that the distance dCL between a cluster that does not represent color unevenness and a cluster that represents color unevenness is greater than or equal to the distance threshold dCLth, and the distance dCL between two clusters that do not represent color unevenness is less than the distance threshold dCLth. If one or more distances dCL are greater than or equal to the distance threshold dCLth, the result of the determination in S524 is Yes.
[0071] If the result of the judgment in S524 is Yes, in S525 the processor 210 classifies the partial image PI included in the outlier cluster as a color uneven region. In this embodiment, all partial image PI included in the outlier cluster are classified as color uneven regions. After S525, the processor 210 completes the process shown in Figure 11, i.e., the process shown in S256 of Figure 5. In this embodiment, the outlier cluster is the cluster with the fewest number of partial image PIs among the N clusters.
[0072] In S520, if the total number of clusters N is less than 2 (S520: No), processor 210 transitions to S530. In this case, the total number of clusters N is usually 1. In S524, if all distances dCL are less than the distance threshold dCLth (S524: No), processor 210 transitions to S530.
[0073] In S530, the processor 210 calculates the variance Cs for each of the N clusters. The variance Cs is the variance of the color points PT included in the cluster. The variance Cs indicates the degree of color variation among the multiple color points PT (i.e., multiple sub-images PI) included in the cluster. The variance Cs may be calculated by dividing the sum of the squared distances between the average color point of the color points PT included in the cluster and each individual color point PT by the total number of color points PT. When a cluster includes sub-images PI representing color unevenness, the variance Cs is larger than when the cluster does not include sub-images PI representing color unevenness.
[0074] Even if a solid-color area represents color unevenness, the total number of clusters N can be 1 (S520: No). Also, even if multiple clusters include clusters that do not represent color unevenness and clusters that do, the distance dCL can be less than the distance threshold dCLth (S524: No). In such cases, the variance Cs of 1 or more can be a large value.
[0075] In S535, the processor 210 determines whether the variance Cs is greater than or equal to the variance threshold CsTh. The variance threshold CsTh may be determined experimentally in advance such that the variance Cs of clusters that do not contain partial images PI representing color unevenness is less than the variance threshold CsTh, and the variance Cs of clusters that contain partial images PI representing color unevenness is greater than or equal to the variance threshold CsTh. If 1 or more variances Cs are greater than or equal to the variance threshold CsTh, the result of the determination in S535 is Yes.
[0076] If the result of the judgment in S535 is Yes, in S540 the processor 210 classifies a specific subimage PI included in a cluster having a variance Cs greater than or equal to the variance threshold CsTh as a color uneven region. Then the processor 210 terminates the process in Figure 11, i.e., the process in S256 in Figure 5. In this embodiment, the processor 210 classifies the subimage PI associated with the color point PT furthest from the centroid of the color points PT included in the cluster (i.e., the color point PT with the maximum distance from the centroid) as a color uneven region. Alternatively, the processor 210 may classify the subimage PI associated with a color point PT whose distance from the centroid is greater than or equal to the distance threshold dTh as a color uneven region. The distance threshold dTh may be determined experimentally in advance such that the distance of the subimage PI representing color unevenness is greater than or equal to the distance threshold dTh, and the distance of the subimage PI not representing color unevenness is less than the distance threshold dTh.
[0077] If, in S535, all Cs are less than the variance threshold CsTh (S535: No), then in S545, the processor 210 determines that the partial image PI forming the cluster does not have color unevenness. The processor 210 then terminates the process shown in Figure 11, i.e., the process shown in S256 of Figure 5.
[0078] In S258 (Figure 5), the processor 210 records data representing the location of the partial image PI classified as a color uneven region by S256 into the storage device 215 (for example, the non-volatile storage device 230). After S258, the process moves to S160. If not all partial image PIs are classified as color uneven regions, the processor 210 skips S258.
[0079] In S232, if the size of the region of interest is less than or equal to the reference size (S232: No), the processor 210 skips S252-S256 and proceeds to S260.
[0080] In S260, processor 210 determines whether all solid fill areas have been processed. If there are any unprocessed solid fill areas remaining (S260: No), processor 210 moves to S230 and processes new solid fill areas.
[0081] If all solid color areas have been processed (S260: Yes), the processor 210 determines in S265 (Figure 6) whether or not data for color uneven areas has been recorded by S258 (Figure 5).
[0082] If data for color unevenness areas is recorded (S265: Yes), in S270, the processor 210 displays information representing the result of the color unevenness determination on the display unit 240. Figure 12(A) is a diagram showing an example of the displayed Type 1 result information. In this embodiment, the Type 1 result information Ia represents a solid color area with color unevenness (here, solid color area AL1) and a message MSa. Message MSa indicates that there is color unevenness in the solid color area. On the displayed solid color area AL1, a mark MK is displayed to highlight the color unevenness areas (here, partial images PI1, PI2). In this embodiment, the mark MK is a frame surrounding the color unevenness areas. The processor 210 determines the position of the mark MK on the solid color area AL1 using the position of the color unevenness area recorded in S258 (Figure 5). By observing the first type of result information Ia, the operator can easily recognize the judgment result of the presence of color unevenness and the location of the color unevenness. After S270, the process moves on to S280.
[0083] If no data for the color unevenness area is recorded (Figure 6: S265: No), in S275, the processor 210 displays information representing the color unevenness judgment result on the display unit 240. Figure 12(B) is a diagram showing an example of the displayed Type 2 result information. In this embodiment, Type 2 result information Ib represents the read image IMs and the message MSb. The message MSb indicates that there is no color unevenness in the read image IMs. By observing the Type 2 result information Ib, the operator can easily recognize the judgment result of no color unevenness. After S275, the process moves to S280.
[0084] In S280, the processor 210 prompts the user to select an evaluation of the color unevenness judgment result. Although not shown in the diagram, the processor 210 displays a screen on the display unit 240 for selecting one evaluation from "appropriate" and "inappropriate". The operator selects "appropriate" or "inappropriate" by operating the operation unit 250. If the operator agrees with the displayed color unevenness judgment result, the operator selects "appropriate". In the first type result information Ia in Figure 12(A), the part indicated by the mark MK may represent an intended object rather than color unevenness. In this case, the operator may select "inappropriate". In the second type result information Ib in Figure 12(B), the read image IMs may represent color unevenness. In this case, the operator may select "inappropriate".
[0085] In S285, the processor 210 determines whether "appropriate" is selected. If "appropriate" is selected (S285: Yes), the processor 210 terminates the process shown in Figures 5 and 6, i.e., the process shown in S130 of Figure 4.
[0086] If "Appropriate" is not selected (Figure 6: S285: No), in S290, the processor 210 prompts the user to choose whether or not to adjust the processing conditions. As will be described later, in this embodiment, the clustering condition C1 among the processing conditions Cp (Figure 10(A)) is the one to be adjusted. Although not shown in the illustration, the processor 210 displays a screen on the display unit 240 for selecting one option from "Required" and "Not Required". The operator selects "Required" or "Not Required" by operating the operation unit 250.
[0087] In S295, the processor 210 determines whether "Required" is selected or not. If "Required" is not selected (S295: No), the processor 210 terminates the process shown in Figures 5 and 6, i.e., the process shown in S130 of Figure 4.
[0088] If "Required" is selected (Figure 6: S295: Yes), in S300, the processor 210 adjusts the processing conditions. If the color unevenness judgment result indicates that there is color unevenness (S265: Yes), the processor 210 adjusts the processing conditions to increase the likelihood of obtaining a judgment result of no color unevenness. If the color unevenness judgment result indicates that there is no color unevenness (S265: No), the processor 210 adjusts the processing conditions to increase the likelihood of obtaining a judgment result of that there is color unevenness.
[0089] Figure 10(C) is a diagram illustrating an example of adjusting the processing condition Cp. In this embodiment, the radius Rd of the clustering condition C1 among the processing condition Cp (Figure 10(A)) is the target of adjustment. The processor 210 adjusts the radius Rd by adding an adjustment amount Rdm to the radius Rd. If the color unevenness judgment result indicates that there is color unevenness, the adjustment amount Rdm is a positive value, and the radius Rd increases. If an updated radius Rd is used, the probability of obtaining a judgment result of no color unevenness increases. If the color unevenness judgment result indicates that there is no color unevenness, the adjustment amount Rdm is a negative value, and the radius Rd decreases. If an updated radius Rd is used, the probability of obtaining a judgment result of color unevenness increases. The adjustment amount Rdm may be predetermined. Alternatively, the processor 210 may execute S254 and S256 (Figure 5) using multiple radii Rd associated with multiple adjustment amounts Rdm. The processor 210 may then adjust the radius Rd using an adjustment amount Rdm that changes the result of the color unevenness judgment.
[0090] In S305 (Figure 6), the processor 210 stores the updated processing condition data in the storage device 215 (in this case, the non-volatile storage device 230). Then, the processor 210 terminates the processing in Figures 5 and 6, i.e., the processing in S130 of Figure 4. With the termination of S130, the inspection process in Figure 4 is terminated. If the processing conditions are updated in S300 and S305, the updated processing conditions will be used in the next inspection process.
[0091] As described above, in this embodiment, the processor 210 performs the following processing according to the program 231. In S252 and S254 (Figure 5), the processor 210 classifies multiple partial image PIs into N clusters (where N is an integer greater than or equal to 1) by performing clustering using the respective colors of the multiple partial image PIs that form a region of interest (for example, a solid-color region AL1 (Figure 9(B))). The color points PT (Figure 9(D)) used for clustering are examples of information representing the color of a partial image PI. As explained in S225 (Figure 5), a solid-color region is a region included in the read image IMs (Figure 8(B)), which is an example of the image to be processed, and is a region that satisfies predetermined solid-color conditions indicating small color variation. As explained in Figures 10(A) and 10(B), in this embodiment, the clustering is configured to automatically determine the total number of clusters N. The total number N varies depending on the multiple partial image PIs being clustered.
[0092] As explained in S256 of Figure 5, specifically in S520, S524, and S525 of Figure 11, the processor 210 determines that the partial image PI (i.e., solid color region) of an outlier cluster has color unevenness in the first case Ca, where the total number of clusters N is 2 or more (S520: Yes) and the distance dCL is greater than or equal to the distance threshold dCLth (S524: Yes) (S525).
[0093] With this configuration, the processor 210 can appropriately determine that, in the first case Ca, the solid color area has color unevenness. For example, if the solid color area has localized color unevenness within the solid color area, the processor 210 can appropriately determine that the solid color area has color unevenness. Let's assume that the presence or absence of color unevenness is determined using the overall color variation of the solid color area (e.g., the dispersion of color values). If the area of the area without color unevenness is large compared to the area of the area with color unevenness, the color variation becomes small, and therefore color unevenness is not detected. In this embodiment, the processor 210 can detect such localized color unevenness.
[0094] In this embodiment, the first case Ca, in which the total number of clusters N is 2 or more (Figure 11: S520: Yes) and the judgment result in S524 is Yes, is an example of a first specific case in which the total number of clusters N is 2 or more and the solid color area is judged to have color unevenness.
[0095] Furthermore, in this embodiment, as explained in S254 (Figure 5), Figure 10(A), and Figure 10(B), the clustering includes clustering using the DBSCAN (Density-based spatial clustering of applications with noise) method. Therefore, the processor 210 can appropriately form clusters using the respective colors of multiple partial images PI that form solid color regions.
[0096] Furthermore, in this embodiment, as described in S252 (Figure 5) and Figure 9(C), the processor 210 uses the size setting 235 (Figure 1) to determine the size of the partial image PI (here, height Hpi and width Wpi). The size setting 235 represents the size specified by the user (here, height Hus and width Wus). As mentioned above, the smaller the size of the minimum detectable color unevenness, the smaller the size of the partial image PI. The processor 210 allows the user to adjust the size of the minimum color unevenness to be detected.
[0097] Furthermore, in this embodiment, as explained in S232 (Figure 5), the processor 210 does not make a determination (S256) regarding the presence or absence of color unevenness for solid color areas having a size smaller than or equal to the reference size (S232: No). The processor 210 makes a determination (S256) regarding the presence or absence of color unevenness for solid color areas having a size larger than the reference size (S232: Yes). Then, as explained in Figure 11, the processor 210 determines that the solid color area has color unevenness in the first case Ca, where the total number of clusters N in such solid color areas is 2 or more. The processor 210 can reduce the possibility of obtaining a determination result of color unevenness due to color unevenness that is too small to be noticeable.
[0098] Furthermore, in this embodiment, as explained in S254 (Figure 5), Figure 10(A), and Figure 10(A), the clustering is configured to classify multiple partial images PI into N clusters according to the clustering condition (here, clustering condition C1 (Figure 10(A))). As explained in Figures 9(E), 10(B), and 11, in the first case Ca where the total number of clusters N is 2 or more, the multiple partial images PI are classified into N clusters, which include a first cluster CL1 that is not associated with color unevenness and a second cluster CL2 that is associated with color unevenness. In S270 (Figure 6), the processor 210 displays the first type of result information Ia (Figure 12(A)) on the display unit 240. The first type of result information Ia represents at least a portion of the solid color area AL1 that is determined to have color unevenness, including the partial images PI1 and PI2 included in the second cluster CL2. In S285 and S295 (Figure 6), the processor 210 allows the user to choose between adjusting or maintaining the clustering condition C1. If adjusting the clustering condition C1 is selected (S285: No, S295: Yes), in S300, the processor 210 adjusts the clustering condition C1. In the first case Ca (Figure 11), where the total number of clusters N is 2 or more, i.e., the color unevenness judgment result indicates the presence of color unevenness (Figure 6: S265: Yes), the processor 210 increases the radius Rd, as explained in Figure 10(C). That is, the processor 210 adjusts the clustering condition C1 so that the probability of multiple sub-images PI being classified into one cluster is higher compared to before the adjustment of the clustering condition C1. With this configuration, the adjusted clustering condition C1 can lead to a more appropriate color unevenness judgment result compared to the clustering condition C1 before adjustment.
[0099] Furthermore, in this embodiment, as explained in S520, S535, and S545 of Figure 11, the processor 210 determines that the solid-color areas forming the clusters do not have color unevenness in a second case Cb where the total number of clusters N is 1 (S520: No) and the variance Cs is less than the variance threshold CsTh (S535: No) (S545). This second case Cb is an example of a second specific case in which the total number of clusters N is 1 and the solid-color areas are determined not to have color unevenness. Also, in S275 (Figure 6), the processor 210 displays the second type of result information Ib (Figure 12(B)) on the display unit 240. The second type of result information Ib represents at least a portion of the solid-color areas (for example, solid-color areas AL1 and AL2) that were determined not to have color unevenness. In S285 and S295 (Figure 6), the processor 210 allows the user to choose between adjusting or maintaining the clustering condition C1. If adjusting the clustering condition C1 is selected (S285: No, S295: Yes), in S300, the processor 210 adjusts the clustering condition C1. In the second case Cb (Figure 11), where the total number of clusters N is 1, i.e., the color unevenness judgment result indicates no color unevenness (Figure 6: S265: No), the processor 210 reduces the radius Rd, as explained in Figure 10(C). That is, the processor 210 adjusts the clustering condition C1 so that multiple partial images are more likely to be classified into two or more clusters compared to before the adjustment of the clustering condition C1. With this configuration, the adjusted clustering condition C1 can lead to a more appropriate color unevenness judgment result compared to the clustering condition C1 before adjustment.
[0100] Furthermore, in this embodiment, as explained in S520, S524, S535, and S545 of Figure 11, the processor 210 determines that the solid-color areas forming the clusters do not have color unevenness in the third case Cc, where the total number of clusters N is 2 or more (S520: Yes), all distances dCL are less than the distance threshold dCLth (S524: No), and all variances Cs are less than the variance threshold CsTh (S535: No). As explained in S522, distance dCL is the distance between clusters. The relationship between multiple clusters where all distances dCL are less than the distance threshold dCLth (S524: No) is an example of a predetermined proximity relationship indicating that multiple clusters are close to each other. The result of the determination in S524 being No indicates that N clusters have a predetermined proximity relationship. With this configuration, the processor 210 can reduce the possibility of incorrectly determining that a solid-color area has color unevenness when the solid-color area does not. In the third case Cc described above, the third specific case is an example of a case in which N clusters have a predetermined proximity relationship and the solid-color area is determined not to have color unevenness.
[0101] Furthermore, in this embodiment, as explained in S520, S535, and S540 of Figure 11, the processor 210 determines that the solid-color areas forming the clusters have color unevenness in the fourth case Cd, where the total number of clusters N is 1 (S520: No) and the variance Cs is greater than or equal to the variance threshold CsTh (S535: Yes) (S540). As explained in S530, the variance Cs is an example of an index value that indicates the degree of color variation among multiple partial images PI included in the cluster. With this configuration, the processor 210 can appropriately determine that the solid-color areas have color unevenness when the total number of clusters N is 1 and the solid-color areas represent color unevenness. Note that the above fourth case Cd is an example of a fourth specific case where the total number of clusters N is 1 and the index value indicating the degree of variation among multiple partial images is greater than or equal to the threshold.
[0102] Furthermore, in this embodiment, in the fourth case Cd (Figure 11), at S540, the processor 210 classifies the partial image PI with the longest distance among the multiple partial images PI into a color unevenness region. Here, the distance is the distance between the center of a cluster containing multiple partial images PI and the partial image PI. The centroid of the color point PT included in the cluster is used as the cluster center. The distance is the distance between the centroid and the color point PT representing the partial image PI. At S270 (Figure 6), the processor 210 displays the partial image PI classified as a color unevenness region on the display unit 240 (Figure 12(A)). With this configuration, the processor 210 can display the partial image PI representing the color unevenness on the display unit 240. The user can observe the displayed color unevenness. Note that the partial image PI classified as a color unevenness region may be one or more partial images with a distance of dTh or greater than or equal to the distance threshold dTh, instead of the partial image PI with the longest distance.
[0103] Furthermore, in this embodiment, as explained in S120 (Figure 4), the read image IMs (Figure 3(B)), which is an example of the image to be processed, represents the optically read printed image IMpp. The printed image IMpp is an image printed using the data of the print image IMp (Figure 3(A)). The print image IMp is an example of the source image used for printing. Also, in the first case Ca (Figure 11), in S525, the processor 210 classifies the partial image PI included in the outlier cluster into a color unevenness region. The outlier cluster is the cluster with the fewest number of partial image PIs among the N clusters. In S270 (Figure 6), the processor 210 displays the partial image PI classified as a color unevenness region on the display unit 240 (Figure 12(A)). With this configuration, the processor 210 can display the partial image PI representing the color unevenness on the display unit 240. The user can observe the displayed color unevenness.
[0104] B. Second example: Figures 13(A) and 13(B) illustrate another example of clustering. In this example, in S254 (Figure 5), clustering called Mean Shift is performed instead of DBSCAN. A library called "sklearn" may be used for clustering by Mean Shift. The inspection process in this example is the same as the inspection process in the first example, except that the clustering method is different. In this example, program 231 is configured to perform clustering by Mean Shift.
[0105] The Mean Shift process is outlined below. Figure 13(A) shows the processing conditions for this embodiment. The data for processing condition Cpb is stored in the non-volatile memory device 230. The processing condition Cpb for this embodiment includes the clustering condition C1b. The clustering condition C1b represents the bandwidth Q. The processor 210 calculates the average point GCb (i.e., the centroid) of the color points PT that are included in the bandwidth Q range centered on the color point PTi of interest (here, the range of a sphere with radius Q centered on the color point PTi of interest). The processor 210 shifts (i.e., moves) the color point PTi of interest to the average point GCb. The processor 210 shifts each of the multiple color points PT as described above (hereinafter referred to as the shift process). The processor 210 repeats the shift process until the termination condition is met. The termination condition indicates the convergence of multiple color points PT (described later). Through the above process, multiple color points PT that show similar colors move to approximately the same position. After the shift process has been repeated, the processor 210 classifies the color points PT within the bandwidth Q centered on the color point PTi into the same cluster as the color point PTi. In this way, the processor 210 determines the cluster to which each color point PT belongs. As a result, multiple subimages PI representing similar colors form one cluster. Multiple subimages PI representing dissimilar colors form different clusters. Note that during multiple shift processes, the processor 210 may aggregate multiple color points PT that are close to each other (for example, multiple color points PT contained in a sphere with radius Q) into a single color point PT.
[0106] Figure 13(B) is a diagram illustrating an example of clustering. The diagram shows multiple color points PT, the same as those in Figure 10(B). Each color point PT is shifted by a shift process based on the bandwidth Q. In the example in Figure 13(B), three clusters CL1b-CL3b are formed. Clusters CL1b and CL2b are the same as clusters CL1 and CL2 in Figure 10(B), respectively. Unlike the example in Figure 10(B), a color point PTn that is far from other color points PT forms a single cluster CL3b.
[0107] The termination conditions may be various conditions indicating the convergence of multiple color points PT. For example, the termination condition may be that the first movement amount condition is met. The first movement amount condition indicates that the movement amount of each color point PT is less than or equal to a predetermined first movement amount threshold. Alternatively, the termination condition may be that either the first movement amount condition or the first iteration count condition is met. The first iteration count condition indicates that the number of iterations of the shift process exceeds a predetermined first upper limit.
[0108] The clustering condition C1b (here, bandwidth Q) may be determined experimentally in advance such that the total number of clusters N formed is 1 when the region of interest does not show color unevenness, and the total number of clusters N formed is 2 or more when the region of interest shows color unevenness. The bandwidth Q may be determined using multiple read images representing various color unevennesses. For example, the bandwidth Q may be determined to be smaller than the distance between the color points PT of a partial image PI representing color unevenness and the color points PT of a partial image PI that does not show color unevenness. This makes it possible to separate the color points PT of a partial image PI representing color unevenness from the color points PT of a partial image PI that does not show color unevenness.
[0109] Figure 13(B) shows the distances dCL1, dCL2, and dCL3 calculated in S522 (Figure 11). The first distance dCL1 is the distance between the centroid points PCT1b and PCT2b of clusters CL1b and CL2b. The second distance dCL2 is the distance between the centroid points PCT2b and PCT3b of clusters CL2b and CL3b. The third distance dCL3 is the distance between the centroid points PCT3b and PCT1b of clusters CL3b and CL1b.
[0110] In this embodiment, the color unevenness inspection process is the same as in the first embodiment (Figures 5 and 6), except that the clustering method is different. If a result indicating color unevenness is obtained in S256 (Figure 5) (Figure 6: S265: Yes), in S270, the processor 210 displays the same information as the first type result information Ia in Figure 12(A) on the display unit 240. If a result indicating no color unevenness is obtained in S256 (Figure 6: S265: No), in S275, the processor 210 displays the same information as the second type result information Ib in Figure 12(B) on the display unit 240.
[0111] In S290, the processor 210 prompts the user to choose whether or not to adjust the processing conditions. If "Yes" is selected (Figure 6: S295: Yes), in S300, the processor 210 adjusts the processing conditions. Figure 13(C) shows an example of adjusting the processing conditions. In this embodiment, the bandwidth Q of the clustering condition C1b among the processing conditions Cpb (Figure 13(A)) is the target of adjustment. The processor 210 adjusts the bandwidth Q by adding an adjustment amount Qm to the bandwidth Q. If the color unevenness judgment result indicates that there is color unevenness, the adjustment amount Qm is a positive value, and the bandwidth Q increases. If the updated bandwidth Q is used, the probability of obtaining a judgment result of no color unevenness increases. If the color unevenness judgment result indicates that there is no color unevenness, the adjustment amount Qm is a negative value, and the bandwidth Q decreases. If the updated bandwidth Q is used, the probability of obtaining a judgment result of color unevenness increases. The adjustment amount Qm may be predetermined. Alternatively, the processor 210 may perform steps S254 and S256 (Figure 5) using multiple bandwidths Q associated with multiple adjustment amounts Qm. The processor 210 may then adjust the bandwidth Q using an adjustment amount Qm that changes the result of the color uniformity judgment.
[0112] As described above, the clustering method may be the Mean Shift method instead of the DBSCAN method. In this case as well, the processor 210 can appropriately form clusters using the respective colors of multiple partial images PI that form solid color regions.
[0113] C. Third embodiment: Figures 14(A) and 14(B) show another example of clustering. In this example, clustering called k-means is performed in S254 (Figure 5). A library called "sklearn" may be used for k-means clustering. The inspection process in this example is the same as the inspection process in the first example, except that the clustering method and the process for determining the presence or absence of color unevenness in S256 (Figure 5) are different. In this example, program 231 is configured to perform k-means clustering and the process for determining the presence or absence of color unevenness, which will be described later.
[0114] Figure 14(A) shows the processing conditions of this embodiment. The data for the processing conditions Cpc is stored in the non-volatile storage device 230. The processing conditions Cpc of this embodiment include the clustering condition C1c and the decision condition C2c. The clustering condition C1c represents the number of clusters k. In this embodiment, unlike DBSCAN and Mean Shift described above, the total number of clusters formed by clustering (here, the number of clusters k) is predetermined. Hereafter, the number of clusters k will be assumed to be 2. The decision condition C2c represents the distance threshold dLct. Details of the distance threshold dLct will be described later.
[0115] The k-means approach is outlined below. The processor 210 randomly determines the initial center of each of the k clusters. The processor 210 classifies each color point PT into the cluster whose center is closest to the color point PT. The processor 210 updates the center of each of the k clusters to the average point (i.e., the centroid) of the color points PT contained in the cluster. The processor 210 repeats the classification of color points PT and the updating of cluster centers until the termination condition is met. The termination condition indicates the convergence of the k centers of the k clusters (i.e., the convergence of each element of the k clusters) (described later). Through the above process, the k centers of the k clusters each move to a point near the centroid of multiple color points PT that represent similar colors. That is, each of the k clusters is formed by multiple subimages PI that represent similar colors to each other. Alternatively, instead of randomly determining the initial center of the clusters, the processor 210 may randomly assign each color point PT to one of the k clusters.
[0116] Figure 14(B) is a diagram illustrating an example of clustering. The same multiple color points PT as in Figure 10(B) are shown in the diagram. Through repeated classification of color points PT and updating of the cluster centers, the center Ck1 of the first cluster CL1c moves closer to the centroid of multiple color points PT of multiple sub-images PI that do not represent color unevenness. Multiple sub-images PI that do not represent color unevenness form the first cluster CL1c. The center Ck2 of the second cluster CL2c moves closer to the centroid of multiple color points PT of multiple sub-images PI that represent color unevenness. Multiple sub-images PI that represent color unevenness form the second cluster CL2c.
[0117] The termination conditions may be various conditions indicating the convergence of the k centers of the k clusters. For example, the termination condition may be that the second migration condition is met. The second migration condition indicates that the migration amount of each of the k centers is less than or equal to a predetermined second migration threshold. Alternatively, the termination condition may be that either the second migration condition or the second iteration count condition is met. The second iteration count condition indicates that the number of iterations between the classification of color points PT and the updating of cluster centers exceeds a predetermined second upper limit.
[0118] In this embodiment, the total number of clusters k is predetermined. Therefore, in S256 (Figure 5), a different process is executed than the process in Figure 11. Figure 15 is a flowchart showing an example of the process for determining the presence or absence of color unevenness in this embodiment. In S615, the processor 210 calculates the distance dLc between clusters. The method for calculating the distance dLc is the same as the method for calculating the distance dCL between clusters in S522 (Figure 11). If the solid color area represents color unevenness, a large distance dLc may be calculated. If the solid color area does not represent color unevenness, a small distance dLc may be calculated. If the total number of clusters k is 3 or more, the processor 210 calculates the distance dLc for all cluster pairs formed by k clusters.
[0119] In S620, the processor 210 refers to the distance threshold dLct included in the processing condition Cpc (Figure 14) and determines whether a distance dLct greater than or equal to the distance threshold dLct has been calculated. The distance threshold dLct may be determined experimentally in advance such that the distance dLct between a cluster that does not represent color unevenness and a cluster that represents color unevenness is greater than or equal to the distance threshold dLct, and the distance dLct between two clusters that do not represent color unevenness is less than the distance threshold dLct. If 1 or more distances dLct are greater than or equal to the distance threshold dLct, the result of the determination in S620 is Yes.
[0120] If the result of the judgment in S620 is Yes, in S622 the processor 210 obtains the total number Nel of subimage PIs included in the outlier cluster. In this embodiment, the outlier cluster is the cluster with the fewest number of subimage PIs among the k clusters. If the solid color area has color unevenness, the outlier cluster is formed by subimage PIs representing the color unevenness, as shown in the second cluster CL2c in Figure 14(B). The total number Nel of subimage PIs is small. If the solid color area does not have color unevenness, multiple subimage PIs showing similar colors are forcibly classified into k clusters. In this case, the total number Nel of subimage PIs in the outlier cluster may be a larger value than the total number Nel of subimage PIs in the cluster representing color unevenness.
[0121] In S624, the processor 210 determines whether the total number Nel is less than the threshold NelTh. The threshold NelTh may be determined experimentally in advance such that the total number Nel of the partial image PI of clusters representing color unevenness is less than the threshold NelTh, and the total number Nel of the partial image PI of clusters not representing color unevenness is greater than or equal to the threshold NelTh. If the total number Nel of 1 or more is less than the threshold NelTh, the result of the determination in S624 is Yes.
[0122] If the result of the judgment in S624 is Yes, in S625 the processor 210 classifies the partial image PI included in the outlier cluster as a color uneven region. In this embodiment, all partial image PI included in the outlier cluster are classified as color uneven regions. After S625, the processor 210 terminates the process in Figure 15, that is, the process in S256 in Figure 5.
[0123] If, in S620, all distances dLc are less than the distance threshold dLct (S620: No), the processor 210 proceeds to S630. If, in S624, the total number of partial images PI of outlier clusters Nel is greater than or equal to the threshold NelTh (S624: No), the processor 210 proceeds to S630.
[0124] S630, S635, S640, and S645 are the same as S530, S535, S540, and S545 in Figure 11, respectively.
[0125] In S630, processor 210 calculates the variance Csc for each of the k clusters. The method for calculating the variance Csc is the same as the method in S530 (Figure 11). Even if the k clusters include clusters representing color unevenness, the distance dLc may be less than the distance threshold dLct (S620: No). Also, even if the k clusters include clusters representing color unevenness, the total number of outlier clusters Nel may be greater than or equal to the threshold NelTh (S624: No). In these cases, a large variance Csc may be calculated.
[0126] In S635, the processor 210 determines whether the distribution Csc is greater than or equal to the distribution threshold CscTh. The distribution threshold CscTh may be determined in the same way as the distribution threshold CsTh used in S535 (Figure 11). If 1 or more distributions Csc are greater than or equal to the distribution threshold CscTh, the result of the determination in S535 is Yes.
[0127] If the result of the judgment in S635 is Yes, in S640, the processor 210 classifies a specific partial image PI included in a cluster having a distribution Csc greater than or equal to the distribution threshold CscTh as a color uneven region. Then, the processor 210 terminates the process in Figure 15, i.e., the process in S256 in Figure 5. The method for selecting a specific partial image PI is the same as the selection method in S540 (Figure 11). For example, the processor 210 classifies the partial image PI associated with the color point PT furthest from the centroid of the color points PT included in the cluster as a color uneven region. Alternatively, the processor 210 may classify a partial image PI associated with a color point PT whose distance from the centroid is greater than or equal to the distance threshold dThc as a color uneven region. The distance threshold dThc is predetermined by the same method as the method for determining the distance threshold dTh in S540 (Figure 11).
[0128] If, in S635, all Csc values are less than the distribution threshold CscTh (S635: No), then in S645, the processor 210 determines that the area of interest does not have color unevenness. The processor 210 then terminates the process shown in Figure 15, i.e., the process shown in S256 of Figure 5.
[0129] As described above, in this embodiment, the color unevenness inspection process is the same as in the first embodiment (Figures 5 and 6), except that the clustering method and the process in S256 (Figure 5) are different. If a result indicating color unevenness is obtained in S256 (Figure 6: S265: Yes), in S270, the processor 210 displays the same information as the first type result information Ia in Figure 12(A) on the display unit 240. If a result indicating no color unevenness is obtained in S256 (Figure 6: S265: No), in S275, the processor 210 displays the same information as the second type result information Ib in Figure 12(B) on the display unit 240.
[0130] In S290, the processor 210 prompts the user to choose whether or not to adjust the processing conditions. If "Yes" is selected (Figure 6: S295: Yes), in S300, the processor 210 adjusts the processing conditions. Figure 14(C) is a diagram showing an example of processing condition adjustment. In this embodiment, the distance threshold dLct of judgment condition C2c among the processing conditions Cpc (Figure 14(A)) is the target of adjustment. The processor 210 adjusts the distance threshold dLct by adding an adjustment amount dLctm to the distance threshold dLct. If the judgment result for color unevenness indicates that there is color unevenness, the adjustment amount dLctm is a positive value, and the distance threshold dLct increases. When the updated distance threshold dLct is used, the probability of obtaining a judgment result of no color unevenness increases. If the judgment result for color unevenness indicates that there is no color unevenness, the adjustment amount dLctm is a negative value, and the distance threshold dLct decreases. When an updated distance threshold dLct is used, the likelihood of obtaining a judgment result indicating color unevenness increases. The adjustment amount dLctm may be predetermined. Alternatively, the processor 210 may perform S254 and S256 (Figure 5) using multiple distance thresholds dLct associated with multiple adjustment amounts dLctm. The processor 210 may then adjust the distance threshold dLct using adjustment amounts dLctm that change the judgment result for color unevenness.
[0131] As described above, in this embodiment, the processor 210 performs the following processing according to the program 231. In S252 and S254 (Figure 5), the processor 210 classifies the multiple partial images PI into k clusters (where k is an integer of 2 or more) by performing clustering using the respective colors of the multiple partial images PI that form the region of interest (for example, the solid-color region AL1 (Figure 9(B))). As explained in S225 (Figure 5), the solid-color region is a region included in the read image IMs (Figure 8(B)), which is an example of the image to be processed, and is a region that satisfies predetermined solid-color conditions indicating small color variation. As explained in Figures 14(A) and 14(B), in this embodiment, the total number of clusters k is predetermined.
[0132] As explained in Figure 15, the processor 210 uses the distance dLc (S615, S620), the total number of subimage PIs Nel (S622, S624) of outlier clusters, and the variance Csc (S630, S635) of each cluster to determine whether the region of interest (e.g., the solid color region AL1 (Figure 9(B))) has color unevenness. The distance dLc of all cluster pairs formed by k clusters, referenced in S620, is an example of first-kind information indicating the distance between the k clusters. In S622, the total number of subimage PIs for each of the k clusters is used for the selection of outlier clusters. The total number of subimage PIs for each cluster is an example of second-kind information indicating the number of elements in each cluster. The variance Csc is an example of third-kind information indicating the degree of color variation among multiple subimage PIs within a cluster.
[0133] With this configuration, the processor 210 can appropriately determine whether or not a solid-color area has color unevenness using k clusters obtained by clustering. For example, the result of the determination using either the first type information, the second type information, or the third type information may differ between the case where the solid-color area does not represent color unevenness and the case where the solid-color area has localized color unevenness within the solid-color area. In this case, the processor 210 can appropriately determine that the solid-color area has color unevenness when the solid-color area has localized color unevenness within the solid-color area.
[0134] Furthermore, in this embodiment, as explained in S254 (Figure 5), Figure 14(A), and Figure 14(B), the clustering includes clustering using the k-means method. Therefore, the processor 210 can appropriately form clusters using the respective colors of multiple sub-images PI that form solid-color regions.
[0135] Furthermore, in this embodiment, the process in S252 (Figure 5) is the same as the process in the first embodiment described above. Similar to the first embodiment, the processor 210 allows the user to adjust the size of the smallest color unevenness to be detected.
[0136] Furthermore, in this embodiment, the process in S232 (Figure 5) is the same as the process in the first embodiment described above. For solid color areas having a size smaller than or equal to the reference size (S232: No), the processor 210 does not make a judgment (S256) about the presence or absence of color unevenness. In S256, the processor 210 makes a judgment about the presence of color unevenness in a specific solid color area that has a size larger than the reference size. The processor 210 can reduce the possibility of obtaining a judgment result of color unevenness due to color unevenness that is too small to be noticeable.
[0137] Furthermore, in this embodiment, as explained in Figures 14(A) and 15, the process for determining the presence or absence of color unevenness is configured to determine whether or not a solid-color area has color unevenness according to the determination condition C2c (here, the distance threshold dLct). As explained in Figures 14(B) and 15, if it is determined that a solid-color area has color unevenness, the multiple partial images PI are classified into k clusters, which include a first cluster CL1c that is not associated with color unevenness and a second cluster CL2c that is associated with color unevenness. In this case, in S270 (Figure 6), the processor 210 displays information similar to the first type of result information Ia (Figure 12(A)) on the display unit 240. The displayed information, similar to the first type of result information Ia, represents at least a portion of the solid-color area that has been determined to have color unevenness, including partial images (e.g., partial images PI1, PI2) included in the second cluster CL2c. In S285 and S295 (Figure 6), the processor 210 allows the user to choose between adjusting or maintaining the judgment condition C2c. If adjusting the judgment condition C2c is selected (S285: No, S295: Yes), in S300, the processor 210 adjusts the judgment condition C2c. If the judgment result for color unevenness indicates the presence of color unevenness (Figure 6: S265: Yes), the processor 210 increases the distance threshold dLct, as explained in Figure 14(C). That is, the processor 210 adjusts the judgment condition C2c so that the probability of obtaining a judgment result of No in S620 (Figure 15) is higher compared to before the adjustment of the judgment condition C2c. Since the probability of obtaining a judgment result of No in S620 is higher, the probability of executing S625 (classification of partial image PI into color uneven areas) is lower. That is, the probability of determining that the solid color area does not have color unevenness is higher. With this configuration, the adjusted judgment condition C2c can derive a more appropriate judgment result for color unevenness compared to the unadjusted judgment condition C2c.
[0138] In this embodiment, if the color unevenness judgment result indicates no color unevenness (Figure 6: S265: No), in S275 (Figure 6), the processor 210 displays information similar to the second type result information Ib (Figure 12(B)) on the display unit 240. The displayed information, similar to the second type result information Ib, represents at least a portion of the solid color area that has been determined to have no color unevenness. In S285 and S295 (Figure 6), the processor 210 allows the user to choose between adjusting or maintaining the judgment condition C2c. If adjustment of the judgment condition C2c is selected (S285: No, S295: Yes), in S300, the processor 210 adjusts the judgment condition C2c. If the color unevenness judgment result indicates no color unevenness (Figure 6: S265: No), as explained in Figure 14(C), the processor 210 reduces the distance threshold dLct. In other words, the processor 210 adjusts the judgment condition C2c so that the probability of obtaining a "Yes" judgment result in S620 (Figure 15) is higher compared to the judgment condition C2c before adjustment. Since the probability of obtaining a "Yes" judgment result in S620 is higher, the probability of executing S625 (classification of partial image PI into color uneven areas) is higher. In other words, the probability of determining that a solid color area has color unevenness is higher. With this configuration, the adjusted judgment condition C2c can derive a more appropriate judgment result for color unevenness compared to the judgment condition C2c before adjustment.
[0139] Furthermore, in this embodiment, as explained in S620 and S635 of Figure 15, the processor 210 determines that the area of interest does not have color unevenness in the fifth case Ce, where all distances dLc are less than the distance threshold dLct (S620: No) and all Csc are less than the dispersion threshold CscTh (S635: No). Distance dLc is the distance between clusters. All distances dLc referenced in S620 are an example of first-class information indicating the distance between k clusters. The relationship between multiple clusters where all distances dLc are less than the distance threshold dLct (S620: No) is an example of a predetermined proximity relationship indicating that multiple clusters are close to each other. When the result of the determination in S620 is No, the first-class information indicates that the k clusters have a predetermined proximity relationship. With this configuration, the processor 210 can reduce the possibility of incorrectly determining that a solid-color area has color unevenness when the solid-color area does not represent color unevenness. In the fifth case described above, Ce is an example of a specific case in which k clusters have a predetermined proximity relationship and the solid color area is judged to have no color unevenness.
[0140] Furthermore, in this embodiment, as explained in S620 and S635 of Figure 15, the processor 210 determines that the region of interest has color unevenness in the sixth case Cf, where all distances dLc are less than the distance threshold dLct (S620: No), and one or more variances Csc are greater than or equal to the variance threshold CscTh (S635: Yes). Variance Csc is an example of third-class information indicating the degree of color variation between multiple subimages within a cluster. A judgment result of Yes in S635 indicates that the third-class information indicating the degree of color variation between multiple subimages within the cluster of interest, which is one of the k clusters, is greater than or equal to the threshold. With this configuration, the processor 210 can appropriately determine that a solid-color region has color unevenness when the solid-color region represents color unevenness. In the sixth case described above, Cf is an example of a specific case in which the third type of information indicating the degree of color variation between multiple partial images within the cluster of interest, which is one of the k clusters, is above a threshold, and the solid-colored area is judged to have color unevenness.
[0141] Furthermore, in this embodiment, in the sixth case Cf (Figure 15), at S640, the processor 210 classifies the partial image PI with the longest distance among the multiple partial images PI into a color unevenness region. Here, the distance is the distance between the center of a cluster containing multiple partial images PI and the partial image PI. The centroid of the color points PT included in the cluster is used as the cluster center. At S270 (Figure 6), the processor 210 displays the partial image PI classified as a color unevenness region on the display unit 240 (Figure 12(A)). With this configuration, the processor 210 can display the partial image PI representing the color unevenness on the display unit 240. The user can observe the displayed color unevenness. Note that the partial image PI classified as a color unevenness region may be one or more partial images with a distance greater than or equal to the distance threshold dThc, instead of the partial image PI with the longest distance.
[0142] Furthermore, in this embodiment, as in the first embodiment, the read image IMs (Figure 3(B)), which is an example of the image to be processed, represents the optically read printed image IMpp. The printed image IMpp is an image printed using the data of the print image IMp (Figure 3(A)). The print image IMp is an example of the source image used for printing. Also, in the seventh case Cg, where the judgment result of S620 (Figure 15) is Yes and the judgment result of S624 is Yes, the processor 210 classifies the partial image PI included in the outlier cluster into a color unevenness region in S625. The outlier cluster is the cluster with the fewest number of partial image PIs among the k clusters. In S270 (Figure 6), the processor 210 displays the partial image PI classified as a color unevenness region on the display unit 240 (Figure 12(A)). With this configuration, the processor 210 can display the partial image PI representing color unevenness on the display unit 240. Users can observe the displayed color inconsistencies.
[0143] D. Fourth embodiment: Figure 16 is a flowchart illustrating another embodiment of the color uniformity inspection process. In this embodiment, the processor 210 uses the standard deviation of pixel values within the area of interest (i.e., the solid color area) to determine color uniformity. If it is not easy to determine color uniformity using the standard deviation, it uses clustering to determine color uniformity. In this embodiment, the processes in Figures 16 and 6 are performed in S130 (Figure 4) instead of the processes in Figures 5 and 6. In Figure 16, the same reference numerals are used for the same steps as in Figure 5, and their explanations are omitted. In this embodiment, the program 231 is configured to perform the processes in Figures 16 and 6 instead of the processes in Figures 5 and 6.
[0144] Each step from S210 to S232 is the same as each step from S210 to S232 in Figure 5. If, in S232, the size of the area of interest is less than or equal to the reference size (S232: No), the processor 210 determines in S234d that the area of interest does not have color unevenness and proceeds to S260.
[0145] In S232, if the size of the region of interest is larger than the reference size (S232: Yes), in S236d, the processor 210 calculates the standard deviation sda of the pixel values within the region of interest. The method for calculating the standard deviation sda may be the same as the method for calculating the standard deviation sd in S420 and S425 in Figure 7. The standard deviation sda may be calculated for one color component or for multiple color components.
[0146] In S238d, processor 210 determines whether the standard deviation sda is greater than the first threshold sda_th1. The first threshold sda_th1 may be determined experimentally in advance such that when the solid color area represents a large color unevenness, the standard deviation sda is greater than the first threshold sda_th1, and when the solid color area does not represent a large color unevenness, the standard deviation sda is less than or equal to the first threshold sda_th1. When the solid color area represents a small color unevenness, the standard deviation sda may be less than or equal to the first threshold sda_th1.
[0147] When the standard deviations sda of multiple color components are calculated, the first threshold sda_th1 may be determined for each color component. The result of S238d may be Yes if the standard deviation sda of one or more color components is greater than the corresponding first threshold sda_th1. The result of S238d may be No if the standard deviations sd of all color components are less than or equal to the corresponding first threshold sda_th1.
[0148] If the result of the judgment in S238d is Yes, the processor 210 determines in S240d that the area of interest has color unevenness. The processor 210 classifies the entire area of interest as a color unevenness area. The processor 210 records the data representing the location of the area of interest as data indicating a color unevenness area in the storage device 215 (for example, the non-volatile storage device 230). After S240d, the process moves to S260.
[0149] If the result of the judgment in S238d is No, the processor 210 determines in S242d whether the standard deviation sda is smaller than the second threshold sda_th2. The second threshold sda_th2 may be determined experimentally in advance such that the standard deviation sda is less than the second threshold sda_th2 when the solid color area represents a single-color area, and the standard deviation sda is greater than or equal to the second threshold sda_th2 when the solid color area represents a color unevenness. Even if the area of color unevenness is small relative to the area of the solid color area, if the color unevenness can be recognized as a defect by the user, it is preferable that the second threshold sda_th2 be determined such that the standard deviation sda is greater than or equal to the second threshold sda_th2. In either case, the second threshold sda_th2 is smaller than the first threshold sda_th1.
[0150] When the standard deviations sda of multiple color components are calculated, the second threshold sda_th2 may be determined for each color component. The result of S242d may be Yes if the standard deviations sd of all color components are less than the corresponding second threshold sda_th2. The result of S242d may be No if the standard deviations sda of one or more color components are greater than or equal to the corresponding second threshold sda_th2.
[0151] If the result of S242d is Yes, the processor 210 determines in S244d that the area of interest does not have color unevenness and proceeds to S260.
[0152] If the result of S242d is No, the processor 210 executes S252-S258. Each step of S252-S258 is the same as each step of S252-S258 in Figure 5. The processor 210 uses clustering to determine whether or not there is color unevenness. Various clustering methods may be used (for example, DBSCAN (Figure 10(A)), Mean Shift (Figure 13(A)), or k-means (Figure 14(A))). After S258, the process moves to S260.
[0153] S260 is the same as S260 in Figure 5. If there are unprocessed solid areas remaining (S260: No), the processor 210 moves to S230 and processes new solid areas. If all solid areas have been processed (S260: Yes), the processor 210 moves to S265 (Figure 6). The processor 210 executes the process shown in Figure 6. In S265-S275, the processor 210 displays information representing the result of the color unevenness judgment on the display unit 240. In S280-S305, the processor 210 allows the user to choose between adjusting or maintaining the processing conditions, and adjusts the processing conditions if adjustment is selected. The conditions to be adjusted may be various conditions suitable for the clustering method and the color unevenness judgment process (for example, Figures 10(C), 13(C), and 14(C)). With the above steps completed, the process shown in Figures 16 and 6, i.e., the process in S130 of Figure 4, is finished.
[0154] As described above, in this embodiment, the processor 210 uses the standard deviation sda of the solid-color area to determine whether or not the solid-color area has color unevenness. The standard deviation sda is an example of a color variation index that indicates the degree of color variation within the solid-color area. The determination of color unevenness using the standard deviation sda is performed as follows: If the standard deviation sda is greater than the first threshold sda_th1 (S238d: Yes), in S240d, the processor 210 determines that the solid-color area has color unevenness. If the standard deviation sda is less than the second threshold sda_th2, which is smaller than the first threshold sda_th1 (S242d: Yes), in S244d, the processor 210 determines that the solid-color area does not have color unevenness. If the standard deviation sda is greater than or equal to the second threshold sda_th2 and less than or equal to the first threshold sda_th1 (S238d: No, and S242d: No), then in S243, the processor 210 performs clustering. In S256, the processor 210 determines whether or not there is color unevenness. With this configuration, if the size of the color unevenness represented by the solid color area is large, the processor 210 can detect the color unevenness using the standard deviation sda. If the size of the color unevenness represented by the solid color area is small, the processor 210 can detect the color unevenness using clustering.
[0155] Furthermore, the determination process for the presence or absence of color unevenness using clustering can be applied to any of the first to third embodiments described above. This embodiment can provide the same various advantages as those provided by the embodiment to which it is applied.
[0156] Furthermore, the color variation index may be any value that indicates the degree of color variation within a solid-color area, instead of the standard deviation sda. For example, the variance of pixel values within a solid-color area, or the difference between the maximum and minimum values, may be used as the color variation index.
[0157] E. Fifth Example: Figure 17 is a flowchart illustrating another embodiment of the color uniformity inspection process. S252e in the figure is executed instead of S252 in Figures 5 and 16. In this embodiment, the processor 210 extracts multiple superpixels by analyzing the region of interest (i.e., the solid color region) and adopts the multiple superpixels as multiple partial images. In this embodiment, the program 231 is configured to execute the process of S252e instead of S252.
[0158] Figure 18 is a flowchart illustrating an example of the superpixel extraction process. In this embodiment, the processor 210 calculates superpixels according to an algorithm called SLIC (Simple Linear Iterative Clustering). SLIC assigns multiple pixels to multiple clusters by clustering based on the similarity of color and position between multiple pixels. Each cluster forms one superpixel.
[0159] Figures 19(A) and 19(B) illustrate examples of superpixel calculation. Each figure shows a solid color region AL. Hereafter, the solid color region AL will be considered the region of interest. Figure 19(A) shows the case where the solid color region AL has no color unevenness, and Figure 19(B) shows the case where the solid color region AL has color unevenness CCe.
[0160] In S710 (Figure 18), the processor 210 acquires feature quantities for each of the multiple pixels in the region of interest. In this embodiment, the feature quantity V is a 5-dimensional vector representing three color components (here, L*, a*, b*) and two positions (here, PLx, PLy). Position PLx is the pixel position in the first direction Dx within the region of interest, and position PLy is the pixel position in the second direction Dy within the region of interest.
[0161] In S715, the processor 210 initializes KP clusters. In this embodiment, the total number of clusters KP is predetermined (for example, 100 or more, and 1000 or less). The processor 210 also forms KP clusters by dividing the region of interest into KP regions equally. The left side of Figures 19(A) and 19(B) shows the initial multiple clusters SPi. As shown, the multiple clusters SPi are arranged in a grid along the first direction Dx and the second direction Dy. Although not shown in the illustration, the centroid of the feature quantities V of multiple pixels included in the cluster SPi is used as the center of the cluster SPi.
[0162] In S720 (Figure 18), the processor 210 updates KP clusters according to the k-means method. Here, the distance d shown is used as the distance between the first feature V1 (L*1, a*1, b*1, PLx1, PLy1) and the second feature V2 (L*2, a*2, b*2, PLx2, PLy2). The distance d is the square root of the sum of the color component Ccol and the position component Cpos. The color component Ccol is obtained by dividing the sum of the squares of the differences of L*, a*, and b* by the square of the color parameter m. The color parameter m is set to a value between 1 and 40, for example. The position component Cpos is obtained by dividing the sum of the squares of the differences of PLx and PLy by the square of the position parameter s. The square of the position parameter s corresponds to the size of the superpixel and may be set to, for example, "number of pixels in the region of interest / total number of clusters KP". This distance d is used as the distance between the cluster center and individual pixels. The distance d, which includes the color component Ccol and the position component Cpos, represents both color similarity and positional similarity. The closer the colors, the smaller the distance d. Similarly, the closer the positions, the smaller the distance d.
[0163] The right side of Figures 19(A) and 19(B) shows examples of updated cluster SPs for each solid-color region AL. As shown in Figure 19(A), when the solid-color region AL does not represent color unevenness, multiple pixels represent approximately the same color. Therefore, of the two components of distance d, Ccol and Cpos, the influence of the color component Ccol is small, and the influence of the position component Cpos is large. Distance d represents positional similarity (the smaller the distance d, the closer the positions). KP cluster SPs are formed mainly according to positional similarity. Multiple pixels that are close to each other form a cluster SP. Thus, the multiple updated cluster SPs are approximately the same as the multiple initial cluster SPi.
[0164] As shown in Figure 19(B), when a solid color region AL represents a color unevenness CCe, the color component Ccol, in addition to the position component Cpos, can affect the distance d. In the solid color region AL, in the parts far from the color unevenness CCe, multiple pixels represent approximately the same color. Therefore, similar to the example in Figure 19(A), the updated clusters SP are approximately the same as the initial clusters SPi.
[0165] In areas close to the color unevenness CCe, the color component Ccol, in addition to the position component Cpos, can influence the distance d. The figure shows a magnified view of the area near the color unevenness CCe. The first pixel Pxl1 and the third pixel Pxl3 are pixels representing the color unevenness CCe. The second pixel Pxl2 is a pixel that does not represent the color unevenness CCe. Here, the positional difference between the first pixel Pxl1 and the second pixel Pxl2 is smaller than the positional difference between the first pixel Pxl1 and the third pixel Pxl3. However, the color difference between the first pixel Pxl1 and the second pixel Pxl2 is large. Therefore, the distance d between the first pixel Pxl1 and the second pixel Pxl2 may be larger than the distance d between the first pixel Pxl1 and the third pixel Pxl3. As a result, multiple pixels representing the color unevenness CCe may form a single cluster SPc. Around the color unevenness CCe, multiple pixels that are close to each other form a cluster SP.
[0166] In S725 (Figure 18), the processor 210 selects KP clusters as KP partial images. Then, the processor 210 completes the process shown in Figure 18, that is, the process shown in S252e of Figure 17.
[0167] As described above, in this embodiment, the processor 210 extracts a region of cluster SP formed by clustering using distance d, which represents the similarity between position and color, from the solid-color region AL as a partial image. In this clustering, cluster SP is formed by multiple pixels with small distance d. As mentioned above, a small distance d indicates similarity between position and color. Thus, the region associated with cluster SP on the solid-color region AL is an example of a region formed by multiple pixels having a predetermined similarity relationship indicating similarity between position and color.
[0168] With this configuration, the processor 210 can extract the region representing the color unevenness as a single partial image. By using such a partial image, the processor 210 can appropriately detect the color unevenness. For example, the probability of obtaining a "Yes" result in S524 (Figure 11) is improved. The probability of obtaining a "Yes" result in S620 (Figure 15) is also improved.
[0169] Furthermore, the determination process for the presence or absence of color unevenness using clustering can be applied to any of the first to third embodiments described above. This embodiment can provide the same various advantages as those provided by the embodiment to which it is applied. This embodiment may also be applied to the embodiment shown in Figure 16.
[0170] F. Variations: (1) The solid color conditions for defining a solid color area are not limited to the conditions described in S220, S225 (Figure 5) and Figure 7, but may be various conditions that indicate small color variation within the solid color area. For example, on the read image IMs (Figure 8(A)), multiple blocks BL may be arranged so as not to overlap each other. A single continuous area formed by multiple uniform blocks may be used as a single solid color area. Alternatively, a continuous area of multiple pixels showing colors within a specific color range may be used as a solid color area. The specific color range may be determined based on the color values of a single-color area (e.g., areas PA1, PA3) represented by the print image IMp (Figure 3(A)). Note that, instead of color values in the CIELAB color space, color values from other color spaces (e.g., RGB, HSV, etc.) may be used to obtain a solid color area. Note that color values in the CIELAB color space are suitable for evaluating the difference between multiple colors.
[0171] (2) In each of the above embodiments, the processor 210 acquires multiple sub-images that form a solid-color region for clustering (for example, S252 in Figures 5 and 16, and S252e in Figure 17). The method for acquiring multiple sub-images can be various. For example, the formula for calculating the distance d used in S720 (Figure 18) can be various formulas that calculate smaller values for similar colors and smaller values for close positions. Also, the method for extracting superpixels can be various other methods instead of the SLIC method. For example, a method pre-selected from the Felzenszwalb method, the Vedaldi method, and the Neubert method may be used. The processor 210 may also acquire multiple sub-images PI by dividing the solid-color region. The size of the sub-images PI can be predetermined. Also, as in the embodiment of Figure 17, the processor 210 may acquire multiple sub-images by analyzing the solid-color region. In any case, the multiple sub-images may be arranged so that two adjacent sub-images partially overlap.
[0172] (3) The color points used to indicate the color of the subimages for clustering are not limited to the color points PT and PTb described in Figure 9(D), but may be various types of information indicating color. For example, the color points may be represented by color components of other color spaces (e.g., RGB, HSV, etc.) instead of the color components of the CIELAB color space. Note that the color components of the CIELAB color space are suitable for evaluating the difference between multiple colors.
[0173] (4) The clustering method may be any of the various methods used to classify multiple subimages exhibiting similar colors into a single cluster. The DBSCAN clustering method may be any of the various methods used to assign multiple color points to clusters or noise using a radius Rd and a threshold Npth (Figure 10(A)). The Mean Shift clustering method may be any of the various methods used to shift multiple color points toward a density maxima using a bandwidth Q (Figure 13(A)). From the standpoint of computational cost, DBSCAN is preferred over Mean Shift. As a clustering method that automatically determines the total number of clusters N, various other clustering methods may be used, not limited to DBSCAN and Mean Shift.
[0174] The k-means clustering method can be any of the various methods used to adjust the centers of the k clusters so that the distance between the cluster center and the colored points contained within the cluster is small. The clustering method used to form the predetermined k clusters is not limited to k-means; various other clustering methods can be used. The number of clusters k can be 3 or more.
[0175] (5) The process for determining the presence or absence of color unevenness is not limited to the processes shown in Figures 11 and 15, but may be any of the various processes. For example, in S525 (Figure 11) and S622 (Figure 15), the processor 210 may use the color difference index value of each cluster to select clusters with outliers. The color difference index value may be any of the various values that indicate the degree of difference between the color of the partial image PI included in the cluster and the appropriate color. For example, the color difference index value may be a value that represents the color difference between the partial image PI included in the cluster and the corresponding part of the print image IMp (Figure 3(A)). The processor 210 may calculate the color difference index value as the difference between the average color value of multiple pixels of the partial image PI included in the cluster and the average color value of multiple pixels of the corresponding part of the print image IMp. The average color value may be expressed by the color components of various color spaces (e.g., RGB, HSV, or L*a*b*). The difference between two average color values may be calculated, for example, by the Euclidean distance. The processor 210 may select the cluster with the largest color difference index value as the outlier cluster.
[0176] Furthermore, in S525 and S622, the processor 210 may classify both the partial image PIs in the cluster with the fewest number of partial image PIs among N clusters or k clusters, and the partial image PIs in the cluster with the largest color difference index value, into color unevenness regions.
[0177] Furthermore, in S525 and S622, all clusters other than the cluster with the largest number of partial image PIs may be selected as outlier clusters.
[0178] In either case, in S270 (Figure 6), it is preferable that the processor 210 displays the partial image PI classified as a color uneven region on the display unit 240.
[0179] (6) The index value indicating the degree of color variation between multiple subimages is not limited to the variance Cs (Figure 11: S530, S535), but may be any other value (e.g., standard deviation, maximum distance between the cluster centroid and the color point, etc.).
[0180] (7) In S525 (Figure 11) and S625 (Figure 15), if the outlier cluster contains multiple subimage PIs, the processor 210 may classify some of the subimage PIs among the multiple subimage PIs into a color unevenness region. For example, the processor 210 may select the subimage PIs to be classified into a color unevenness region in the same way as the method for selecting subimage PIs in S540 (Figure 11).
[0181] (8) The process for determining whether or not there is color unevenness is not limited to the processes in Figures 11 and 15, but may be any of the various processes. In the process in Figure 11, one or both of the two sets, S522-S524 and S530-S540, may be omitted. In the modified example in which the S522-S524 set is omitted, the process may proceed to S525 if the result of the S520 determination is Yes. In the modified example in which the S530-S540 set is omitted, the process may proceed to S545 if the result of the S520 determination is No, or if the result of the S524 determination is No.
[0182] In the process shown in Figure 15, one or two of the three sets—S615-S620, S622-S624, and S630-S640—may be omitted. If the S615-S620 set is omitted, the decision process may start from S622. In a modified example where the S622-S624 set is omitted, if the decision result in S620 is Yes, the process may proceed to S625. If both the S615-S620 set and the S622-S624 set are omitted, the decision process may start from S630. In a modified example where the S630-S640 set is omitted, if the decision result in S620 is No, or if the decision result in S624 is No, the process may proceed to S645.
[0183] (9) The color uniformity inspection process may be replaced with various other processes instead of the processes shown in Figures 5, 6, and 16. For example, S232 may be omitted. Also, S280-S305 in Figure 6 may be omitted. In this way, the adjustment of clustering conditions and the adjustment of judgment conditions may be omitted.
[0184] (10) The printing medium used for printing the image is not limited to T-shirts 700, but may be various sheets (e.g., paper, film, etc.). Also, the image is not limited to a sheet, but may be printed on the surface of various products such as multifunction printers, sewing machines, cutting machines, machine tools, smartphones, etc. The image to be processed may be a read image of the portion of the product surface that has a printed image. Furthermore, the configuration of the reading device for reading printed images is not limited to the configuration of reading device 100 (Figure 2), but can be various configurations. For example, the reading device may be equipped with an area sensor instead of a line sensor. Also, the reading device may be incorporated into a printing device.
[0185] (7) The data processing device that determines whether or not a solid color area has color unevenness may be a different type of device than a personal computer (e.g., a digital camera, scanner, or smartphone). Alternatively, multiple devices (e.g., computers) that can communicate with each other via a network may each share a portion of the data processing function performed by the data processing device, and together they may provide the data processing function (a system equipped with these devices corresponds to the data processing device).
[0186] In each of the above embodiments, some of the configurations implemented by hardware may be replaced with software, and conversely, some or all of the configurations implemented by software may be replaced with hardware. For example, clustering (Figures 5 and 15: S254) may be performed by a dedicated hardware circuit such as an Application Specific Integrated Circuit (ASIC).
[0187] Furthermore, if some or all of the functions of this disclosure are implemented by a computer program, that program may be provided in the form of a computer-readable recording medium (e.g., a non-temporary recording medium). The program may be used while stored on the same or a different recording medium (computer-readable recording medium) as it was provided. "Computer-readable recording medium" is not limited to portable recording media such as memory cards and CD-ROMs, but may also include internal storage devices within a computer, such as various ROMs, and external storage devices connected to a computer, such as hard disk drives.
[0188] The above embodiments and modifications can be combined as appropriate. Furthermore, the above embodiments and modifications are provided to facilitate understanding of this disclosure and do not limit the present invention. The present invention can be modified and improved without departing from its spirit, and equivalents thereof are included. [Explanation of symbols]
[0189] 100...Reading device, 110...Control device, 120...Transport device, 122...Position sensor, 130...Table, 140...Support unit, 180...Reading sensor, 190...Housing, 200...Data processing unit, 210...Processor, 215...Storage device, 220...Volatile storage device, 230...Non-volatile storage device, 231...Program, 235...Size setting, 240...Display unit, 250...Operation unit, 270...Communication interface, 700...Shirt
Claims
1. It is a program, A classification function that classifies multiple partial images into N clusters (where N is an integer of 1 or more) by performing clustering using the respective colors of multiple partial images that form a solid-color region, wherein the solid-color region is a region included in the image to be processed that satisfies predetermined solid-color conditions indicating small color variation, and the clustering is configured to automatically determine the total number of clusters N. A cluster determination function that determines that the solid-color area has color unevenness in a first specific case where the total number N of clusters is 2 or more, A program that enables a computer to realize this.
2. The program according to claim 1, The aforementioned clustering includes clustering using the DBSCAN (Density-based spatial clustering of applications with noise) method. program.
3. A program according to claim 1 or 2, further, A program that enables a computer to perform the function of determining the size of a partial image using a size specified by the user.
4. A program according to claim 1 or 2, The cluster determination function does not make a determination for the solid color areas having a size less than or equal to the standard size, but determines that the solid color areas have color unevenness in the first specific case where the total number N of clusters in the solid color areas having a size greater than the standard size is 2 or more. program.
5. A program according to claim 1 or 2, further, The computer is provided with a function to extract, as a partial image, a region formed by a plurality of pixels having a predetermined similarity relationship indicating similarity in both position and color, from the solid-color region. program.
6. A program according to claim 1 or 2, The clustering is configured to classify the plurality of partial images into the N clusters according to the clustering conditions. In the first specific case where the total number N of the clusters is 2 or more, the plurality of partial images are classified into N clusters, which include a first cluster that is not associated with color unevenness and a second cluster that is associated with color unevenness. The aforementioned program, further, A function to display on a display device at least a portion of the solid-color area determined to have color unevenness, including a partial image included in the second cluster, A function that allows the user to choose between adjusting or maintaining the aforementioned clustering conditions, When the adjustment of the clustering conditions is selected, the function adjusts the clustering conditions such that the likelihood of the multiple partial images being classified into a single cluster is higher compared to before the adjustment of the clustering conditions. A program that enables a computer to realize something.
7. A program according to claim 1 or 2, The clustering is configured to classify the plurality of partial images into the N clusters according to the clustering conditions. The cluster determination function determines that the solid color area does not have color unevenness in a second specific case where the total number of clusters N is 1. The aforementioned program, further, A function to display on a display device at least a portion of the solid color area that is determined not to have the aforementioned color unevenness, A function that allows the user to choose between adjusting or maintaining the aforementioned clustering conditions, When the adjustment of the clustering conditions is selected, the function adjusts the clustering conditions such that the likelihood of the multiple partial images being classified into two or more clusters increases compared to before the adjustment of the clustering conditions. A program that enables a computer to realize something.
8. A program according to claim 1 or 2, The cluster determination function determines that the solid color area does not have color unevenness in a third specific case where the total number of clusters N is 2 or more, and the N clusters have a predetermined proximity relationship indicating that multiple clusters are close to each other. program.
9. A program according to claim 1 or 2, The cluster determination function determines that the solid-color area has color unevenness in a fourth specific case where the total number of clusters N is 1 and the index value indicating the degree of color variation between the plurality of partial images is greater than or equal to a threshold. program.
10. The program according to claim 9, further, A program that causes a computer to implement a function, in the fourth specific case described above, which displays on a display device one or more of the plurality of partial images having a distance greater than or equal to a distance threshold, or the partial image having the longest distance, wherein the distance is the distance between the center of a cluster containing the plurality of partial images and the partial image.
11. A program according to claim 1 or 2, The image to be processed represents an optically read printed image, and the printed image is an image printed using the data of the original image. The aforementioned program, further, In the first specific case described above, the computer implements a function to display on a display device one or both of the following: a partial image included in the cluster having the fewest number of elements among two or more clusters representing the plurality of partial images; and a partial image included in the cluster with the largest index value indicating the degree of difference between the color of the original image and the color of the partial image included in the cluster. program.
12. A program according to claim 1 or 2, further, A computer implements a region determination function that uses a color variation index indicating the degree of color variation within the solid color region to determine whether or not the solid color region has color unevenness. The aforementioned region determination function is, If the color variation index is greater than the first threshold, it is determined that the solid color area has the color unevenness. If the color variation index is less than the second threshold, which is smaller than the first threshold, it is determined that the solid color area does not have the color unevenness. The classification function performs clustering when the color variation index is greater than or equal to the second threshold and less than or equal to the first threshold. program.
13. It is a program, A classification function that classifies multiple partial images into k clusters (where k is an integer of 2 or more) by performing clustering using the respective colors of multiple partial images that form a solid color region, wherein the solid color region is a region included in the image to be processed that satisfies predetermined solid color conditions indicating small color variation, and the total number of clusters k is predetermined. A cluster determination function that determines whether a particular solid-color area has color unevenness using one or more types of information from the following: first type information indicating the distance between the k clusters, second type information indicating the number of elements in each cluster, and third type information indicating the degree of color variation between multiple sub-images within a cluster. A program that enables a computer to realize this.
14. The program according to claim 13, The aforementioned clustering includes clustering using the k-means method. program.
15. A program according to claim 13 or 14, further, A program that enables a computer to perform the function of determining the size of a partial image using a size specified by the user.
16. A program according to claim 13 or 14, The cluster determination function does not make a determination for the solid color areas having a size smaller than or equal to the standard size, but determines whether or not the specific solid color area having a size larger than the standard size has the color unevenness. program.
17. A program according to claim 13 or 14, further, The computer is provided with a function to extract, as a partial image, a region formed by a plurality of pixels having a predetermined similarity relationship indicating similarity in both position and color, from the solid-color region. program.
18. A program according to claim 13 or 14, The cluster determination function determines whether the specific solid-color area has the color unevenness according to the determination conditions. If it is determined that the specific solid-color area has the color unevenness, the plurality of partial images are classified into k clusters, which include a first cluster that is not associated with the color unevenness and a second cluster that is associated with the color unevenness. The aforementioned program, further, A function to display on a display device at least a portion of the specific solid-color area that is determined to have the aforementioned color unevenness, including a partial image included in the second cluster, A function that allows the user to choose between adjusting or maintaining the aforementioned judgment conditions, When the adjustment of the judgment conditions is selected, a function is provided to adjust the judgment conditions such that the likelihood of determining that the specific solid-color area does not have color unevenness is higher compared to before the adjustment of the judgment conditions. A program that enables a computer to realize something.
19. A program according to claim 13 or 14, The cluster determination function determines whether the specific solid-color area has the color unevenness according to the determination conditions. The aforementioned program, further, A function to display on a display device at least a portion of the specific solid-color area that is determined not to have the aforementioned color unevenness, A function that allows the user to choose between adjusting or maintaining the aforementioned judgment conditions, When the adjustment of the judgment conditions is selected, a function is provided to adjust the judgment conditions such that the likelihood of the specific solid-color area being determined to have the color unevenness increases compared to before the adjustment of the judgment conditions. A program that enables a computer to realize something.
20. A program according to claim 13 or 14, The cluster determination function determines that the k clusters have a predetermined proximity relationship indicating that multiple clusters are close to each other, and in a specific case indicated by the first type information indicating the distance between the k clusters, it determines that the specific solid-color area does not have color unevenness. program.
21. A program according to claim 13 or 14, The cluster determination function determines that a specific solid-color area has color unevenness if the third type of information, which indicates the degree of color variation between multiple partial images within a cluster of interest that is one of the k clusters, is above a certain threshold. program.
22. The program according to claim 21, further, A program that causes a computer to implement a function, in the specific case described above, which displays on a display device one or more partial images within the cluster of interest that are at a distance greater than or equal to a distance threshold, or the partial image with the greatest distance, wherein the distance is the distance between the center of the cluster of interest and the partial image.
23. A program according to claim 13 or 14, The image to be processed represents an optically read printed image, and the printed image is an image printed using the data of the original image. The aforementioned program, further, In a specific case where the aforementioned solid color area is determined to have the aforementioned color unevenness, the computer is given the function of displaying on a display device either one or both of the following: a partial image contained in the cluster with the fewest number of elements among the k clusters, and a partial image contained in the cluster with the largest index value indicating the degree of difference between the color of the original image and the color of the partial image contained in the cluster. program.
24. A program according to claim 13 or 14, further, A computer implements a region determination function that uses a color variation index indicating the degree of color variation within the solid color region to determine whether or not the solid color region has color unevenness. The aforementioned region determination function is, If the color variation index is greater than the first threshold, it is determined that the solid color area has the color unevenness. If the color variation index is less than the second threshold, which is smaller than the first threshold, it is determined that the solid color area does not have the color unevenness. The classification function performs clustering when the color variation index is greater than or equal to the second threshold and less than or equal to the first threshold. program.
25. A data processing device, A classification unit that classifies multiple partial images into N clusters (where N is an integer of 1 or more) by performing clustering using the respective colors of multiple partial images that form a solid-color region, wherein the solid-color region is a region included in the image to be processed that satisfies predetermined solid-color conditions indicating small color variation, and the clustering is configured to automatically determine the total number of clusters N. A cluster determination unit that determines that the solid color area has color unevenness in a first specific case where the total number N of clusters is 2 or more, A data processing device equipped with
26. A data processing device, A classification unit that classifies multiple partial images into k clusters (where k is an integer of 2 or more) by performing clustering using the respective colors of multiple partial images that form solid-color regions, wherein the solid-color regions are regions included in the image to be processed that satisfy predetermined solid-color conditions indicating small color variation, and the total number of clusters k is predetermined. A cluster determination unit that determines whether a particular solid-color area has color unevenness using one or more types of information from the following: first type information indicating the distance between the k clusters, second type information indicating the number of elements in each cluster, and third type information indicating the degree of color variation between multiple sub-images within a cluster. A data processing device equipped with the following features.
Citation Information
Patent Citations
Method and apparatus for detecting color unevenness in printed matter
JP2995105B2