WO2012014264A1 - 二次元コードリーダおよびプログラム - Google Patents
二次元コードリーダおよびプログラム Download PDFInfo
- Publication number
- WO2012014264A1 WO2012014264A1 PCT/JP2010/005360 JP2010005360W WO2012014264A1 WO 2012014264 A1 WO2012014264 A1 WO 2012014264A1 JP 2010005360 W JP2010005360 W JP 2010005360W WO 2012014264 A1 WO2012014264 A1 WO 2012014264A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- region
- color
- dimensional code
- area
- cell
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/10544—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
- G06K7/10712—Fixed beam scanning
- G06K7/10722—Photodetector array or CCD scanning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/22—Character recognition characterised by the type of writing
- G06V30/224—Character recognition characterised by the type of writing of printed characters having additional code marks or containing code marks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/12—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using a selected wavelength, e.g. to sense red marks and ignore blue marks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
- G06K7/1439—Methods for optical code recognition including a method step for retrieval of the optical code
- G06K7/1443—Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
- G06K7/146—Methods for optical code recognition the method including quality enhancement steps
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
- G06K7/146—Methods for optical code recognition the method including quality enhancement steps
- G06K7/1491—Methods for optical code recognition the method including quality enhancement steps the method including a reconstruction step, e.g. stitching two pieces of bar code together to derive the full bar code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
- G06K2019/06215—Aspects not covered by other subgroups
- G06K2019/06225—Aspects not covered by other subgroups using wavelength selection, e.g. colour code
Definitions
- the present invention relates to a two-dimensional code reader that reads and recognizes a two-dimensional code from an image obtained by photographing an area including one or more two-dimensional codes.
- the present invention has been made in order to solve such a problem, and an object of the present invention is to specify each of a plurality of two-dimensional codes included in an image and each cell area of each specified two-dimensional code. It is to provide a technique for reducing the time required for color determination processing.
- the two-dimensional code reader of the first configuration includes a plurality of cells arranged in each cell so that the plurality of cells include a plurality of types of cells having different colors.
- An image acquisition unit for acquiring an image obtained by photographing a region including a plurality of two-dimensional code regions each configured by coding one or more pieces of information according to the color or a combination of colors by attaching a color;
- a component conversion unit that converts an image acquired by the image acquisition unit into an edge image indicating the distribution of edge components included in the image, and an edge image converted by the component conversion unit, which is formed according to a predetermined rule
- a region extraction unit that extracts a region that has been processed as a candidate region composed of the region of the two-dimensional code, and a candidate extracted by the region extraction unit in the image acquired by the image acquisition unit
- a pattern determination unit that determines whether or not a characteristic pattern that defines the region of the two-dimensional code is included in an element forming the corresponding region for each corresponding region
- the color determination unit sequentially determines a color for each pixel in each cell region in the two-dimensional code region, and when a predetermined number of valid color determination results are obtained, a color determination process is not performed.
- the color determination process is omitted for the remaining pixels of the process, and the color assigned to each cell area is determined based on the predetermined number of valid color determination results.
- extraction of the candidate area in the edge image and each of the corresponding areas in the original image corresponding to the extracted candidate area are characteristic. After determining whether or not a pattern is included, a two-dimensional code region can be detected from the original image.
- the corresponding area including the characteristic pattern among the corresponding areas corresponding to the candidate areas of the edge image is detected as a two-dimensional code area in the original image.
- Each of the plurality of two-dimensional code areas included in the image can be specified.
- the coded information is identified based on the color assigned to each cell region in the two-dimensional code region. be able to.
- candidate regions that are candidates for the two-dimensional code region are extracted from the acquired image, and then the two-dimensional code region is detected from this region to identify information. Therefore, compared with the case where the region of the two-dimensional code is to be detected without extracting the candidate region, the region of the two-dimensional code can be detected from the limited range of the extracted candidate region. As a result, the processing load and processing time required to identify information from the two-dimensional code area can be reduced.
- the color determination process can be omitted, and the color assigned to the area of each cell can be determined based on a predetermined number of valid color determination results.
- the edge image converted from the original image only needs to indicate the distribution of the edge components included in the original image. For example, in an image in which only specific components such as luminance and brightness in the original image are distributed. For example, an image obtained by extracting only components that are equal to or greater than a predetermined threshold (specifically, binarization using a threshold), an image obtained by extracting a contour line from the image, and the like.
- a predetermined threshold specifically, binarization using a threshold
- the “predetermined rule” for extracting a candidate area from an edge image only needs to define a candidate area composed of a two-dimensional code area.
- the outer shape of the two-dimensional code area The length of each side when the outer shape is a polygon, the angle formed by each side, the ratio of the length of each side when the outer shape is a polygon, and the edge image includes a two-dimensional code area
- the distribution pattern of the edge component in the case where it is distributed may be specified.
- the “characteristic pattern” referred to when detecting the area of the two-dimensional code from the original image is information that directly or indirectly indicates the characteristic pattern defined for the two-dimensional code.
- the arrangement pattern of cells that are coding symbols in a two-dimensional code the arrangement pattern of a specific symbol arranged to identify a two-dimensional code, or a two-dimensional code
- information indicating the pattern of the mark arranged directly or indirectly is information that directly or indirectly.
- the “predetermined number of effective color determination results” is the number of effective color determination results having an accuracy capable of accurately determining the color of each cell region. From the viewpoint of processing speed, A smaller number is preferred.
- the “effective color” is, for example, when there are a plurality of color determination targets, the color with the largest number of determination results, the color to be assigned to each cell area in advance, or the color When it can be estimated from the arrangement or the like, the color corresponding to the area of each cell corresponds.
- the two-dimensional code reader according to the second configuration is the above-described first configuration, wherein the plurality of cells are separated by a separator with a predetermined color, and based on the predetermined color.
- the separator region specifying unit that specifies the position of the separator region in the two-dimensional code region, and the separator region specifying unit specified A cell region specifying unit for specifying the position of each cell region in the two-dimensional code region based on the position of the separator region.
- each cell is divided by a separator to which a predetermined color is assigned, and for each pixel in the region of the two-dimensional code, a color determination process is performed based on a predetermined color, thereby separating the separator.
- the position of the region can be specified.
- the position of each cell area can be specified based on the specified position of the separator area.
- the “predetermined color” is preferably a color other than the color attached to the cell.
- a special cell such as a cell that specifies the position and direction of the area of the two-dimensional code is used. In some cases, it may be the same color as that color.
- the two-dimensional code reader of the third configuration is the above-described second configuration, wherein the color determination unit determines the color of each pixel for each pixel group forming a row or a column in the region of the two-dimensional code.
- the color determination unit determines the color of each pixel for each pixel group forming a row or a column in the region of the two-dimensional code.
- the determination process of the color of each pixel can be sequentially performed on the entire region of the two-dimensional code for each pixel group forming the row or column. Then, when a predetermined number of effective color determination results are obtained for each row or each column in the area of each cell, color determination processing is performed for the remaining pixels in each row or each column of that cell area. Can be omitted. As a result, when a predetermined number of valid color determination results are obtained for each row or column in each cell area, the remaining unprocessed pixels are not subjected to color determination processing. As a result, it is possible to shorten the processing time required to determine the color of the area of each cell.
- the two-dimensional code reader of the fourth configuration is the above-described second configuration, wherein the color determination unit is configured so that each pixel group that forms a row or a column in each cell region in the two-dimensional code region.
- the color determination unit is configured so that each pixel group that forms a row or a column in each cell region in the two-dimensional code region.
- the color determination process of each pixel can be sequentially performed for each pixel group. Then, when a predetermined number of valid color determination results are obtained for each row or each column in each cell region, the color determination processing is omitted for the remaining pixels in each row or each column in that cell region. can do.
- the conversion of the image into the edge image by the component conversion unit is performed for each of one or more different conversion conditions.
- extraction of candidate regions by the region extraction unit, determination of characteristic patterns by the pattern determination unit, and two-dimensional by the region detection unit A repetitive execution unit that repeatedly performs code area detection, and candidate areas extracted by the area extraction unit for each specific edge image, and candidates extracted by the area extraction unit for different edge images
- a match determination unit that determines whether or not a region matches (hereinafter referred to as “extracted candidate region”) based on both candidate regions.
- the repetitive execution unit extracts the determination as to whether or not the pattern determination unit has a characteristic pattern and the detection of the region of the two-dimensional code by the region detection unit by the region extraction unit.
- the candidate areas that have been determined only the candidate areas that are determined not to match the extracted candidate areas by the match determination unit are executed.
- extraction of candidate areas, determination of whether or not a characteristic pattern is included in the corresponding area corresponding to the extracted position information is repeatedly performed.
- the candidate area newly extracted for a specific edge image may match the extracted candidate area extracted for the edge image referenced earlier in the area of the original image. is assumed. However, in the above configuration, for the extracted candidate regions that match in this way, the determination as to whether or not the extracted candidate region includes a characteristic pattern and the detection of the two-dimensional code region are not performed.
- the two-dimensional code area which is determined according to the coloring rule corresponding to the information to be encoded in the cell and the color attached to the cell adjacent to the cell, and further detected by the area detection unit
- For each of the cell regions in the two-dimensional code region a color other than the color to be assigned to the cell region according to the coloring rule and the color to be used in the two-dimensional code
- a color estimation unit that estimates a color to be originally assigned to the cell region according to the coloring rule, and the information identification unit includes the region of the two-dimensional code. Based on the color or combination of colors assigned to each cell region, assuming that the estimated color is assigned to the cell region estimated by the color estimation unit among the cell regions in the cell. Identify the information.
- the fifth configuration there is no problem as long as the entire two-dimensional code is normally generated as an image.
- the image generation specifically, shooting
- the image is not normally generated as an image such as a lack of an area, and in this case, the information itself cannot be identified.
- the color to be originally assigned to the cell is estimated according to the coloring rule. Since the information can be identified based on the color, it can be prevented that the information itself cannot be identified.
- any one of the colors is selected based on parameters such as the probability of the estimation result. And then presume that the selected color is attached.
- information is identified for each of the patterns with a plurality of colors, and the user is allowed to select one of the identified information. May be.
- the color determination unit includes a color assigned to each cell region in the two-dimensional code region. Is determined according to which of the determination areas on the color space extending around each of the plurality of colors used in the two-dimensional code. With this configuration, it is possible to determine whether the color assigned to each cell region in the two-dimensional code is included in which determination region in the color space.
- the two-dimensional code reader according to the eighth configuration is an area of a cell that is determined not to be included in any of the determination areas corresponding to each of a plurality of colors.
- the determination area is expanded by a certain area with respect to a two-dimensional code area having a certain number or more, and the color assigned to each cell area is determined again.
- colors assigned to many cell regions are not included in any of the determination regions. In this case, the information itself cannot be identified. End up. To solve this problem, even if the colors assigned to many cell regions are not included in any of the determination regions, this can be compensated so that appropriate information can be identified. It is desirable to keep it.
- the color can be determined again by increasing the sensitivity of the determination by expanding the determination area and determining the color again.
- the determination probability can be increased.
- the expansion width when expanding the determination area may be expanded up to a range that does not interfere with other determination areas, and the number of cells determined not to be included in any of the determination areas is less than a certain number.
- the determination area may be gradually expanded until the determination is repeated.
- the two-dimensional code reader according to the ninth configuration is an area of a cell which is determined not to be included in any of the determination areas corresponding to each of a plurality of colors in the seventh configuration.
- the determination area is shifted in the color space according to the color distribution in the two-dimensional code area, and is again attached to each cell area. Determine the color.
- the color is determined again by shifting the determination region to an appropriate position according to the color distribution, The color determination probability can be increased.
- the determination region may be shifted to a position on the color space where the color component bias in the two-dimensional code region can be canceled. More specifically, when a specific color component is increased as a whole in the area of the two-dimensional code, it can be considered to shift the determination area in a direction to decrease the color component.
- the “certain number” in “there are more than a certain number of cells that are determined not to be included in any of the determination areas” refers to the corresponding cell occupying all the cells. It may be a ratio or the absolute number of corresponding cells. In addition, the number of corresponding cells arranged in a specific pattern in the two-dimensional code may be used.
- the coincidence determination unit is extracted by the region extraction unit with respect to the specific edge image. Whether each candidate area matches the extracted candidate area in another edge image is determined according to the degree of overlap in both candidate areas.
- the match determination unit determines whether each of the candidate regions extracted by the region extraction unit matches the extracted candidate region in another edge image with respect to the specific edge image. The determination is made according to the degree of overlap in both candidate areas.
- the coincidence determination unit is extracted from the specific edge image by the region extraction unit. Determine whether each candidate area matches the extracted candidate area in another edge image, depending on whether one candidate area of both candidate areas is included in the other candidate area To do.
- the candidate area extracted from the specific edge image and the extracted candidate area in another edge image are included in the other candidate area, so that both candidates are included. It can be determined that the areas match.
- the coincidence determination unit has one or more vertices in the polygon formed as the candidate region formed as the extracted candidate region for each candidate region extracted by the region extraction unit in the specific edge image. Whether each candidate region extracted by the region extraction unit matches the extracted candidate region in another edge image, depending on whether or not it is located within a certain range from any vertex in the polygon Determine whether.
- At least one vertex in a candidate area extracted from a specific edge image is within a certain range from any vertex in an extracted candidate area in another edge image. It only has to be located.
- it may be conditional on how many vertices are located within a certain range, depending on the processing load, processing speed, etc. until a two-dimensional code area is detected. It is conceivable to change as appropriate.
- the area extraction unit is based on a template that defines a rule relating to the formation of the area of the two-dimensional code. Then, from the edge image converted by the component conversion unit, the position information of the area formed according to the rule defined by the template is extracted as the position information of the candidate area. If configured in this way, candidate regions can be extracted according to the rules defined in the template, so that by changing the rules together with this template, regions formed according to any rules can be detected as candidate regions can do.
- the two-dimensional code reader described above may be configured by a single device or a system in which a plurality of devices operate in cooperation.
- a fourteenth configuration for solving the above-described problem, there is provided a computer system for executing various processing procedures for causing all the configuration units in any one of the first to thirteenth configurations to function. It may be a program.
- a computer system controlled by such a program can constitute a part of the two-dimensional code reader according to each of the above configurations.
- Each program described above consists of an ordered sequence of instructions suitable for processing by a computer system, and can be used for a two-dimensional code reader or a user who uses the same via various recording media and communication lines. It is provided.
- FIG. 2 is a block diagram illustrating a configuration example of a two-dimensional code reader 1.
- FIG. 3 is a diagram illustrating a configuration example of a two-dimensional code 100.
- FIG. It is a flowchart which shows an example of the process sequence of a code
- (A) is a figure which shows an example of the correspondence of the value of the variable Y, an image kind, and a threshold value
- (b) is a flowchart which shows an example of the process sequence of an edge image generation process. It is a flowchart which shows the process sequence of an effective area
- (A) is a diagram showing an example of the shape of an ideal candidate region
- (b) to (e) are diagrams showing examples of shapes outside the error range
- (f) to (g) are errors. It is a figure which shows the example of a shape in the range.
- (A) is a figure which shows the example of a detection target image of article detection mode
- (b) is a figure which shows the example of a display of a detection result.
- FIG. 1 is a figure which shows the example of a detection target image in term management mode
- (b) is a figure which shows the example of a display of a detection result
- (c) shows an example of the arrangement position of the camera 76.
- FIG. It is a flowchart which shows an example of the process sequence of a detection mode setting process.
- FIG. 1 is a block diagram illustrating a configuration example of the two-dimensional code reader 1.
- the two-dimensional code reader 1 includes a CPU (Central Processing Unit) 60, a RAM (Random Access Memory) 62, a ROM (Read Only Memory) 64, and an input / output interface (I / F) 66.
- a computer system including a bus 68.
- the CPU 60, RAM 62, ROM 64 and I / F 66 are connected to a bus 68, and data can be transmitted and received between these connected devices via the bus 68.
- the two-dimensional code reader 1 is further connected to a storage device 70, a display device 72, an input device 74, a camera 76, and a NIC (Network Interface Card) 78 via an I / F 66.
- the CPU 60 reads various dedicated computer programs stored in advance in the ROM 64 or the storage device 70 into the RAM 62, and uses various resources according to instructions described in the program loaded into the RAM 62 to use a two-dimensional code described later.
- the article detection process (hereinafter referred to as a code using article detection process) is executed.
- the storage device 70 stores data necessary for the code-using article detection process, such as various dedicated computer programs and data used in executing the programs. Specifically, the storage device 70 stores a template that defines information characterizing a two-dimensional code, and image data obtained by photographing with the camera 76. Further, the storage device 70 stores a data table in which correspondences between colors or combinations of colors unique to each two-dimensional code and information including information unique to each two-dimensional code are registered. To do.
- the storage device 70 registers information that associates information related to an article to which a two-dimensional code is attached (hereinafter referred to as article information) and unique information (identification information) that each two-dimensional code has.
- article information information related to an article to which a two-dimensional code is attached
- identification information identification information
- this database has identification information (article name, serial number, etc.) of articles, number information, storage start time information such as warehousing time, deadline information such as shipping deadline, expiration date, etc. in each two-dimensional code. It is registered in association with unique information.
- the storage device 70 is a magnetic storage type storage device such as an FD drive or HD drive, an optical read / write type storage device such as a CD drive, a DVD drive or a BRD drive, or a magnetic storage type / optical such as an MO drive. Any storage device can be used as long as it can read stored data by a computer, such as a static reading method storage device.
- the display device 72 is a known display device such as a CRT display or a liquid crystal display, and in accordance with a command from the CPU 60, an image (including moving images) such as an image photographed by the camera 76 and a processed image obtained by processing the image. Is displayed.
- the input device 74 is a human interface device such as a keyboard, a mouse, an operation button, or a touch-type input device (such as a touch panel), and receives an input corresponding to a user operation.
- the camera 76 is a well-known camera such as a digital camera, generates image data indicating an image obtained by photographing a predetermined photographing area, and sequentially transmits the image data to the RAM 62 or the storage device 70 via the I / F 66. The image data is stored in the RAM 62 or the storage device 70.
- the NIC 78 is a device for communicating with an external device on a network such as a LAN, WAN, or the Internet, and is a known network adapter generally called a LAN card or the like.
- the NIC 78 is connected to a router, a hub, or the like via a network cable L, and connects the two-dimensional code reader 1 to the network via these. It may be configured to connect to a network via a wireless LAN access point, such as a known wireless LAN.
- image data indicating a photographed image in a predetermined photographing region is obtained from an external camera connected to the network via the NIC 78, or various data is obtained from a data server connected to the network. It is also possible to do.
- the two-dimensional code reader 1 is configured to be mounted on, for example, a mobile phone terminal, a portable information terminal, a known personal computer, or the like.
- the two-dimensional code reader 1 in the present embodiment is based on image data indicating an image including a plurality of articles and one or more two-dimensional codes attached to the articles, and the two-dimensional code in the image. And a process for identifying and acquiring information indicated by the detected two-dimensional code. Further, it is determined whether or not an article designated as a detection target exists among the articles corresponding to the acquired identification information, and when the detection target article exists, a two-dimensional code area corresponding to the article.
- the apparatus is configured as a device that performs processing for highlighting the original image on the original image and performs processing for displaying the processed image.
- each of the above processes is a series of processes that are performed using a user operation input (instruction information) via the input device 74 as a trigger.
- FIG. 2 is a diagram illustrating a configuration example of the two-dimensional code 100.
- a plurality of cells C11 to Cpq (2 ⁇ p, 2 ⁇ q) are arranged at regular intervals on a black separator 110. It is coded by cell color and color combination.
- this two-dimensional code is used for each cell or each group of cells related to a combination of a plurality of colors (multicolors) or a plurality of types of values such as numbers and letters depending on the color combination pattern. (Multi-value) can be expressed. For example, unique information unique to each two-dimensional code can be attached to a plurality of two-dimensional codes by changing the combination of colors or the color arrangement pattern.
- the cells C11 to C1q in the first row (the top row in FIG. 2) constituting the two-dimensional code are marked in order according to the color of the mark that can be attached to each cell C of the two-dimensional code.
- Header area (cell C is filled).
- colors of marks that can be attached to the cell C one or more colors excluding black (k) are arranged in a set with the cell C marked with black (k).
- the cells C11 to Cp1 (cells marked with black (k) in this embodiment) located at the head (the leftmost column in FIG. 2) indicate the position of the two-dimensional code. It is arranged as a specific cell for specifying.
- the cells C11 to Cpq in the second and subsequent rows (excluding the leading cells C11 to Cp1) are divided into cell groups each including one or more cells C for each row, and the unit to be indicated by the cell group A mark is attached with a color or a combination of colors associated with information (one or more characters).
- each cell, or each group of cells related to one or more combinations can have information consisting of any one of a plurality of types of characters and any value indicated by a multi-digit number. Yes.
- the colors of the marks attached to the cells C are a plurality of three-dimensional regions that are spherically expanded in a three-dimensional space representing the distribution of cyan (c), magenta (m), and yellow (y).
- a component area determination area described later is determined by a component model arranged with a size and a positional relationship in which these component areas do not interfere with each other.
- each of the components represented by the center coordinates in the component area arranged in the component model is marked in the cell group as an information color component or a component of each color in the combination color.
- ⁇ component areas do not interfere with each other '' means that the component areas are spaced apart from each other so that the component areas do not overlap, or the boundaries of the component areas are adjacent to each other, It is to be.
- the size of the component area is defined as a space that can sufficiently include a range of errors that can occur depending on the shooting environment of the image.
- the color at a specific coordinate is set under a general shooting environment.
- a region including a range of errors that can occur from this color according to the shooting environment is defined as a component region.
- the color of the mark attached to the specific cell in the two-dimensional code 100 and the color of the separator 110 include the color of the center coordinate in the component region not used for the color of the mark attached to the cell C (in this embodiment). Black color) is used.
- FIG. 3 is a flowchart illustrating an example of a processing procedure of the code-using article detection process.
- the code-use article detection process is started, first, generation of edge image data from the captured image data captured by the camera 76, extraction of candidate areas from the edge image data, determination of whether the candidate areas are valid, The region of the two-dimensional code is detected through a procedure such as determining whether a region corresponding to a valid candidate region in the original image includes a feature pattern.
- the detected two-dimensional code information is identified through a procedure such as verification. Furthermore, the position of the detected article in the original image is determined through a procedure such as specifying a two-dimensional code corresponding to the article to be detected, processing the original image, and displaying the processed image according to a preset detection mode. Display the specified image.
- the processing of the image depends on the original image (which may be a copied image), the emphasis (for example, marking, color change, etc.) of the specified two-dimensional code image in the original image, and the detection mode
- This is processing for adding an information image (for example, a character image) related to the selected article. Therefore, an image in which the position of the article to be detected (or effect) and an information image corresponding to the mode related to the article are added to the original image is displayed on the display device 72. .
- the detection modes that can be set include an article detection mode for detecting a specified article from articles attached with a two-dimensional code included in the original image, and a shipping deadline and a consumption deadline.
- the code-use article detection process is a process that is activated by the CPU 60 executing a dedicated computer program. When the program is executed, the process first proceeds to step S100 as shown in FIG.
- step S100 it is determined whether or not there is an instruction input from the user via the input device 74. If it is determined that there is an instruction input (Yes), the process proceeds to step S102, and if not (No). The determination process is continued until input.
- the article detection mode it is necessary to set the identification information of the article to be detected, such as the serial number and the article name of the article, before inputting the instruction.
- the user may manually input information for identifying a product to be detected via the input device 74, or an article list or the like is displayed and the user selects identification information such as an article name from the list. You may make it do.
- the identification information may be set in the same manner as the article detection mode. For example, an article (product) waiting to be shipped stacked in a warehouse or a product display in the store This setting may be unnecessary when all items such as articles arranged on a shelf are to be managed.
- the process for setting the identification information of the article is not performed.
- the instruction input is a process performed by the user through the input device 74 while viewing the captured image of the camera 76 displayed on the display device 72, and the article to be detected is displayed when the instruction input is input. It will be searched from the photographed images. If the process proceeds to step S102 (Yes), the image data displayed at the timing of the instruction input or the image data for a plurality of frames in addition to the image data is acquired from the RAM 62 or the storage device 70, and the step The process proceeds to S104.
- one image at the timing when the instruction is input or a plurality of frames of images set in advance from the timing of the instruction input are acquired. Then, the subsequent processing is performed on these image data.
- one image is acquired, and processing is performed on the acquired one image.
- a template defining information characterizing the two-dimensional code is read from the storage device 70, and the process proceeds to step S106.
- the template here indicates a region rule that defines a region composed of a two-dimensional code, a characteristic pattern in the two-dimensional code, a coloring rule for colors (number of colors, types of colors) to be added as marks to the two-dimensional code, and the like. Information.
- the “region rule” means that when extracting a candidate region (specifying coordinates) from an edge image, for example, a true circular region, an elliptical region, etc. according to the outer shape of the two-dimensional code
- a candidate region for example, a true circular region, an elliptical region, etc. according to the outer shape of the two-dimensional code
- a circular area, a rectangular area, a polygonal area such as a triangular area, or an area having a similar shape may be defined.
- the similar shape is a shape when a rectangular shape such as a trapezoidal region is viewed (taken) from different angles, and the outer shape of the two-dimensional code
- the shape is a perfect circle, the shape in the case where the circle is broken due to the shooting environment such as a hexagonal or octagonal region or the image quality of the original image is applicable.
- any shape is extracted as a candidate region, ignoring the shape, etc., or an edge component distribution pattern (edge component distribution state, distributed edge component arrangement, etc.) May be defined as extracting a region of a specific pattern.
- the flatness ratio when the extracted candidate area is circular or the sides when the outer shape is polygonal And the angle formed by each side, the ratio of the length of each side when the outer shape is a polygon, and the like may be defined.
- the “region rule” is defined by selecting a plurality of items. In this case, the number of extractions as candidate regions is reduced. As a result, a reduction in processing time is realized with a reduction in processing load.
- the “characteristic pattern” is, for example, a cell arrangement pattern that is a coding symbol in a two-dimensional code, a specific symbol arrangement pattern that is arranged to identify a two-dimensional code, A pattern of marks arranged to identify the two-dimensional code.
- the color assigned to the specific cells C11 to Cp1 and the plurality of colors assigned to the cells of the header areas C11 to C1q are used.
- a characteristic pattern indicating the area of the two-dimensional code is formed.
- This characteristic pattern includes a configuration in which the area of the separator 110 is also included in the pattern, an area indicating information without providing a header area or a specific cell (excluding specific cells C11 to Cp1 in the example of FIG. 2).
- the “coloring rule” is a color rule to be assigned to each of a plurality of cells in a two-dimensional code, and depends on information to be coded in the corresponding cell and colors assigned to cells adjacent to the corresponding cell. Can be determined.
- variables X and Y to be referred to in the subsequent processing are initialized (0 ⁇ X, 1 ⁇ Y), and the process proceeds to step S108.
- step S108 edge image generation processing is performed on the image data acquired in step S102 to generate edge image data, and the process proceeds to step S110.
- a specific processing procedure in the edge image generation processing will be described later.
- step S110 based on the edge image data generated in step S108, the position of each candidate area made of a two-dimensional code is specified from the edge image, and the process proceeds to step S112.
- each coordinate in the image that defines a candidate region made up of a two-dimensional code is specified from the Yth edge image.
- the two-dimensional code 100 since the two-dimensional code 100 has the outer shape (rectangular shape) shown in FIG. 2, a rectangular region that is a closed region by a linearized contour portion as an “region according to the region rule” Are all specified as candidate regions.
- the “region according to the region rule” includes not only a region according to the region rule but also a region formed with parameters of an error range allowed as the region. For example, within the error range, not only a rectangular shape but also a trapezoidal shape, a parallelogram shape, a rhombus shape, and the like are included.
- step S112 it is determined whether or not a candidate region has been specified in step S110. If it is determined that the candidate region has been specified (Yes), the process proceeds to step S114. If not (No), the process proceeds to step S140. . When the process proceeds to step S114, each candidate area (coordinate information) specified in step S110 is registered in the list, and the process proceeds to step S116.
- step S116 it is determined whether or not there is a candidate area not yet processed (unprocessed) among the candidate areas registered in the list in step S114. ) Proceeds to step S118, otherwise (No) proceeds to step S138.
- step S118 it is determined whether or not there is a candidate area not yet processed (unprocessed) among the candidate areas registered in the list in step S114.
- step S118 If the process proceeds to step S118, one of the unprocessed candidate areas registered in the list is selected, and the process proceeds to step S120.
- step S120 an effective area determination process for determining whether the candidate area selected in step S118 is valid is executed, and the process proceeds to step S122. A specific processing procedure in this effective area determination processing will be described later.
- step S122 based on the determination result in step S120, it is determined whether the candidate area selected in step S118 is valid. If it is determined to be valid (Yes), the process proceeds to step S124. If not (No), the process proceeds to step S116, and thereafter, the same processing as described above is performed for another candidate area.
- step S124 the candidate area (new candidate area) specified in step S110 performed immediately before is replaced with the candidate area (extracted candidate area) specified in step S110 performed in the past. It is determined whether or not they are the same.
- the new candidate area overlaps the extracted candidate area by a predetermined ratio or more, or when one of the new candidate area and the extracted candidate area is included in the other, the new candidate area is It is determined that it is the same as the extracted candidate area.
- the candidate area is a polygon
- whether each candidate area extracted from the edge image matches the extracted candidate area in another edge image is determined as a polygon formed as a candidate area. It is also possible to make a determination according to whether one or more vertices Pn in is located within a certain range (for example, a certain radius r distance) from any vertex Po in the polygon formed as the extracted candidate region Good (see FIG. 4).
- step S124 If it is determined in step S124 that the new candidate area is the same as one of the extracted candidate areas specified in step S110 performed in the past and stored in the RAM 62 or the storage device 70 (Yes), The process proceeds to step S116, and thereafter, the same processing as described above is performed for another candidate region.
- step S124 determines whether the new candidate area is the same as the extracted candidate area (No). If it is determined in step S124 that the new candidate area is not the same as the extracted candidate area (No), the process proceeds to step S126.
- the new candidate area at this time is corrected to be suitable for information identification, and the process proceeds to step S128.
- the shape and angle of the two-dimensional code in the new candidate region are corrected. Specifically, for example, when the region to be processed is arranged obliquely or has a distorted shape that is not a square, it is rotated or adjusted to the coordinate axis to correct such a shift. Extensions and shortenings are made.
- step S126 the color component of the two-dimensional code in the new candidate area is corrected so as to improve the color discrimination in each cell.
- each pixel value is color image data in which the color is expressed in a CMYK color space. Convert to. Thereby, in the subsequent color determination processing, for example, it is possible to improve the recognition accuracy of a color (for example, green) that is difficult to recognize in the RGB color space.
- a conversion table color conversion LUT (Look Up Table)) that converts values in a color space other than CMYK (RGB color space in this embodiment) into values in the CMYK color space is stored in the storage device 70. The color conversion is performed using the color conversion LUT.
- step S1208 a characteristic pattern as a two-dimensional code is included in the corresponding area corresponding to the candidate area corrected in step S126 in the original image indicated by the image data acquired in step S102. It is determined whether or not.
- the candidate area corrected in step S126 is scanned for each unit area (area consisting of one or more dots), and the cells specified in this way (particularly the header area and specific cells) and the pattern of the mark are It is determined whether or not it matches the cell arrangement pattern or mark pattern defined by the “characteristic pattern” in the template read in step S104. If they match, it is determined that a characteristic pattern as a two-dimensional code is included in the code area. If they do not match, a characteristic pattern as a two-dimensional code is displayed in the code area. It is determined that it is not included.
- the two-dimensional code 100 illustrated in FIG. 2 has a specially provided area separately from the data area, such as a header area and a specific cell area, and this area is a “characteristic pattern”.
- the present invention is not limited to this configuration.
- the determination it is also possible to associate some information with the color assigned to a specific cell and determine whether or not a characteristic pattern is included by a calculation process using this information. Is possible. That is, information (for example, an error detection code) that can confirm by calculation processing whether the arrangement pattern of each cell, the color of each cell, and the like are the correct pattern and color is associated.
- information for example, an error detection code
- the determination is made based on whether or not the numerical value of the calculation result is a numerical value indicating a correct pattern. Therefore, the characteristic pattern in the template may be set not only as a direct pattern but also as information such as a numerical value indicating a correct pattern indirectly. If it is determined in step S128 that a characteristic pattern as a two-dimensional code is not included (No), the process proceeds to step S116, and thereafter, the same processing as described above is performed for another code area.
- step S128 determines whether a characteristic pattern as a two-dimensional code is included (Yes). If it is determined in step S128 that a characteristic pattern as a two-dimensional code is included (Yes), the process proceeds to step S130.
- step S130 the new candidate area at this point is detected as a two-dimensional code area, and the process proceeds to step S132.
- This detection process is a process of cutting out a new candidate area from the original image (generating a duplicate image) based on the coordinate information of the new candidate area and storing it in the storage device 70.
- step S132 color determination processing is performed for specifying the color assigned to each cell in the two-dimensional code for the region of the two-dimensional code detected in step S130, and the process proceeds to step S134.
- This color determination process is executed with the region of the two-dimensional code detected in step S130 as an argument, and the color assigned to each cell in the two-dimensional code becomes a return value. A specific processing procedure in this color determination processing will be described later.
- step S134 for the region of the two-dimensional code detected in step S130, based on the color specified in step S132, the information indicated by the two-dimensional code is changed to the color assigned to each cell C and its Based on the combination, the process proceeds to step S136.
- step S136 the information identified in step S134 is stored in the RAM 62 or the storage device 70, and the process proceeds to step S138.
- step S138 the variable X is incremented (X + 1 ⁇ X), and the process proceeds to step S140.
- step S138 by incrementing this variable X, the number of candidate areas detected and identified as areas of the two-dimensional code is integrated.
- step S140 it is determined whether or not the variable X is greater than or equal to a predetermined number at this time. That is, it is determined whether or not a predetermined number or more of candidate areas form a two-dimensional code body.
- step S140 If it is determined in step S140 that the variable X is equal to or greater than the predetermined number (Yes), the process proceeds to step S140, and if it is determined that the variable X is not equal to or greater than the predetermined number (No), The process proceeds to step S142.
- steps S116 to S140 are repeated for all the code areas registered in the list unless the number of candidate areas detected and identified as a two-dimensional code exceeds a predetermined number. Thereafter, when the above steps S116 to S140 are performed for all candidate regions, it is determined in step S116 that there is no unprocessed candidate region, the process proceeds to step S142, and the value of the variable Y at this time is It is determined whether or not the value is smaller than the value of n (Y ⁇ n).
- step S142 If it is determined in step S142 that the value of the variable Y is smaller than the value of the variable n (Yes), the process proceeds to step S144.
- step S144 the variable Y is incremented (Y + 1 ⁇ Y), the process proceeds to step S108, and the processes of steps S108 to S144 are performed. Thereafter, the processes in steps S110 to S144 are performed based on the next edge image. If the variable X becomes equal to or larger than a predetermined number in the process, “Yes” is determined in step S140 and the step is performed. The process proceeds to S146. On the other hand, if the variable X does not become a predetermined number or more during the process, the process for the next edge image is repeated.
- step S142 when it is determined in step S142 that the value of the variable Y is equal to or greater than the value of the variable n (No), the process proceeds to step S146 regardless of the value of the variable X.
- step S146 based on the identified two-dimensional code information, an article detection process for detecting a designated article in the original image is executed, and the series of processes ends. A specific processing procedure in this article detection processing will be described later.
- FIG. 5A is a diagram illustrating an example of the correspondence relationship between the value of the variable Y, the image type, and the threshold value
- FIG. 5B is a flowchart illustrating an example of the processing procedure of the edge image generation process.
- the edge image is performed based on a plurality of different types of conversion conditions.
- the first to i-th edge images corresponding to the first to i-th (1 ⁇ i) conversion conditions are grayscale images obtained by converting the original image to grayscale with different threshold values.
- An image obtained by linearizing the contour portion of the binarized image is obtained.
- each of j types of color components from the (i + 1) th to (i + j) th (1 ⁇ j) edge images corresponding to the (i + 1) th to (i + j) conversion conditions is extracted from the original image.
- the color component image is converted into a gray scale, and the gray scale image is binarized with a preset threshold value, and the contour portion of the binarized image is linearized.
- the (i + 1) th to (i + j ⁇ k) conversions are performed.
- the color component image obtained by extracting each of the j types of color components from the original image is converted to grayscale, and the grayscale image is converted into k types of color images.
- An image obtained by linearizing the contour portion of the binarized image binarized at each threshold value is obtained.
- “i + j ⁇ k” types of edge images can be generated based on the maximum “i + j ⁇ k” types of conversion conditions.
- “i” and “k” are determined by the type of threshold prepared in advance, and “j” is defined by the type of color space (color system) used for the original image. The value is determined by the number of color components to be processed. For example, if there are three types of threshold values and the color space is an RGB color space, the values of “i” and “k” are 3, and the value of “j” is 3.
- the numerical values 1 to 6 corresponding to the value of the variable Y, the image type and threshold value used when generating the edge image indicating the type of conversion condition, are associated and stored in the storage device 70 as a data table.
- the example of FIG. 5A is an example in which the value of “i” is 3, the value of “j” is 3, and the value of “k” is 1.
- the upper limit value of the variable Y is determined by the value set in the variable n, but in the present embodiment, the user can arbitrarily set a value according to the required two-dimensional code detection accuracy. Yes.
- the maximum value of the variable n is “6”.
- step S200 it is determined whether or not the value of the variable Y is 3 or less. If it is determined in step S200 that the value of the variable Y is 3 or less (Yes), the process proceeds to step S202, and if it is determined that the value of the variable Y is greater than 3 (No), The process proceeds to step S208.
- step S202 the original image data acquired in step S102 of FIG. 3 is copied, a grayscale image is generated based on the copied original image data, and the process proceeds to step S204.
- the data of the original image is color image data of 8 bits (0 to 255) for each color of RGB, a grayscale image is generated from this image data.
- the resolution is set to a level that does not impair the detection accuracy in consideration of the processing load and processing time. You may make it perform the process converted into low resolution.
- a gray scale image generation method for example, there are known generation methods such as an intermediate value method and an average method.
- the intermediate value method is a gray scale method using a value obtained by adding two of a maximum value and a minimum value and dividing by two out of three color component values of R, G, and B.
- the average method there are an arithmetic average (phase sum average) method, a geometric average (synergistic average) method, a weighted average method, and the like depending on how to calculate the average.
- the arithmetic average method is a method of calculating an average value by arithmetically averaging (adding and dividing by 3) the values of three color components of R, G, and B, and making a gray scale using the calculated average value. .
- the geometric average method calculates the average value by geometrically averaging the values of the three color components of R, G, and B (arithmetic mean of the logarithm values of the values of each color component), and uses the calculated average value for gray scale. It is a method to convert.
- the weighted average method is a method in which the values of the three color components R, G, and B are weighted, divided by 3, and averaged to obtain a gray scale.
- an NTSC weighted average method there are an NTSC weighted average method, an HDTV weighted average method, and the like.
- the NTSC weighted average method is the same as that of the luminance signal (brightness) separation method used in Japanese and American television broadcasting.
- the HDTV weighted average method is a method in which a weighting coefficient is set based on the HDTV standard, which is used as a reference when projecting digital high-definition broadcasting.
- grayscale image data is generated by converting each pixel value of the original image data into a grayscale value.
- step S204 binary image data obtained by binarizing the grayscale image data generated in step S202 with a threshold value corresponding to the current variable Y value is generated, and the process proceeds to step S206.
- the threshold value is compared with each pixel value of the grayscale image, and the pixel value is the threshold value. Binarization is performed by converting the pixel value to “0” when the value is less than or equal to the value and converting the pixel value to “255” when the pixel value is greater than the threshold value.
- three types of threshold values 120, 150, and 200 are prepared for the values 1, 2, and 3 of the variable Y, respectively. This threshold value for binarization is used to extract effective candidate areas in the subsequent processing according to the "region rules" and "characteristic patterns" of the two-dimensional code, and to identify the two-dimensional code appropriately. It is determined as a suitable value.
- the threshold 150, 200 is used to binarize the grayscale image generated in step S202.
- the threshold 150, 200 is used to binarize the grayscale image generated in step S202.
- the value after binarization is (0, 0, 0) corresponding to black.
- the value after binarization corresponds to white (255, 255, 255).
- the binarized image data for the original image data is obtained by binarizing each pixel value of the grayscale image data generated in step S202.
- edge image data obtained by linearizing the contour portion in the binarized image is generated for the binarized image data, a series of processes is terminated, and the original process is restored.
- the contour portion of the object existing in the binarized image is linearized by a known Bresenham line segment drawing algorithm. In the present embodiment, unnecessary pixels that do not form linearized contour lines are removed (for example, pixel values are converted to (0, 0, 0)).
- Bresenham's line segment drawing algorithm can perform all by only integer operations without using division and the like, and therefore can draw line segments at high speed. In this way, the image data obtained by linearizing the contour portion in the binarized image becomes edge image data.
- the value of variable Y is greater than 3 in step S200 and the process proceeds to step S208, the color component corresponding to the value of variable Y is extracted from the original image data, and the process proceeds to step S210.
- red, green, and blue color components are extracted for the values 4, 5, and 6 of the variable Y, respectively.
- the red component value 120, 0, 0
- the green component value (0, 80, 0)
- the blue component value (0, 0, 45) is extracted.
- the image data obtained by extracting the values of the respective color components becomes red component image data, green component image data, and blue component image data.
- step S210 grayscale image data is generated from the color component image data generated in step S208, and the process proceeds to step S212.
- the generation of grayscale image data is the same process as in step S202.
- step S212 the grayscale image generated in step S210 is binarized with a preset threshold value to generate binarized image data, and the process proceeds to step S206.
- a common threshold 120 is prepared for the values 4, 5, and 6 of the variable Y.
- the grayscale image data generated in step S210 is binarized using the threshold 120, and binarized image data for the color component image data generated in step S208 is generated. Then, after generating the binarized image data in step S212, the process proceeds to step S206 to generate edge image data obtained by linearizing the contour portion of the object in the binarized image, and the series of processing ends. To return to the original process.
- the threshold value used for binarization of the grayscale image corresponding to the color component image is one, but the present invention is not limited to this configuration.
- a condition may be set and binarization may be performed using a plurality of types of threshold values.
- the grayscale image corresponding to the original image is binarized using the threshold values in order from the smallest value, and an edge image is generated from the binarized image. It was set as the structure which processes.
- the process of generating the edge image by binarizing the grayscale image corresponding to the color component image is performed using red, green, and blue colors.
- the configuration is performed in the order of component images, the configuration is not limited to this.
- a configuration in which threshold values used for binarization of a grayscale image corresponding to an original image are used in a different order, and a configuration in which binarization of a grayscale image corresponding to a color component image is performed in a different color order Also good. Also, for example, a configuration in which edge image generation processing using color component images is performed before generation processing using original images, and configuration in which edge image generation processing using original images and color component images is performed alternately It is good also as a structure performed in another order, such as a structure performed at random.
- the order of using the threshold values is not limited to the configuration in which the order is from the smallest, It is good also as a structure made into order.
- the threshold value used for binarization of the grayscale image corresponding to the color component image may be the same value as the threshold value used for binarization of the grayscale image corresponding to the original image. May be different values.
- the present invention is not limited to these combinations. A combination of different types may be used.
- the edge image can be generated using both the original image and the color component image.
- the present invention is not limited to this configuration, and only the original image is used. Other configurations such as a configuration for generating an edge image or a configuration for generating an edge image using only a color component image may be used.
- “120”, “150”, and “200” are used as three kinds of threshold values when binarizing the grayscale image corresponding to the original image.
- the configuration is not limited to this, and another value may be used.
- “120” is used as the threshold value when binarizing the grayscale image corresponding to the color component image, but this is not restrictive. It is good also as a structure using a value.
- FIG. 6 is a flowchart showing a processing procedure of the effective area determination processing.
- FIG. 7A is a diagram illustrating an example of the shape of an ideal candidate region
- FIGS. 7B to 7E are diagrams illustrating an example of a shape outside the error range
- FIGS. ) Is a diagram showing an example of a shape within an error range.
- the angles between the sides (four corners) of the candidate area are desirably 90 ° as shown in FIG.
- any rectangular closed area (rectangular area) is specified as a candidate area, so that candidate areas having various outer shapes are specified. It will be. Even if the identified candidate region is a two-dimensional code, the shape may not be an ideal shape depending on the shooting environment (shooting angle, etc.), the image quality of the shot image, and the like. Therefore, if a strict determination is made, an area corresponding to the area of the two-dimensional code is also excluded. Therefore, in the present embodiment, an error range is set for information defined by area rules such as aspect ratio and angle at the time of determination.
- step S300 the aspect ratio of the selected candidate area is within the error range of the aspect ratio defined in the area rule of the template. Determine whether or not.
- the error range is “ ⁇ dx to + dx”. In the present embodiment, if dr is within the range of “ ⁇ dx to + dx”, it is determined that the error is within the range, and the range of “ ⁇ dx to + dx” is determined. If it is outside, it is determined that it is outside the error range.
- step S300 If it is determined in step S300 that the aspect ratio of the candidate area is outside the error range (No), the process proceeds to step S302, and if the aspect ratio of the candidate area is determined to be within the error range (Yes). Shifts to step S304.
- the candidate area determined to be out of the error range is determined to be an invalid candidate area (with the determination result as a return value), the series of processes is terminated, and the original process is restored. .
- step S304 whether or not the angle formed between the sides of the candidate region is within the error range of the angle defined in the region rule of the template. Determine.
- step S304 If it is determined in step S304 that the angle between each side of the candidate region is outside the error range (No), the process proceeds to step S306, and the angle between each side of the candidate region is determined to be within the error range. If yes (Yes), the process proceeds to step S308.
- the candidate area determined to be out of the error range is determined to be an invalid candidate area (with the determination result as a return value), the series of processes is terminated, and the original process is restored. .
- the errors d ⁇ 1 to d ⁇ 4 of the angles ⁇ 1 to ⁇ 4 are all within the error range (all are 90 ° in this example), and the error dr of the aspect ratio is “ ⁇ When only the aspect ratio is different within a range of “dx to + dx”, this candidate area is not excluded and is determined as an effective candidate area.
- the aspect ratio error dr is in the range of “ ⁇ dx to + dx”, but the angles ⁇ 1 to ⁇ 4 are not 90 °.
- this candidate region is not excluded and is an effective candidate region It is determined. That is, in the present embodiment, only candidate areas in which both the aspect ratio and the angle are within the error range are determined as effective candidate areas.
- FIG. 8 is a flowchart illustrating an example of a processing procedure of the color determination processing.
- the process proceeds to step S400, and the region of the separator 110 in the region of the two-dimensional code detected in step S130 of FIG. 3 is specified (coordinates are specified). Then, the process proceeds to step S402.
- the detected two-dimensional code area is managed, for example, with the coordinates of the upper left pixel being (0, 0) in the shape and orientation of FIG.
- the separator 110 is specified by scanning pixels (raster scan) from the coordinates (0, 0) in the row direction and the column direction, and the value (color) of each pixel is the color of the separator 110 (in this embodiment). It is determined whether or not it is included in the black (k) determination region used for the specific cell. When it is determined that the pixel color is included in the determination region, the pixel (coordinate) is determined as the separator 110.
- the coordinate information is stored in the RAM 62 or the storage device 70.
- step S402 the area where each cell exists is divided based on the coordinate information of the separator 110, and the process proceeds to step S404.
- step S404 variables to be referred to in the subsequent processing are initialized (0 ⁇ ap, 0 ⁇ x, 0 ⁇ y), and the process proceeds to step S406.
- step S406 a pixel having coordinates (x, y) in the specified two-dimensional code area of the separator 110 is selected, and the process proceeds to step S408.
- step S408 it is determined whether or not the value of the variable ap is greater than or equal to a predetermined number. If it is determined that the value is not greater than or equal to the predetermined number (No), the process proceeds to step S410, and is determined to be greater than or equal to a certain number. If yes (Yes), the process proceeds to step S422.
- step S410 the value (color) of the selected pixel is included in one of the determination areas in the color space that spreads around each of a plurality of colors used in the two-dimensional code as the central coordinates. It is determined whether it is located (in which determination area). If it is determined in step S410 that the selected pixel is included in any determination area (Yes), the process proceeds to step S412 and the selected pixel is not included in any determination area. (No), it transfers to step S414.
- step S412 the variable ap is incremented (ap + 1 ⁇ ap), and the process proceeds to step S414.
- the number of pixels determined to be included in the determination region is counted by incrementing the variable ap.
- This determination result (including determination area information and count result) is stored in the RAM 62 or the storage device 70 in association with each cell.
- step S412 counts them without distinction. That is, the variable ap is incremented regardless of whether it is determined to be yellow or magenta in the same cell area. Accordingly, when it is assumed that there are pixels included in the determination regions of different colors, the number of pixels included in each region is counted using another variable, and the process of step S412 is performed at the most number at the present time. It may be replaced with the process of setting the number of pixels in the determination region with many to the variable ap.
- step S414 it is determined whether or not the value of the variable x is xE which is the rightmost x coordinate of the row.
- the process proceeds to step S414, and it is determined whether or not the value of the variable x is xE. If it is determined that the value of the variable x is not xE (No), the process proceeds to step S416. If it is determined that the value of the variable x is xE (Yes), the process proceeds to step S422.
- step S416 the variable x is incremented (x + 1 ⁇ x), and the process proceeds to step S418. That is, when the value of the variable x is not xE, the variable x is incremented to change the coordinates to the pixel on the right by one.
- step S4108 it is determined whether the current coordinate (x, y) is the start coordinate of the separator portion corresponding to the next cell. If it is determined that it is the start coordinate of the next separator (Yes), the process proceeds to step S420, and if not (No), the process proceeds to step S406.
- step S420 the variable ap is initialized (0 ⁇ ap), and the process proceeds to step S406. That is, the variable ap is initialized when the x-coordinate reaches the start x-coordinate of the separator corresponding to the next cell while the number of color pixels included in the color determination area does not become a certain number or more.
- step S414 it is determined whether or not the value of the variable x is xE and the process proceeds to step S422, it is determined whether or not the value of the variable y is yE that is the y-coordinate at the lowest end in the column direction. .
- step S424 If it is determined that the value of the variable y is not yE (No), the process proceeds to step S424. If it is determined that the value of the variable y is yE (Yes), the process proceeds to step S438.
- step S424 the variable ap and the variable x are initialized (0 ⁇ ap, 0 ⁇ x), the variable y is incremented (y + 1 ⁇ y), and the process proceeds to step S406. That is, by initializing the variable x and incrementing the variable y, the coordinates are changed to the leftmost pixel in the next lower row. At this time, since the coordinates (x, y) are the coordinates of the area corresponding to the next cell, the variable ap is also initialized.
- step S408 determines whether or not the value of the variable ap is a certain number or more and the process proceeds to step S426, it is determined whether or not the value of the variable x is xE.
- the process proceeds to step S428, and when it is determined that the value of the variable x is xE (Yes), the process proceeds to step S432.
- the variable x is incremented (x + 1 ⁇ x), and the process proceeds to step S430.
- step S430 it is determined whether or not the current coordinates (x, y) are the start coordinates of the separator corresponding to the next cell. If it is determined that it is the start coordinate of the next separator (Yes), the process proceeds to step S432, and if not (No), the process proceeds to step S426.
- the variable ap is initialized (0 ⁇ ap), and the process proceeds to step S406. That is, when the variable ap is equal to or larger than a certain number, the processing in steps S426 to S430 is repeated, so that the color determination processing in step S410 is performed on the remaining pixels in the row in the area corresponding to each cell C. Omitted.
- step S426 determines whether or not the value of the variable x is xE and the process proceeds to step S434, whether or not the current value of the variable y is yE that is the lowest y coordinate in the column direction. Determine. If it is determined in step S434 that the value of the variable y is not yE (No), the process proceeds to step S436, and if it is determined that the value of the variable y is yE (Yes), the process proceeds to step S438. To do.
- step S436 the variable ap and the variable x are initialized (0 ⁇ ap, 0 ⁇ x), the variable y is incremented (y + 1 ⁇ y), and the process proceeds to step S406.
- step S4308 the determination result of the color of the pixel in each row of the area of each cell C stored in the RAM 62 or the storage device 70. Based on the above, the color of each cell C is determined, and the process proceeds to step S440.
- each cell C area when the number of pixels included in the determination area is equal to or greater than a predetermined number, the color of each cell C is changed to the color of the center coordinate of the determination area.
- Each cell C and the determined color are associated with each other and registered in the data table of the RAM 62 or the storage device 70.
- the color corresponding to the cell C is updated to the latest color thus determined.
- the number of pixels included in the determination area is a certain number or more is less than the predetermined number and is not included in any of the multiple-color determination areas used in the two-dimensional code Is associated with the corresponding cell C that the color is outside the determination region.
- step S440 it is determined whether or not a certain number or more of cells C that are colored in accordance with the coloring rule are present in the cells C whose color is determined in step S438.
- a certain number for example, 30% of the total
- a certain percentage for example, 30% of the total
- the determination is configured so as to determine whether or not there are a certain number or more of colored cells C that do not comply with the coloring rule based on the relative number (that is, the ratio) of the cells C in the two-dimensional code.
- the determination may be made based on the absolute number in the cell C of the two-dimensional code, or the cell C that does not comply with the coloring rule may have a specific pattern (for example, two or more consecutive cells C). Or the like) may be determined based on the number of patterns.
- step S440 If it is determined in step S440 that there are a predetermined number or more of cells C that are not colored according to the coloring rule (Yes), the process proceeds to step S442.
- step S442 it is determined whether the determination region is changed and the color determination can be performed again.
- the determination area referred to in the color determination in step S410 has been changed to a predetermined upper limit, it is determined that the color determination is not possible again.
- This “predetermined upper limit” is defined as a range in which each determination area can be changed so as not to interfere with other determination areas. As will be described later, the determination area is simply expanded. If there is, it can be determined that “the change has been made to a predetermined upper limit” that each determination area has been expanded to such an extent that it interferes with other areas. Further, in the case of shifting the determination area, it is in a state where the color defined in the determination area has shifted to a position (boundary) immediately before it becomes another color component. It has only to be changed to the upper limit.
- step S442 If it is determined in step S442 that the color determination can be performed again (Yes), the process proceeds to step S444. If not (No), the process proceeds to step S446.
- step S444 the determination area referred to in the color determination in step S410 is changed, and the process proceeds to step S404.
- each determination area is changed by expanding each determination area by a certain distance in the color space or by shifting each determination area by a certain distance in the color space.
- the determination area may be configured to shift to a position on the color space where the color component bias in the image area of the two-dimensional code can be canceled. Specifically, referring to the color distribution in the image area of the two-dimensional code, when a specific color component is increased overall in the distribution, each determination area is shifted in the direction of decreasing this color component.
- step S444 the process proceeds to step S404, and the color determination process is performed again for the area of each cell C divided in step S402. Thereafter, until it is determined that there is not a certain number or more of cells C that are not colored according to the coloring rule in each of the cells C whose colors have been determined again ("No" branch of step S440). The determination area is changed and the color determination is repeated again (steps S404 to S444).
- step S442 determines whether the color determination cannot be performed again and the process proceeds to step S446.
- an error process is performed, a series of processes are terminated, and the process returns to the original process.
- this error processing it is assumed that none of the colors of the cells C can be determined, and all the correspondence relationships registered in the data table are deleted, and thus the empty data table is returned to the original processing as a return value. To do.
- the processes after S138 are performed without performing any processes in steps S134 and S136.
- step S440 if it is determined in step S440 that there are no more than a certain number of colored cells C that do not comply with the coloring rule (No), the process proceeds to step S448. Transition. When the process proceeds to step S448, it is determined whether there is a cell C with a color that does not comply with the coloring rule. If it is determined in step S448 that the corresponding cell C exists (Yes), the process proceeds to step S450, and if it is determined that the corresponding cell C does not exist (No), a series of processing ends. Then, the process returns to the original process.
- step S450 the corresponding cell C is identified from the two-dimensional code, and the process proceeds to step S452.
- a cell C that is colored that does not comply with the coloring rule is specified, and this cell C is specified from the two-dimensional code.
- step S452 for each cell C identified in step S448, the color to be originally assigned is estimated according to the coloring rule, and the process proceeds to step S454.
- step S448 For the cell C identified in step S448, a color that is considered in relation to the color assigned to the cell C adjacent to the cell C is selected as a candidate for the color that should be originally assigned according to the coloring rule. Then, the most probable color among the candidates is estimated as the color to be assigned to the cell C. In step S454, for each cell C identified in step S448, it is determined that the color of the cell C is the color estimated in step S452, the series of processing ends, and the original processing is restored. .
- the color in the data table is updated only for each cell C identified in step S448.
- the data table in which the correspondence between the cell C and the color is registered at this time is used as a return value, and the code-use article detection process of FIG. Return.
- information is identified in step S134 after recognizing the color assigned to each cell C based on the data table.
- the algorithm shown in steps S400 to S454 or the algorithm shown in steps S400 to S438 is applied when the process of determining whether or not a characteristic pattern is included in step S128 of FIG. It is possible. If the configuration is a two-dimensional code having only a data area, the color determination process in steps S400 to S438 or the color determination process in steps S400 to S454 is performed before the process in step S128. It is also possible to adopt a configuration for performing processing for determining whether or not a characteristic pattern is included based on the determination result. For example, the color determination process (S132) is performed after the process of step S126 of FIG. 1, and in step S128, whether or not a characteristic pattern is included based on the result of the color determination process performed previously. Judgment is made. In this case, the subsequent color determination process can be made unnecessary.
- FIG. 9 is a flowchart illustrating an example of a processing procedure of the article detection processing.
- FIG. 10 is a diagram showing an example of identification information and article information registered in the database.
- FIG. 11A is a diagram illustrating an example of a detection target image in the article detection mode
- FIG. 11B is a diagram illustrating a display example of a detection result.
- 12A is a diagram illustrating an example of a detection target image in the time limit management mode
- FIG. 12B is a diagram illustrating a display example of a detection result
- FIG. 12C is a position where the camera 76 is disposed. It is a figure which shows an example.
- step S500 it is determined whether or not the set detection mode is the article detection mode. If it is determined that the set detection mode is the article detection mode (Yes), information on an article designated as a detection target (hereinafter referred to as a designated article) is acquired, and the process proceeds to step S502. If it is determined that the mode is not the article detection mode (No), the process proceeds to step S520.
- step S502 based on the article information stored in the storage device 70, the designation is made in the article corresponding to the article information corresponding to the identification information of each two-dimensional code stored in the RAM 62 or the storage device 70. It is determined whether there is an article.
- the product information for example, as shown in FIG. 10, in association with the identification information identified in step S134 of FIG. 3, the product name code, the product type, the number, the storage start time, the shipping deadline, the expiry date Is registered.
- one two-dimensional code is attached to each packing material with respect to an article packed in a packing material such as cardboard, and the product name code is attached to one or more items packed in each packing material.
- the number information is information on the number of articles packed in one packing material. For example, if the storage start time is an article managed in a warehouse, information on the date of receipt is registered. In addition, in the case of an article such as a food item displayed on the merchandise shelf in the store, information on the display date or information on the date of manufacture of the article is registered. In the case of an article such as food or medicine whose state deteriorates with the elapsed days, information on the expiration date (expiration date) is registered. Further, when there is a shipment (storage) deadline for an article stored in the warehouse, information on the shipment (storage) deadline is registered.
- the presence / absence of the designated article is determined by determining whether or not the identification information corresponding to the designated product name code is included in the identification information identified in step S134 of FIG. If it is determined in step S502 that there is a designated article (Yes), the process proceeds to step S504. If it is determined that there is no designated article (No), the process proceeds to step S518.
- step S504 the designated article information is acquired from the article information in the storage device 70, and the process proceeds to step S506.
- the image data of the original image and the coordinate information in the original image of the two-dimensional code corresponding to the identification information of the designated article are acquired from the RAM 62 or the storage device 70, and the process proceeds to step S508.
- FIG. 11A As original image data, as shown in FIG. 11A, a plurality of articles 200 packed in a cardboard box are stacked, and a two-dimensional code 100 is attached to the front surface of the cardboard box. It is assumed that image data indicating the obtained image has been acquired.
- the area to be detected for the designated article is 48 boxes in which the two-dimensional code is displayed on the front side (included in the image).
- step S508 processing for highlighting the image area of the two-dimensional code of the designated article is performed on the original image data acquired in step S506, and the process proceeds to step S510.
- the “processing for highlighting” includes, for example, surrounding the image area of the two-dimensional code in the original image with a line of a conspicuous color such as red, or conspicuously the image area of the two-dimensional code. This is a process of painting with a color or emphasizing the outline of the image area of the two-dimensional code (thickening the outline, changing the outline to a conspicuous color such as red, or both).
- processing may be performed so that blinking display or animation display is performed.
- the “processing for highlighting” is processing for performing highlighting processing such as marking so that the image of the two-dimensional code corresponding to the designated article to be detected in the original image is visually noticeable.
- step S510 it is determined whether or not there are a plurality of two-dimensional codes corresponding to the designated article. If it is determined that there are a plurality of codes (Yes), the process proceeds to step S512. If not (No), the process proceeds to step S514. Transition.
- step S512 based on the storage start time information, processing is performed on the original image to add number images in the order of storage start in the vicinity of each two-dimensional code corresponding to the designated article, and step S514.
- step S5114 processing for adding image information such as the storage start time of the designated article, the shipping deadline, and the expiration date to the original image is performed, and the process proceeds to step S516.
- Processing processing is performed so that information related to these articles is displayed in a portion of the image where the article 200 is not displayed.
- information related to the article is displayed in association with each number. It should be noted that the display process of the information related to the article 200 in step S514 may or may not be performed. If not, the process proceeds from step S512 to step S516. To do.
- step S516 the image processed in steps S508, S512, and S514 is displayed on the display device 72, the series of article detection processes is terminated, and the process returns to the original process.
- the image example of FIG. 11B is an example in the case where three designated articles are detected from the original image of FIG. 11A, and a two-dimensional code corresponding to each article is represented by a square frame. Surrounding markings are given. As a result, the user can visually grasp immediately which article 200 in the original image is the designated article.
- numbers (1) to (3) are assigned (displayed) in the order of the warehousing date in the vicinity (lower right) of each two-dimensional code of the designated article. ).
- the user can grasp
- an article has a expiration date, it can be shipped in order from the article that reaches the expiration date first.
- a character image of the product name code, the date of receipt, the shipping deadline, and the expiration date is displayed along with the numbers corresponding to the order of receipt.
- the user can easily determine whether or not the detected article is the designated article, and can easily know the correct receipt date, shipping deadline, and expiry date.
- the article is a medicine, and the shipping deadline and the expiration date of each article can be confirmed.
- step S502 determines whether there is no designated article and the process proceeds to step S518, the image data of the original image is acquired from the RAM 62 or the storage device 70, and the original image is displayed on the display device 72 based on the acquired image data. Is displayed. Then, the series of processing ends, and the processing returns to the original processing. That is, when the designated article is not included in the photographed image, an original image that is not subjected to highlighting processing or additional display processing is displayed. Thereby, the user can grasp
- step S500 if the set detection mode is not the article detection mode and the process proceeds to step S520, it is determined whether or not the set detection mode is the time limit management mode. When it is determined that the set detection mode is the time limit management mode (Yes), the process proceeds to step S522. When it is determined that the set detection mode is not the time limit management mode (No), the process proceeds to step S532.
- step S522 the shipping deadline and expiry date information corresponding to the identification information obtained by identifying in step S134 of FIG. 3 is acquired from the database stored in the storage device 70, and the process proceeds to step S524. Transition.
- step S524 the current (current) date and time information acquired from the RTC (Real Time Clock) (not shown) of the computer system is compared with the acquired shipping deadline and expiration date, and the deadline has passed. It is determined whether there is an article.
- RTC Real Time Clock
- step S524 If it is determined in step S524 that there is an article whose term has expired (hereinafter referred to as a progressed article) (Yes), the process proceeds to step S526, and if it is determined that there is no elapsed article (No), step S526 is performed. The process proceeds to S530.
- step S524 not an article whose deadline has passed but an article whose number of days until the deadline is equal to or less than a predetermined number of days may be detected. That is, in step S524, a determination may be made by comparing a time limit obtained by subtracting a predetermined period from the acquired shipping time limit and consumption time limit, and information on the current date.
- step S526 the image data of the original image and the coordinate information of the area of the two-dimensional code corresponding to the progress article are acquired from the RAM 62 or the storage device 70, and the process proceeds to step S528.
- the original image data for example, a plurality of articles 300 are placed on a merchandise display shelf shown in FIG. 12A, and a subject to which a two-dimensional code 100 is attached on the front side of each article 300 is shown.
- image data indicating a captured image is acquired.
- the two-dimensional code reader 1 is composed of a portable information terminal. ), The lens portion of the camera 76 is disposed.
- the user can take an image of the product display shelf with the back-side camera 76 while viewing the display screen shown in FIG. Then, as shown in FIG. 12B, the data of the original image becomes the data of the captured image in the imaging range PR. That is, here, an embodiment is shown in which the user carries the two-dimensional code reader 1 and can check the detection result of the progressing article while photographing the product on the product display shelf.
- step S528 the original image data acquired in step S526 is processed for highlighting the image area of the two-dimensional code of the article in progress, and the process proceeds to step S516.
- the processing here is the same as the processing in step S508.
- step S516 the image processed in step S528 is displayed on the display device 72, the series of article detection processes is terminated, and the process returns to the original process.
- the image example of FIG. 12B is an example in which three progressing articles are detected, and a two-dimensional code corresponding to each progressing article is marked with a round frame. As a result, the user can visually grasp immediately which article 300 in the original image is the progress article.
- step S524 if it is determined in step S524 that there is no progressing article and the process proceeds to step S530, the image data of the original image is acquired from the RAM 62 or the storage device 70, and the original data is displayed on the display device 72 based on the acquired image data. Display an image. Then, the series of processing ends, and the processing returns to the original processing.
- step S520 when a photographed image does not include a progress article, an original image that is not subjected to highlighting processing or additional processing is displayed. Thereby, the user can grasp
- An image such as a message indicating that there is no progressing article may be displayed in the original image. If it is determined in step S520 that the mode is not the time limit management mode and the process proceeds to step S532, a message for prompting the mode setting is displayed on the display device 72, and the series of processes is terminated. Return to processing. This process is an unnecessary process when it is configured to always set one of the article detection mode and the term management mode.
- FIG. 13 is a flowchart illustrating an example of a processing procedure of the detection mode setting process.
- the detection mode setting process is a process performed independently of the code-use article detection process of FIG. 3, and is activated in response to a user instruction input via the input device 74. As shown in FIG. First, the process proceeds to step S600.
- step S600 in response to an instruction input, the process shifts to a setting mode for setting a detection mode, and the process shifts to step S602.
- the graphic of the button for selecting the article detection mode and the graphic of the button for selecting the deadline management mode are displayed on the display screen of the display device 72 so that the input device 74 can easily select the detection mode.
- the input device 74 is a touch panel, a button displayed on the screen is selected and pressed by touching with a finger. If the input device is a mouse, the button is selected and clicked by clicking with a mouse cursor. Therefore, one of the modes can be selected. That is, the detection mode can be easily selected and set by a GUI (Graphical User Interface).
- GUI Graphic User Interface
- step S602 it is determined whether or not the article detection mode is selected. If it is determined that the article detection mode is selected (Yes), the process proceeds to step S604. If not (No), the process proceeds to step S612.
- the article detection mode is set as the detection mode, and the process proceeds to step S606.
- step S606 a screen prompting input of the designated article is displayed on the display screen of the display device 72, and the process proceeds to step S608. For example, a list of articles that can be designated as designated articles is displayed so that a list can be selected. Further, it may be possible to search for an article that can be specified by a product name, a product name code, a serial number, or the like.
- step S608 it is determined whether or not the information on the designated article has been input. If it is determined that the information has been input (Yes), the process proceeds to step S610. If not (No), the determination process is performed until it is input. continue. Note that when the setting mode is terminated when the designated article is not found, the determination process is terminated, and the series of processes is terminated.
- step S610 the designated article to be detected input in step S608 is set, and the process ends. As a result, the article detection mode is set as the detection mode, and the designated article is set. Specifically, these pieces of information are stored at predetermined addresses in the RAM 62.
- step S612 it is determined whether or not the time limit management mode is selected. If it is determined that the term management mode has been selected (Yes), the process proceeds to step S614. If not (No), the process proceeds to step S602 and the determination process is continued.
- the time limit management mode is set as the detection mode, and the series of processing ends. Thereby, the term management mode is set as the detection mode. Similar to the article detection mode, this information is stored at a predetermined address in the RAM 62.
- a corresponding area containing a characteristic pattern is detected as a two-dimensional code area in the original image among the corresponding areas corresponding to the candidate areas.
- Each of the plurality of two-dimensional codes included can be specified.
- extraction of candidate regions, determination of whether or not a characteristic pattern is included in the extracted candidate regions, and The detection of the two-dimensional code area is repeatedly performed (S108 to S144 in FIG. 3).
- the candidate area newly extracted for a specific edge image may match the extracted candidate area extracted for the edge image referenced earlier in the area of the original image. is assumed. However, in the above configuration, for such an extracted region, it is not determined whether or not a characteristic pattern is included in the extracted candidate region, and detection of a two-dimensional code region is not performed (in FIG. S124). “Yes” branch).
- the two-dimensional code that should originally be the same is repeatedly identified. It is possible to eliminate an unnecessary processing burden such as. Further, in this iterative process, by determining whether the shape information such as the aspect ratio of each candidate area and the angles of the four corners is within a preset error range with respect to the ideal area shape. (S300 to S308 in FIG. 6), it can be determined whether or not the extracted candidate area is a valid candidate area (S122 in FIG. 3).
- the candidate area having a shape outside the error range can be excluded from the subsequent processing target with respect to the ideal shape, and is unnecessary for an area that is clearly different from the area of the two-dimensional code Can be prevented from being performed.
- an edge image is generated from the original image, and candidate regions that are candidates for the two-dimensional code region are extracted from the edge image (S110 in FIG. 3), and this extraction in the original image is performed.
- Information is identified by detecting the area of the two-dimensional code from the area corresponding to the candidate area (S116 to S134 in the figure).
- the region of the two-dimensional code can be detected from the limited range of the extracted candidate region. As a result, the processing load and processing time required to identify information from the two-dimensional code area can be reduced.
- information encoded by the two-dimensional code can be identified for each two-dimensional code area detected based on each of the plurality of edge images (S134 in FIG. 3). Further, in the above embodiment, both candidate regions have a certain degree of overlap according to the degree of overlap between a candidate region extracted from a specific edge image and an extracted candidate region in another edge image. Can be determined to match.
- one candidate region is included in the other candidate region among the candidate region extracted from the specific edge image and the extracted candidate region in another edge image. It can be determined that both candidate areas match. Moreover, in the said embodiment, when one or more vertices in the candidate area extracted from the specific edge image are located within a certain range from any vertex in the extracted candidate area, both candidate areas are It can also be determined that they match.
- candidate regions can be extracted according to the rules defined in the template. Therefore, by changing the rules together with this template, it can be detected as a region of a two-dimensional code formed according to an arbitrary rule. Can be.
- information indicated by the two-dimensional code can be identified based on the color assigned to each cell C of the two-dimensional code (S132 to S134 in FIG. 3).
- the cells The color that should be originally attached to the image is estimated according to the coloring rule (S452 in FIG. 8), and information can be identified based on the color, so that it is possible to prevent the information itself from being identified. .
- the said embodiment it can be determined by which determination area
- the color determination process for each pixel can be performed at a higher speed than when the color determination process is performed on all the pixels in each row in the area of each cell C. Further, in this configuration, even when the color of each cell C is determined, even if the color assigned to many cells C is not included in any determination region, and the information itself cannot be identified. It is configured to prevent such a situation.
- the determination region is fixed. After expanding or changing only the area, the color assigned to each cell is determined again (S444 to S438 in the figure). With this configuration, even if the image generation conditions are poor and the color cannot be determined properly, the determination area can be expanded to increase the determination sensitivity and determine the color again. By shifting to an appropriate position according to the distribution of the color and determining the color again, the color determination probability can be increased.
- the designated article when the article detection mode is set, based on the information identified based on the determination result of the color of each cell C, the designated article exists among the articles corresponding to the information. It can be determined whether or not to perform (S502 in FIG. 9). Furthermore, when the designated article exists, the original image is processed so that the region of the two-dimensional code corresponding to the designated article in the original image is highlighted (S508 in FIG. 9), and the processed image is displayed. Yes (S516 in FIG. 9).
- an image in which the area of the two-dimensional code corresponding to the designated article in the original image is highlighted can be displayed, so that the user can view the designated article in the original image by looking at the displayed image.
- the position can be grasped simply and instantaneously.
- images of numbers indicating the order in order of old management start time are displayed on the two-dimensional code corresponding to the designated article. It is configured so that it can be processed to be added to the original image so as to be displayed on the area or in the vicinity thereof (S512 in FIG. 9).
- this configuration is configured such that processing for adding display information related to the designated article can be performed on the original image in addition to highlight processing (S514 in FIG. 9).
- the user can confirm information related to the designated article such as the product name, product name code, management start time limit, and shipping time limit by looking at the displayed image.
- the deadline management mode when the deadline management mode is set, an article whose deadline such as a shipping deadline or a consumption deadline has passed, or an article whose period until the deadline is a predetermined period or less can be designated. Then, from among the articles corresponding to the information identified based on the determination result of the color of each cell C, it is determined whether or not there is an article that has passed the deadline or an article whose period until the deadline is a predetermined period or less. This can be determined (S524 in FIG. 9).
- the original image is processed so that the region of the two-dimensional code corresponding to the designated article in the original image is highlighted (S528 in FIG. 9), and the processed image is displayed. Yes (S516 in FIG. 9).
- an image in which the area of the two-dimensional code corresponding to the designated article in the original image is highlighted can be displayed, so that the user can view the designated article in the original image by looking at the displayed image. The position can be grasped simply and instantaneously.
- the present invention has been described above.
- the present invention is not limited to the above embodiment, and can take various forms as long as it belongs to the technical scope of the present invention. Needless to say.
- the region of the two-dimensional code is not limited to the two-dimensional code as described above, and may be a region indicating a specific image (for example, a logo).
- a candidate for a color to be attached according to the coloring rule is selected, and the most probable single color is estimated as a color that should be originally attached according to the coloring rule.
- any of these candidates may be selected by the user.
- information may be identified for each color selected as a candidate, and the user may be allowed to select one of the identified information.
- no processing is performed in S452 of FIG. 8, and each candidate color is determined as a color assigned to the corresponding cell C in S454.
- S134 of FIG. 3 if there are a plurality of colors determined as the colors assigned to the cell C, information is identified for each color or based on a combination of the colors, and the information thus identified is identified. It is possible to consider a configuration in which the user selects one of the items.
- the present invention is not limited to these examples. You may comprise so that the articles
- the code-using article detection process is described as a series of processes performed using a user operation input (instruction information) via the input device 74 as a trigger.
- the present invention is not limited to this configuration. For example, if the article to be detected is set (detection mode is set), the code-use article detection process is repeatedly executed without a trigger, and the detection process is always executed on the captured image. Other configurations such as a configuration for displaying an image of the detection result may be used.
- the two-dimensional code reader 1 is configured to implement each function necessary for the code-using article detection process by executing a dedicated program by the CPU 60, but is not limited to this configuration.
- a part of the processing may be replaced with hardware such as a semiconductor integrated circuit so that each function is realized by both hardware and software. If possible, all or almost all of the processing is performed by hardware.
- a configuration may be adopted in which each function is realized mainly by hardware.
- S102 in FIG. 3 is an image acquisition unit in the present invention
- S108 (S200 to S212 in FIG. 5) is a component conversion unit in the present invention
- S110 in the figure is an area extracting unit in the present invention
- S128 in the figure is a pattern determining unit in the present invention
- 3 is an area detection unit in the present invention
- S108 to S144 (especially S108, S142, and S144) in FIG. 3 are repeated execution units in the present invention
- S124 in FIG. 3 is a coincidence determination unit in the present invention.
- FIG. S134 is an information identifying unit in the present invention.
- S402 in FIG. 8 is a cell region specifying unit in the present invention
- S452 in FIG. 8 is a color estimating unit in the present invention
- S410, S438 and S454 are color determination units in the present invention.
- S502 and S524 in FIG. 9 are the article presence / absence determination unit in the present invention
- S508, S512, and S514 in FIG. 9 are the image processing units in the present invention
- S506 in FIG. 9 is the image display unit in the present invention.
- the detection mode is the designation information in the present invention
- S600 to S614 in FIG. 13 are the designation information setting unit in the present invention.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Electromagnetism (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Toxicology (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Quality & Reliability (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
Description
二次元コードが、複数のセルが配列され、各セルに色を付すことで該色または色の組合せに応じた1以上の情報それぞれをコード化した構成である場合に、情報の識別を行うためには各セルの色の判定を行う必要がある。色の判定は、二次元コードで用いられる色について、各セルの領域の全てのピクセルの色を判定しその判定結果に基づき行う。
また、二次元コードの面積が大きい場合、各セルの面積が大きい場合、セルの面積が大きくかつ数が多い場合などに、各セルを構成する全てのピクセルに対して色の判定処理を行うと、色の判定処理に要する時間が極めて長く必要となる。
本発明は、このような課題を解決するためになされたものであり、その目的は、画像に含まれる複数の二次元コードそれぞれを特定すると共に、特定された二次元コードそれぞれの各セルの領域の色の判定処理にかかる時間を低減するための技術を提供することである。
上記課題を解決するために、本発明に係る第1の構成の二次元コードリーダは、複数のセルが配列され、前記複数のセルに色の異なる複数種類のセルが含まれるように各セルに色を付すことで該色または色の組合せに応じた1以上の情報それぞれをコード化した構成の複数の二次元コードの領域を含む領域が撮影されてなる画像を取得する画像取得部と、該画像取得部により取得された画像を、該画像に含まれるエッジ成分の分布を示すエッジ画像に変換する成分変換部と、該成分変換部により変換されたエッジ画像から、あらかじめ定められた規則に従って形成されている領域を前記二次元コードの領域からなる候補領域として抽出する領域抽出部と、前記画像取得部により取得された画像における、前記領域抽出部により抽出された候補領域に対応する対応領域それぞれについて、該対応領域を形成する要素に、前記二次元コードの領域を規定する特徴的なパターンが含まれているか否かを判定するパターン判定部と、該パターン判定部により特徴的なパターンが含まれていると判定された対応領域を、前記二次元コードの領域として検出することにより、前記画像に含まれる複数の二次元コードの領域を検出可能な領域検出部と、前記領域検出部により検出された二次元コードの領域それぞれについて、該二次元コードの領域における各セルの領域に付されている色を判定する色判定部と、前記二次元コードの領域における各セルの領域に、該セルの領域について前記色判定部が判定した色が付されているものとして、各セルの領域に付された色または色の組合せに基づいて前記コード化された情報を識別する情報識別部と、を備えている。
この構成では、取得された画像(原画像)から生成されたエッジ画像に基づき、このエッジ画像中における候補領域の抽出、この抽出した候補領域に対応する原画像中の対応領域それぞれに特徴的なパターンが含まれているか否かの判定を経て、原画像中から二次元コードの領域を検出することができる。
また、上記構成では、エッジ画像に基づいて検出された各二次元コードの領域について、この二次元コードの領域における各セルの領域に付された色に基づいて、コード化された情報を識別することができる。
これにより、各セルの領域を構成する複数のピクセルにおいて所定数の有効な色の判定結果を得た場合に、残りの未処理のピクセルについては色の判定処理が行われないため、その分だけ各セルの領域の色の判定にかかる処理時間を短縮することができる。
また、エッジ画像から候補領域を抽出する際の「あらかじめ定められた規則」とは、二次元コードの領域からなる候補領域を規定するものであればよく、例えば、二次元コードの領域の外形形状、外形形状が多角形である場合における各辺の長さや各辺で形成される角度、外形形状が多角形である場合における各辺の長さの比率、エッジ画像に二次元コードの領域が含まれている場合におけるエッジ成分の分布パターン(エッジ成分の分布状態、分布されているエッジ成分の配置など)、などを規定しておけばよい。
また、「有効な色」とは、例えば、色の判定対象が複数ある場合には判定結果が最も多数となる色や、予め各セルの領域に付す色が解っている場合、または、色の並びなどから推定できる場合は、各セルの領域に対応する色などが該当する。
さらに、第2の構成の二次元コードリーダは、上記第1の構成において、前記複数のセルは、あらかじめ定められた色が付されたセパレータによって分けられており、前記あらかじめ定められた色に基づき前記二次元コードの領域における各ピクセルの色の判定処理を行うことで、前記二次元コードの領域における前記セパレータの領域の位置を特定するセパレータ領域特定部と、前記セパレータ領域特定部で特定されたセパレータの領域の位置に基づき、前記二次元コードの領域における各セルの領域の位置を特定するセル領域特定部と、を備えている。
この構成において、「あらかじめ定められた色」は、セルに付される色以外の色であることが望ましいが、例えば、二次元コードの領域の位置や方向を特定するセルなどの、特別なセルを含む場合には、その色と同じ色にする場合もある。
さらに、第3の構成の二次元コードリーダは、上記第2の構成において、前記色判定部は、前記二次元コードの領域において、行または列を形成するピクセル群ごとに各ピクセルの色の判定を順次行い、各行または各列の各セルの領域に対応する部分において所定数の有効な色の判定結果を得たときに、次のセルの領域を示すピクセルの手前のピクセルまで、その行または列における色の判定処理が未処理の残りのピクセルについて色の判定処理を省略し、各セルの領域に対する各行または各列の前記色の判定結果に基づき各セルの領域に付された色を判定する。
これにより、各セルの領域の各行または各列において、所定数の有効な色の判定結果が得られた場合に、残りの未処理のピクセルについては色の判定処理が行われないため、その分だけ各セルの領域の色の判定処理にかかる処理時間を短縮することができる。
さらに、第4の構成の二次元コードリーダは、上記第2の構成において、前記色判定部は、前記二次元コードの領域における各セルの領域において、行または列を形成するピクセル群ごとに各ピクセルの色の判定を順次行い、各セルの領域に対応する各行または各列において所定数の有効な色の判定結果を得たときに、次のセルの領域を示すピクセルの手前のピクセルまで、その行または列における色の判定処理が未処理の残りのピクセルについて色の判定処理を省略し、各行または各列の前記色の判定結果に基づき各セルの領域に付された色を判定する。
また、セルごとに各ピクセルの色の判定処理を行うため、次のセルの領域について各ピクセルの色の判定処理を行う前に、判定処理の終わったセルの領域に付された色の判定を行うことが可能となる。従って、次のセルの色判定処理を行う前に、セルの色の並び順等を知りたい場合に有効である。
さらに、第5の構成の二次元コードリーダは、上記第1~第4の構成のいずれか1において、前記成分変換部による画像のエッジ画像への変換を、異なる1種類以上の変換条件のそれぞれについて順に実施させると共に、各変換条件について変換されたエッジ画像それぞれに対し、前記領域抽出部による候補領域の抽出、前記パターン判定部による特徴的なパターンの判定、および、前記領域検出部による二次元コードの領域の検出、を繰り返し実施させる繰り返し実施部と、特定の前記エッジ画像に対して、前記領域抽出部により抽出された候補領域それぞれが、別のエッジ画像について前記領域抽出部が抽出した候補領域(以降「抽出済み候補領域」という)と一致するか否かを、両方の候補領域に基づいて判定する一致判定部と、を備えている。
この構成では、原画像に基づいて生成される複数種類のエッジ画像それぞれについて、候補領域の抽出、この抽出した位置情報に対応する対応領域に特徴的なパターンが含まれているか否かの判定、および、二次元コードの領域の検出を繰り返し実施している。
また、この繰り返しの過程では、特定のエッジ画像について新たに抽出された候補領域が、先に参照されたエッジ画像について抽出された抽出済み候補領域と、原画像の領域において一致している場合も想定される。ところが、上記構成では、このように一致する抽出済み候補領域について、抽出した候補領域に特徴的なパターンが含まれているか否かの判定、および、二次元コードの領域の検出を実施しない。
そのため、複数のエッジ画像それぞれに基づいて検出された各二次元コードの領域について、この二次元コードの領域にて示される情報を識別するに際し、本来同じものであるはずの二次元コードの領域を繰り返し識別してしまうといった無用な処理負担をなくすことができる。
さらに、第6の構成の二次元コードリーダは、上記第1~第5の構成のいずれか1において、前記二次元コードは、前記複数のセルそれぞれに付される色が、複数種類の色のうち、該セルにてコード化すべき情報、および、該セルと隣接するセルに付された色に応じた着色規則に従って定められており、さらに、前記領域検出部により検出された二次元コードの領域それぞれについて、該二次元コードの領域における各セルの領域のうち、該セルの領域に対して前記着色規則に従って付されるべき色、および、前記二次元コードにおいて使用されるべき色、以外の色が付されているセルの領域につき、該セルの領域に本来付されるべき色を前記着色規則に従って推定する色推定部、を備えており、前記情報識別部は、前記二次元コードの領域における各セルの領域のうち、前記色推定部により色が推定されたセルの領域に該推定された色が付されているものとして、各セルの領域に付された色または色の組合せに基づいて情報を識別する。
このような問題に対しては、一部のセルに対応する領域が欠けてしまったような場合であっても、これを補償して適切な情報の識別が実現できるようにしておくことが望ましい。
なお、この構成において、着色規則に従って推定されるセルの色として、複数の色が推定されるような場合には、そのうちのいずれかの色を、例えば、推定結果の確からしさなどといったパラメータに基づいて選択し、そうして選択した色が付されていると推定することとすればよい。また、複数の色が推定されるような場合、複数の色が付されているパターンそれぞれについて情報を識別し、そうして識別した情報の中から、いずれかの情報をユーザに選択させるようにしてもよい。
さらに、第7の構成の二次元コードリーダは、上記第1~第6の構成のいずれか1において、前記色判定部は、前記二次元コードの領域における各セルの領域に付されている色を、該二次元コードにおいて使用される複数の色それぞれを中心に拡がる色空間上の判定領域のいずれに含まれているかにより判定する。
この構成であれば、二次元コードにおける各セルの領域に付されている色を、色空間におけるいずれの判定領域に含まれているかにより判定することができる。
さらに、第8の構成の二次元コードリーダは、上記第7の構成において、前記色判定部は、複数の色それぞれに対応する前記判定領域のいずれにも含まれていないと判定したセルの領域が一定数以上存在する二次元コードの領域に対し、前記判定領域を一定領域だけ拡げたうえで、再度、各セルの領域に付されている色を判定する。
上記第7の構成においては、画像の生成条件によっては多くのセルの領域に付された色がいずれの判定領域にも含まれないことも考えられ、この場合、情報の識別そのものができなくなってしまう。
このような問題に対しては、多くのセルの領域に付された色がいずれの判定領域にも含まれない場合であっても、これを補償して適切な情報の識別が実現できるようにしておくことが望ましい。
この構成において、判定領域を拡げる際の拡張幅は、他の判定領域と干渉しない範囲を上限として拡げることとすればよく、判定領域のいずれにも含まれていないと判定したセルが一定数未満となるまで、判定領域を徐々に拡げて再度の判定を繰り返すこととしてもよい。
さらに、第9の構成の二次元コードリーダは、上記第7の構成において、前記色判定部は、複数の色それぞれに対応する前記判定領域のいずれにも含まれていないと判定したセルの領域が一定数以上存在する二次元コードの領域に対し、該二次元コードの領域における色の分布に応じて前記判定領域を色空間上で変移させたうえで、再度、各セルの領域に付されている色を判定する。
この構成であれば、画像の生成条件が悪く、適切に色の判定ができない場合であっても、判定領域を色の分布に応じた適切な位置まで変移させて再度色を判定することにより、色の判定確率を高めることができる。
なお、上記第8、第9の構成において、「判定領域のいずれにも含まれていないと判定したセルが一定数以上存在する」における「一定数」については、全てのセルに占める該当セルの割合であってもよいし、該当セルの絶対数であってもよい。また、二次元コードにおいて該当セルが特定パターンで配置されている数であってよい。
さらに、第10の構成の二次元コードリーダは、上記第5~第9の構成のいずれか1において、前記一致判定部は、特定の前記エッジ画像に対して、前記領域抽出部により抽出された候補領域それぞれが、別のエッジ画像における前記抽出済み候補領域と一致するか否かを、両方の候補領域における重複度合に応じて判定する。
この構成において、前記一致判定部は、特定の前記エッジ画像に対して、前記領域抽出部により抽出された候補領域それぞれが、別のエッジ画像における前記抽出済み候補領域と一致するか否かを、両方の候補領域における重複度合に応じて判定する。
この構成であれば、特定のエッジ画像から抽出された候補領域と、別のエッジ画像における抽出済み候補領域との重複度合に応じ、その重複度合が一定以上であることをもって、両候補領域が一致すると判定することができる。
さらに、第11の構成の二次元コードリーダは、上記第5~第10の構成のいずれか1において、前記一致判定部は、特定の前記エッジ画像に対して、前記領域抽出部により抽出された候補領域それぞれが、別のエッジ画像における前記抽出済み候補領域と一致するか否かを、両方の候補領域のうちの一方の候補領域が他方の候補領域に包摂されているか否かに応じて判定する。
この構成であれば、特定のエッジ画像から抽出された候補領域、および、別のエッジ画像における抽出済み候補領域のうち、一方の候補領域が他方の候補領域に包摂されていることをもって、両候補領域が一致すると判定することができる。
さらに、第12の構成の二次元コードリーダは、上記第5~第11の構成のいずれか1において、前記二次元コードの領域が多角形である場合において、
前記一致判定部は、特定の前記エッジ画像において前記領域抽出部により抽出された候補領域それぞれについて、該候補領域として形成された多角形における1以上の頂点が、前記抽出済み候補領域として形成された多角形におけるいずれかの頂点から一定範囲内に位置しているか否かに応じて、前記領域抽出部により抽出された候補領域それぞれが、別のエッジ画像における前記抽出済み候補領域と一致するか否かを判定する。
ここでいう「いずれかの頂点から一定範囲内」とは、特定のエッジ画像から抽出された候補領域と、別のエッジ画像における抽出済み候補領域とが一致する場合における両者の位置関係で決まる範囲内とすればよい。
さらに、第13の構成の二次元コードリーダは、上記第1~第12の構成のいずれか1において、前記領域抽出部は、前記二次元コードの領域の形成に係る規則を規定するテンプレートに基づいて、前記成分変換部により変換されたエッジ画像から、そのテンプレートにて定められた規則に従って形成されている領域の位置情報を候補領域の位置情報として抽出する。
このように構成すれば、テンプレートで規定される規則に従って候補領域を抽出することができるため、このテンプレートと共に規則を変更することにより、任意の規則に従って形成された領域を候補領域として検出できるようにすることができる。
なお、上述した二次元コードリーダは、単体の装置により構成してもよいし、複数の装置が協調して動作するシステムとして構成してもよい。
また、上記課題を解決するための第14の構成としては、上記第1から第13のいずれか1の構成における全ての構成部として機能させるための各種処理手順を、コンピュータシステムに実行させるためのプログラムとしてもよい。
このようなプログラムにより制御されるコンピュータシステムは、上記各構成に係る二次元コードリーダの一部を構成することができる。
なお、上述した各プログラムは、コンピュータシステムによる処理に適した命令の順番付けられた列からなるものであって、各種記録媒体や通信回線を介して二次元コードリーダや、これを利用するユーザに提供されるものである。
(1)二次元コードリーダ1の構成
まず、図1に基づき、二次元コードリーダ1の構成を説明する。図1は、二次元コードリーダ1の構成例を示すブロック図である。
二次元コードリーダ1は、図1に示すように、CPU(Central Processing Unit)60と、RAM(Random Access Memory)62と、ROM(Read Only Memory)64と、入出力インターフェース(I/F)66と、バス68とを含んで構成されるコンピュータシステムを備えている。CPU60、RAM62、ROM64およびI/F66は、バス68に接続されており、バス68を介してこれら接続デバイス間のデータの送受信を可能としている。
CPU60は、ROM64または記憶装置70に予め記憶された各種専用のコンピュータプログラムをRAM62に読み込み、RAM62に読み込まれたプログラムに記述された命令に従って、各種リソースを駆使して、後述する二次元コードを利用した物品検出処理(以下、コード利用物品検出処理と称す)を実行する。
具体的に、記憶装置70は、二次元コードを特徴づける情報を規定したテンプレート、カメラ76によって撮影して得られる画像データを記憶する。
さらに、記憶装置70は、各二次元コードにおいて独特のセル群それぞれの色または色の組み合わせと、各二次元コードに対してユニークな情報を含む情報との対応関係が登録されたデータテーブルを記憶する。
表示装置72は、CRTディスプレイ、液晶ディスプレイなどの周知の表示装置であり、CPU60からの指令に応じて、カメラ76で撮影された画像、該画像を加工した加工画像等の画像(動画を含む)の表示を行う。
カメラ76は、デジタルカメラ等の周知のカメラであり、所定の撮影領域を撮影して得られた画像を示す画像データを生成して順次I/F66を介してRAM62または記憶装置70に送信して、RAM62または記憶装置70に画像データを格納する。
なお、この二次元コードリーダ1は、例えば、携帯電話端末、携帯情報端末、周知のパーソナルコンピュータなどに実装されるものとして構成される。
なお、本実施形態において、上記各処理は、入力装置74を介したユーザーの操作入力(指示情報)をトリガとして行われる一連の処理となる。
次に、図2に基づき、二次元コードリーダ1により読み取る二次元コード100について説明する。図2は、二次元コード100の構成例を示す図である。
本実施形態における二次元コード100は、図2に示すように、黒色のセパレータ110上に複数のセルC11~Cpq(2≦p,2≦q)が一定間隔で配列され、所定の情報が各セルの色および色の組み合わせによりコード化されたものである。つまり、この二次元コードは、セルそれぞれ、または、組み合わせに係るセル群それぞれが、そこに付された複数の色(多色)、または、色の組み合わせパターンにより、数字や文字など複数種類の値(多値)を表現可能となっている。例えば、複数の二次元コードについて、それぞれ、色の組み合わせや、色の配列パターンを変えることによって、各二次元コードに固有のユニークな情報を付すことが可能である。
本実施形態においては、セルCに付けられうるマークの色として、黒(k)を除く1色以上の色が、黒(k)でマークが付けられたセルCとセットで配列されている。
そして、2行目以降のセルC11~Cpq(先頭のセルC11~Cp1を除く)は、行毎に、それぞれ1以上のセルCからなるセル群に分けられており、そのセル群で示すべき単位情報(1以上の文字)の対応づけられた色または色の組み合わせでマークが付けられる。こうして、各セルそれぞれ、または、1以上の組み合わせに係るセル群それぞれが、複数種類の文字のいずれかや多進数の数字で示されるいずれかの値からなる情報を持つことができるようになっている。
また、成分領域の大きさは、画像の撮影環境に応じて生じうる誤差の範囲を十分に包摂できる空間として規定したものであり、本実施形態では、特定座標における色を一般的な撮影環境下の色とし、この色から撮影環境に応じて生じうる誤差の範囲を含む領域を成分領域として規定している。
また、二次元コード100における特定セルに付けられたマークの色、および、セパレータ110の色には、セルCに付すマークの色に用いられていない成分領域における中心座標の色(本実施形態では黒系統の色)が用いられている。
以下に、CPU60がROM64または記憶装置70に記憶された専用のコンピュータプログラムに従って実行する各種処理の手順について順次説明する。
(3-1)コード利用物品検出処理
まず、二次元コードリーダ1が、カメラ76からの画像データを受信中において、入力装置74を介したユーザからの指示入力に応じて開始されるコード利用物品検出処理の処理手順を、図3に基づいて説明する。
コード利用物品検出処理が開始されると、まず、カメラ76で撮影された撮影画像データからのエッジ画像データの生成、エッジ画像データからの候補領域の抽出、候補領域が有効か否かの判定、原画像における有効な候補領域に対応する領域が特徴パターンを含むか否かの判定といった手順を経て、二次元コードの領域を検出する。
さらに、予め設定された検出モードに応じて、検出対象の物品に対応する二次元コードの特定、原画像の加工、および加工した画像の表示といった手順を経て、原画像中の検出物品の位置が明示された画像を表示する。具体的に、画像の加工は、原画像(複写画像でも可)に対して、原画像中における特定した二次元コードの画像部分の強調(例えば、マーキング、色の変更等)、検出モードに応じた物品に係る情報画像(例えば、文字画像)の追加等を行う処理となる。従って、原画像に対して、検出対象の物品の位置を明示する画像(または効果)および該物品に係るモードに応じた情報画像が加えられた画像が、表示装置72に表示されることになる。
コード利用物品検出処理は、CPU60によって、専用のコンピュータプログラムを実行することで起動される処理であって、プログラムが実行されると、図3に示すように、まず、ステップS100へと移行する。
ここで、物品検出モードが設定されている場合は、指示入力を行う前に、例えば、物品のシリアル番号、品名等の検出対象の物品の識別情報を設定する必要がある。この設定は、入力装置74を介して、ユーザが検出対象の商品を識別する情報を手入力してもよいし、物品リスト等を表示してユーザがその中から物品名等の識別情報を選択するようにしてもよい。
ステップS102に移行した場合(Yes)は、RAM62または記憶装置70から、指示入力のあったタイミングに表示していた画像データまたは該画像データに加えて複数フレーム分の画像データを取得して、ステップS104に移行する。
ここでいうテンプレートは、二次元コードからなる領域を規定する領域規則、二次元コードにおける特徴的なパターン、二次元コードにマークとして付けられる色(色数,色の種類)の着色規則などを示す情報である。
ただ、「領域規則」は、以降の処理に要する処理負担を軽減するためには、複数の項目を選択して規定したものとすることが望ましく、この場合、候補領域としての抽出数が少なくなる結果、処理負担の軽減に伴って処理時間の短縮が実現されることとなる。
例えば、図2に例示した二次元コード100であれば、上記特定セルC11~Cp1に付けられた色と、上記ヘッダー領域C11~C1qの各セルに付けられた複数の色との双方または一方により、二次元コードの領域を示す特徴的なパターンが形成されている。
ステップS106では、以降の処理で参照する変数X,Yを初期化(0→X,1→Y)して、ステップS108に移行する。
ステップS110では、ステップS108において生成されたエッジ画像データに基づいて、このエッジ画像から、二次元コードからなる候補領域それぞれの位置を特定して、ステップS112に移行する。ここでは、ステップS104にて読み出されたテンプレートにおける「領域規則」に基づいて、第Y番目のエッジ画像から、二次元コードからなる候補領域を規定する画像中の座標それぞれが特定される。
ステップS114に移行した場合は、ステップS110において特定された候補領域(座標情報)それぞれをリストに登録して、ステップS116に移行する。
ステップS120では、ステップS118において選択された候補領域が有効なものであるか否かを判定する有効領域判定処理を実行して、ステップS122に移行する。なお、この有効領域判定処理における具体的な処理手順については後述する。
ステップS124に移行した場合は、直前に行われた上記ステップS110において特定された候補領域(新規候補領域)が、過去に行われた上記ステップS110において特定された候補領域(抽出済み候補領域)と同じであるか否かを判定する。
本実施形態では、候補領域が多角形となるため、エッジ画像から抽出された候補領域それぞれが、別のエッジ画像における抽出済み候補領域と一致するか否かは、候補領域として形成された多角形における1以上の頂点Pnが抽出済み候補領域として形成された多角形におけるいずれかの頂点Poから一定範囲(例えば一定の半径r距離)内に位置しているか否かに応じて判定することとしてもよい(図4参照)。
そして、ステップS124において新規候補領域が過去に行われた上記ステップS110において特定されてRAM62または記憶装置70に格納されたいずれかの抽出済み候補領域と同じであると判定した場合(Yes)は、ステップS116に移行し、以降、別の候補領域について上記同様の処理を行う。
ステップS126に移行した場合は、この時点における新規候補領域を情報の識別に適したものとなるように補正して、ステップS128に移行する。
ここでは、新規候補領域における二次元コードの形状、角度が補正される。具体的には、例えば、処理対象の領域が斜めに配置されていた場合や、正方形になっていない歪んだ形状となっている場合に、そのようなズレを補正すべく回転や、座標軸に合わせた延長・短縮などが行われる。
さらに、このステップS126では、新規候補領域における二次元コードの色成分が、各セルにおける色の識別性を高めるべく補正される。
ステップS128では、上記ステップS102において取得された画像データで示される原画像のうち、上記ステップS126において補正された候補領域に対応する対応領域に、二次元コードとしての特徴的なパターンが含まれているか否かを判定する。
また、図2に例示した二次元コード100は、ヘッダー領域および特定セルの領域といったように、データ領域とは別に特別に設けられた領域を有しており、この領域が「特徴的なパターン」として抽出され判定が行われる構成となっているが、この構成に限らない。
この場合も、二次元コード100と同様に、データ領域における、複数種類のセルの配置パターンやマークのパターンなどが「特徴的なパターン」となり、このパターンとテンプレートにおける特徴的なパターンとを比較して、「特徴的なパターン」が含まれているか否かを判定することになる。但し、データ領域の各セルは、情報をコード化する役割も果たしており、二次元コード100のように専用のセルとはならない。
そして、ステップS128において、二次元コードとしての特徴的なパターンが含まれていないと判定した場合(No)は、ステップS116に移行し、以降、別のコード領域について上記同様の処理を行う。
ステップS130に移行した場合は、この時点における新規候補領域を二次元コードの領域として検出して、ステップS132に移行する。
この検出処理は、新規候補領域の座標情報に基づき、原画像から新規候補領域を切り出して(複製画像を生成して)、記憶装置70に記憶する処理となる。
この色判定処理は、上記ステップS130において検出された二次元コードの領域を引数として実行され、この二次元コードにおけるセルそれぞれに付された色が戻り値となる。なお、この色判定処理における具体的な処理手順については後述する。
ステップS136では、ステップS134において識別された情報を、RAM62または記憶装置70に格納して、ステップS138に移行する。
ステップS138では、変数Xをインクリメント(X+1→X)して、ステップS140に移行する。
ステップS140では、この時点で変数Xが所定数以上になっているか否かを判定する。つまり、所定数以上の候補領域が二次元コードの体をなしていたか否かを判定する。
そして、ステップS140において、変数Xが所定数以上になっていると判定した場合(Yes)は、ステップS140に移行し、変数Xが所定数以上になっていないと判定した場合(No)は、ステップS142に移行する。
その後、全ての候補領域について上記ステップS116~S140が行われたら、上記ステップS116において未処理の候補領域がないと判定されて、ステップS142に移行し、この時点での変数Yの値が、変数nの値より小さい値(Y<n)となっているか否かを判定する。
ステップS144に移行した場合は、変数Yをインクリメント(Y+1→Y)して、ステップS108に移行し、上記ステップS108~S144の処理を行う。
これ以降は、次のエッジ画像に基づいて上記ステップS110~S144の処理が行われ、その処理の中で変数Xが所定数以上になれば、上記ステップS140で「Yes」と判定されて、ステップS146に移行する。一方、その処理の中で変数Xが所定数以上にならなければ、その次のエッジ画像についての処理が繰り返し行われることとなる。
ステップS146に移行した場合は、識別された二次元コードの情報に基づき、原画像中における指定物品を検出する物品検出処理を実行して、一連の処理を終了する。なお、この物品検出処理における具体的な処理手順については後述する。
続いて、図3のステップS108であるエッジ画像生成処理の処理手順の一例を図5に基づき説明する。図5(a)は、変数Yの値と画像種類およびしきい値との対応関係の一例を示す図であり、(b)は、エッジ画像生成処理の処理手順の一例を示すフローチャートである。
本実施形態において、エッジ画像は、異なる複数種類の変換条件に基づいて行う。
具体的に、第1~第i(1≦i)の変換条件に対応する第1~第i番目のエッジ画像までが、それぞれ異なるしきい値で原画像をグレースケール化してなるグレースケール画像を二値化した画像の輪郭部を線形化した画像となる。
特に、各色成分画像について、予め設定されたしきい値としてk種類(1≦k)のしきい値を用いて二値化を行う場合は、第(i+1)~第(i+j×k)の変換条件に対応する第(i+1)~第(i+j×k)番目のエッジ画像までが、j種類の色成分それぞれを原画像から抽出した色成分画像をグレースケール化し、該グレースケール画像をk種類のしきい値それぞれで二値化した二値化画像の輪郭部を線形化した画像となる。
ここでいう「i」および「k」は、予め用意されたしきい値の種類によって値が決定し、「j」は、原画像に用いられている色空間(表色系)の種類によって規定される色成分数によって値が決定する。例えば、しきい値の種類がそれぞれ3種類で、色空間がRGB色空間であれば、「i」および「k」の値は3、「j」の値は3となる。
そして、ステップS200において、変数Yの値が3以下となっていると判定した場合(Yes)は、ステップS202に移行し、変数Yの値が3よりも大きいと判定した場合(No)は、ステップS208に移行する。
ここでは、原画像のデータが、RGBの各色8ビット(0~255)のカラー画像データであるとして、この画像データからグレースケール画像を生成する。
また、グレースケール画像の生成方法としては、例えば、中間値法、平均法等の周知の生成方法がある。
平均法は、平均の取り方によって、算術平均(相和平均)法、幾何平均(相乗平均)法、加重平均法等がある。
算術平均法は、R、G、Bの3つの色成分の値を算術平均(足して3で割る)して平均値を算出し、算出した平均値を利用してグレースケール化する方法である。
幾何平均法は、R、G、Bの3つの色成分の値を幾何平均(各色成分の値の対数値を算術平均)して平均値を算出し、算出した平均値を利用してグレースケール化する方法である。
そして、上記いずれかの方法を用いた場合は、算出された1つの輝度値を、R、G、Bの3つの色成分の値(R=G=B)とする。
なお、ここでは、グレースケール画像を、R,G,Bの各要素の値を輝度値に変換することで生成する例を説明したが、輝度以外に、明度等によってグレースケール画像を生成するようにしてもよい。
ステップS204では、ステップS202で生成したグレースケール画像データを、現時点の変数Yの値に対応したしきい値により二値化してなる二値化画像データを生成して、ステップS206に移行する。
ここでは、図5(a)に示すように、変数Yの値1、2、3に対して、120、150、200の3種類のしきい値がそれぞれ用意されている。この二値化のしきい値は、二次元コードの「領域規則」および「特徴的なパターン」に応じ、以降の処理において有効な候補領域を抽出し、適切に二次元コードを識別するのに適した値として定められたものである。
例えば、しきい値120のときに、グレースケール画像におけるあるピクセル値が(80,80,80)である場合は、二値化後の値は、黒色に対応する(0,0,0)となる。一方、しきい値120のときに、グレースケール画像におけるあるピクセル値が(160,160,160)である場合は、二値化後の値は、白色に対応する(255,255,255)となる。
ステップS206では、二値化画像データに対して、二値化画像中の輪郭部を線形化してなるエッジ画像データを生成して、一連の処理を終了し、元の処理に復帰する。
本実施形態では、公知のブレゼンハムの線分描画アルゴリズムによって、二値化画像中に存在する物体の輪郭部を線形化する。なお、本実施形態では、線形化後の輪郭線を形成していない不要なピクセルは除去(例えば、ピクセル値を(0,0,0)に変換)する。
このようにして、二値化画像中の輪郭部を線形化した画像のデータが、エッジ画像データとなる。
一方、ステップS200において変数Yの値が3よりも大きくてステップS208に移行した場合は、原画像のデータから、変数Yの値に対応した色成分を抽出して、ステップS210に移行する。
例えば、変数Yの値が4であり、原画像データのあるピクセル値が(120,80,45)である場合は、赤色成分値(120,0,0)を抽出する。同様に、変数Yの値が5であれば、緑色成分値(0,80,0)を抽出し、変数Yの値が6であれば、青色成分値(0,0,45)を抽出する。
このようにして、各色成分の値を抽出してなる画像データが、赤色成分画像データ、緑色成分画像データ、青色成分画像データとなる。
グレースケール画像データの生成は、上記ステップS202と同様の処理となる。
ステップS212では、ステップS210で生成したグレースケール画像に対して、予め設定されたしきい値で二値化を行い、二値化画像データを生成して、ステップS206に移行する。
ここでは、図5(a)に示すように、変数Yの値4、5、6に対して、共通のしきい値120が用意されている。
そして、ステップS212で二値化画像データを生成後は、ステップS206に移行して、二値化画像中の物体の輪郭部を線形化してなるエッジ画像データを生成し、一連の処理を終了して、元の処理に復帰する。
また、図5(a)に示す例では、原画像に対応するグレースケール画像に対してしきい値を小さい値から順に用いて二値化を行い、その二値化画像からエッジ画像を生成する処理を行う構成とした。さらに、原画像に対応するグレースケール画像を用いたエッジ画像の生成処理の後に、色成分画像に対応するグレースケール画像を二値化してエッジ画像を生成する処理を、赤、緑、青の色成分画像の順で行う構成としたが、この構成に限らない。
また、例えば、色成分画像を用いたエッジ画像の生成処理を原画像を用いた生成処理よりも先に行う構成、原画像と色成分画像とを用いたエッジ画像の生成処理を交互に行う構成、ランダムに行う構成など、別の順番で行う構成としてもよい。
また、図5(a)に示す例では、原画像および色成分画像の双方を用いてエッジ画像の生成を行うことが可能な構成としたが、この構成に限らず、原画像だけを用いてエッジ画像を生成する構成や、色成分画像だけを用いてエッジ画像を生成する構成など他の構成としてもよい。
続いて、図3のステップS120である有効領域判定処理の処理手順を図6および図7に基づき説明する。
ここで、図6は、有効領域判定処理の処理手順を示すフローチャートである。また、図7(a)は、理想的な候補領域の形状例を示す図であり、(b)~(e)は、誤差範囲外の形状例を示す図であり、(f)~(g)は、誤差範囲内の形状例を示す図である。
候補領域の縦横比は、図7(a)に示すように、理想の領域形状における短辺の長さAと長辺の長さBとの比(A:B=A/B)となっていることが望ましい。また、候補領域の各辺間(四隅)の角度は、図7(a)に示すように、理想的には、いずれも90°であることが望ましい。
有効領域判定処理が開始されると、図6に示すように、まず、ステップS300に移行し、選択された候補領域の縦横比が、テンプレートの領域規則に定められた縦横比の誤差範囲内か否かを判定する。
ステップS302に移行した場合は、誤差範囲外と判定された候補領域を無効な候補領域であると判定して(判定結果を戻り値として)、一連の処理を終了し、元の処理に復帰する。
一方、縦横比が誤差範囲内であると判定されステップS304に移行した場合は、候補領域の各辺間で形成される角度が、テンプレートの領域規則に定められた角度の誤差範囲内か否かを判定する。
ステップS306に移行した場合は、誤差範囲外と判定された候補領域を無効な候補領域であると判定して(判定結果を戻り値として)、一連の処理を終了し、元の処理に復帰する。
一方、角度が誤差範囲内であると判定されステップS308に移行した場合は、誤差範囲内と判定された候補領域を有効な候補領域であると判定して(判定結果を戻り値として)、一連の処理を終了し、元の処理に復帰する。
同様に、例えば、図7(g)に示す候補領域のように、縦横比の誤差drが「-dx~+dx」の範囲内であるが、角度β1~β4がいずれも90°とならずに斜めに歪んでいても、角度β1~β4の誤差dβ1~dβ4のいずれもが「-dy~+dy」の誤差範囲内となる場合には、この候補領域は除外されることなく、有効な候補領域と判定される。
つまり、本実施形態では、縦横比および角度の双方が誤差範囲内に納まっている候補領域のみを有効な候補領域と判定する。
続いて、図3のステップS132である色判定処理の処理手順を図8に基づき説明する。
ここで、図8は、色判定処理の処理手順の一例を示すフローチャートである。
色判定処理が開始さると、図8に示すように、まず、ステップS400に移行して、図3のステップS130で検出された二次元コードの領域におけるセパレータ110の領域を特定(座標を特定)して、ステップS402に移行する。
ステップS402では、セパレータ110の座標情報に基づき、各セルの存在する領域を分割して、ステップS404に移行する。
ステップS404では、以降の処理で参照する変数を初期化(0→ap,0→x,0→y)して、ステップS406に移行する。
ステップS408では、変数apの値が予め定められた一定数以上か否かを判定し、一定数以上ではないと判定した場合(No)は、ステップS410に移行し、一定数以上であると判定した場合(Yes)は、ステップS422に移行する。
そして、ステップS410において、選択したピクセルがいずれかの判定領域内に含まれていると判定した場合(Yes)は、ステップS412に移行し、選択したピクセルがいずれの判定領域にも含まれていないと判定した場合(No)は、ステップS414に移行する。
ここでは、変数apをインクリメントすることで、判定領域に含まれていると判定されたピクセルの数を計数している。この判定結果(判定領域の情報および計数結果を含む)は、各セルに対応付けてRAM62または記憶装置70に記憶される。
一方、選択したピクセルがいずれの判定領域にも含まれていないと判定された場合も、ステップS414に移行して、変数xの値が、xEであるか否かを判定する。
そして、変数xの値がxEではないと判定した場合(No)は、ステップS416に移行し、変数xの値がxEであると判定した場合(Yes)は、ステップS422に移行する。
つまり、変数xの値がxEではない場合に、変数xをインクリメントすることで、1つ右隣のピクセルに座標を変更する。
ステップS418では、現時点の座標(x,y)が次のセルに対応するセパレータ部分の開始座標であるか否かを判定する。そして、次のセパレータの開始座標であると判定した場合(Yes)は、ステップS420に移行し、そうでない場合(No)は、ステップS406に移行する。
つまり、色判定領域に含まれる色のピクセルが一定数以上とならないまま、x座標が、次のセルに対応するセパレータの開始x座標に到達した場合に、変数apを初期化する。
一方、ステップS414において変数xの値がxEであると判定されてステップS422に移行した場合は、変数yの値が列方向の一番下端のy座標であるyEであるか否かを判定する。
ステップS424に移行した場合は、変数apおよび変数xを初期化(0→ap,0→x)し、変数yをインクリメント(y+1→y)して、ステップS406に移行する。
つまり、変数xを初期化し、変数yをインクリメントすることで、1つ下隣の行で且つ一番左端のピクセルに座標を変更する。このとき、座標(x,y)が次のセルに対応した領域の座標となるので、変数apも初期化する。
そして、変数xの値がxEではないと判定した場合(No)は、ステップS428に移行し、変数xの値がxEであると判定した場合(Yes)は、ステップS432に移行する。
ステップS428に移行した場合は、変数xをインクリメント(x+1→x)して、ステップS430に移行する。
ステップS432に移行した場合は、変数apを初期化(0→ap)して、ステップS406に移行する。
つまり、変数apが一定数以上のときに、上記ステップS426~S430の処理を繰り返し行うことで、各セルCに対応する領域においてその行の残りのピクセルに対して上記ステップS410の色判定処理を省略している。
具体的に、例えば、一定数を10としたときに、あるセルの領域におけるいずれかの行においてイエローを中心座標とした判定領域に含まれると判定されたピクセルが10ピクセル(ap=10)になったときに、ステップS408において、変数apの値が一定数以上であると判定され、該当セルCの同じ行の残りのピクセルに対しては上記ステップS410の色判定処理が省略される。
そして、ステップS434において、変数yの値がyEではないと判定した場合(No)は、ステップS436に移行し、変数yの値がyEであると判定した場合(Yes)は、ステップS438に移行する。
一方、二次元コードの領域における全てのピクセルについて色判定が終了して、ステップS438に移行した場合は、RAM62または記憶装置70に記憶された各セルCの領域の各行のピクセルの色の判定結果に基づき、各セルCの色を判定して、ステップS440に移行する。
ここでは、この時点でセルCと色とが対応づけて登録されたデータテーブルの中に、判定領域外の色である旨が対応づけられたセルCが一定数(例えば全体の3割)以上存在していることをもって、着色規則に従っていない色の付されたセルCが所定割合以上存在していると判定される。
ステップS442に移行した場合は、判定領域を変更して再度の色判定が可能な状態であるか否かを判定する。
ここでは、ステップS410における色判定で参照された判定領域が、あらかじめ定められた上限まで変更されている場合に、再度の色判定が可能な状態ではないと判定される。
ステップS444に移行した場合は、上記ステップS410における色判定で参照された判定領域を変更して、ステップS404に移行する。ここでは、各判定領域を色空間上で一定領域だけ拡げる、または、各判定領域を色空間上で一定距離だけ変移させることにより判定領域それぞれが変更される。
以降、再度色が判定されたセルCそれぞれの中に、着色規則に従っていない色の付されたセルCが一定数以上存在していないと判定されるまで(ステップS440の「No」の分岐)、判定領域の変更および再度の色判定が繰り返される(ステップS404~S444)。
このエラー処理では、いずれのセルCの色についても判定できなかったものとし、データテーブルに登録されていた全ての対応関係を消去され、こうして空のデータテーブルが戻り値として元の処理へと復帰する。この場合、図3のコード利用物品検出処理では、ステップS134,S136で何らの処理も行われることなく、S138以降の処理が行われる。
ステップS448に移行した場合は、着色規則に従っていない色の付されたセルCが存在しているか否かを判定する。
このステップS448において、該当セルCが存在していると判定した場合(Yes)は、ステップS450に移行し、該当セルCが存在していないと判定した場合(No)は、一連の処理を終了し、元の処理に復帰する。
ここでは、この時点でデータテーブルに登録されているセルCのうち、着色規則に従っていない色の付されたセルCが特定され、このセルCが二次元コードの中から特定される。
ステップS452では、上記ステップS448において特定されたセルCそれぞれについて、着色規則に従って本来付されるべき色を推定して、ステップS454に移行する。
ステップS454では、上記ステップS448において特定されたセルCそれぞれについて、該セルCの色が、上記ステップS452において推定された色であると判定し、一連の処理を終了し、元の処理に復帰する。
この場合と、ステップS448において該当のセルCが特定されなかった場合は、この時点でセルCと色との対応関係が登録されたデータテーブルを戻り値として図3のコード利用物品検出処理へと戻る。この場合、コード利用物品検出処理では、データテーブルに基づいて各セルCに付された色を認識したうえで、ステップS134による情報の識別を行うこととなる。
また、データ領域しか有さない二次元コードの構成であれば、ステップS128の処理を行う前に、上記ステップS400~S438の色判定処理、または、上記ステップS400~S454の色判定処理を先に行い、その判定結果に基づき、特徴的なパターンを含むか否かを判定する処理を行う構成とすることも可能である。例えば、上記図1のステップS126の処理の次に、色判定処理(S132)を行う構成とし、ステップS128では、先に行われた色判定処理の結果に基づき、特徴的なパターンを含むか否かの判定を行う。この場合は、以降の色判定処理を不要とすることができる。
続いて、図3のステップS146である物品検出処理の処理手順を図9~図12に基づき具体例を示しながら説明する。
ここで、図9は、物品検出処理の処理手順の一例を示すフローチャートである。また、図10は、データベースに登録された識別情報および物品情報の一例を示す図である。また、図11(a)は、物品検出モードの検出対象画像例を示す図であり、(b)は、検出結果の表示例を示す図である。また、図12(a)は、期限管理モードの検出対象画像例を示す図であり、(b)は、検出結果の表示例を示す図であり、(c)は、カメラ76の配設位置の一例を示す図である。
そして、設定されている検出モードが物品検出モードであると判定した場合(Yes)は、検出対象として指定された物品(以下、指定物品と称す)の情報を取得して、ステップS502に移行し、物品検出モードではないと判定した場合(No)は、ステップS520に移行する。
ここで、物品情報としては、例えば、図10に示すように、上記図3のステップS134で識別された識別情報に対応付けて、品名コード、品種、個数、保管開始時期、出荷期限、消費期限が登録されている。
また、保管開始時期は、例えば、倉庫で管理される物品であれば、入庫日の情報が登録される。また、店内の商品棚に陳列される食品等の物品であれば、陳列日の情報あるいは物品の製造日の情報が登録される。また、食品や薬品等の、経過日数に応じて状態が劣化していくような物品の場合は、消費期限(賞味期限)の情報が登録される。また、倉庫に保管する物品について、出荷(保管)期限がある場合は、出荷(保管)期限の情報が登録される。
そして、ステップS502において、指定物品があると判定した場合(Yes)は、ステップS504に移行し、指定物品がないと判定した場合(No)は、ステップS518に移行する。
ステップS506では、RAM62または記憶装置70から、原画像の画像データと、指定物品の識別情報に対応する二次元コードの原画像における座標情報とを取得して、ステップS508に移行する。
ここで、上記「強調表示するための加工処理」は、例えば、原画像中の、二次元コードの画像領域の周囲を赤色等の目立つ色の線で囲んだり、二次元コードの画像領域を目立つ色で塗りつぶしたり、二次元コードの画像領域の輪郭部を強調(輪郭線を太くする、輪郭線を赤色等の目立つ色に変更する、これら双方など)したりする処理となる。他にも、点滅表示やアニメーション表示されるように加工処理を施してもよい。
ステップS510では、指定物品に対応する二次元コードが複数あるか否かを判定し、複数あると判定した場合(Yes)は、ステップS512に移行し、そうでない場合(No)は、ステップS514に移行する。
ステップS514では、原画像に、指定物品の保管開始時期、出荷期限、消費期限等の画像情報を追加する加工処理を行って、ステップS516に移行する。
また、指定物品に対応する二次元コードが複数ある場合は、各番号に対応付けて物品に係る情報を表示する。
なお、ステップS514の物品200に係る情報の表示処理は、行わないようにする、または行わない設定にできるようにしてもよく、行わない場合は、ステップS512の処理からステップS516の処理へと移行する。
ここで、図11(b)の画像例は、図11(a)の原画像から、3つの指定物品が検出された場合の例であり、各物品に対応する二次元コードを、四角い枠で囲むマーキングが施されている。これにより、ユーザは、指定物品が原画像中のいずれの物品200なのかを視覚的に瞬時に把握することができる。
つまり、撮影した画像中に指定物品が含まれていない場合に、強調表示加工や追加表示加工などの施されていない原画像を表示する。これにより、ユーザは指定物品が無いことを視覚的に瞬時に把握することができる。なお、指定物品が無い旨を示すメッセージ等の画像を原画像中に表示するようにしてもよい。
そして、設定された検出モードが期限管理モードであると判定した場合(Yes)は、ステップS522に移行し、期限管理モードではないと判定した場合(No)は、ステップS532に移行する。
ステップS524では、コンピュータシステムの有する不図示のRTC(Real Time Clock)から取得した現在(現時点)の年月日時刻の情報と、取得した出荷期限および消費期限とを比較して、期限を経過した物品があるか否かを判定する。
ここで、ステップS524において、期限が経過した物品ではなくて、例えば、期限までの日数が所定日数以下となった物品を検出するようにしてもよい。つまり、ステップS524において、取得した出荷期限および消費期限から所定期間を減じた期限と、現時点の年月日時刻の情報とを比較して判定を行ってもよい。
ここで、原画像のデータとして、例えば、図12(a)に示す、商品陳列棚に複数の物品300が載置され、各物品300の正面側に、二次元コード100が付された被写体の撮影画像を示す画像データが取得されたとする。なお、図12の例では、図12(b)に示すように、二次元コードリーダ1が、携帯型の情報端末で構成されており、この情報端末の裏面側上部には、図12(c)に示すように、カメラ76のレンズ部分が配設されている。これにより、ユーザは、図12(b)に示されている表示画面を見ながら、裏面画のカメラ76で、商品陳列棚を撮影することができる。そして、原画像のデータは、図12(b)に示すように、撮影範囲PRの撮影画像のデータとなる。つまり、ここではユーザが二次元コードリーダ1を携帯し、商品陳列棚の商品を撮影しながら経過物品の検出結果を確認できる実施態様を例示している。
ここでの加工処理は、上記ステップS508の処理と同様の処理となる。
この場合は、ステップS516において、ステップS528で加工された画像を、表示装置72に表示する処理を行って、上記一連の物品検出処理を終了し、元の処理に復帰する。
一方、ステップS524において、経過物品がないと判定してステップS530に移行した場合は、RAM62または記憶装置70から、原画像の画像データを取得し、取得した画像データに基づき、表示装置72に原画像を表示する。そして、一連の処理を終了して、元の処理に復帰する。
また、ステップS520において、期限管理モードではないと判定してステップS532に移行した場合は、モードの設定を促すメッセージを表示装置72に表示する処理を行って、上記一連の処理を終了し、元の処理に復帰する。
この処理は、物品検出モードおよび期限管理モードのいずれか一方が必ず設定されるように構成されている場合には不要の処理となる。
続いて、図3のコード利用物品検出処理を実行する前等に行われる、検出対象の物品を指定する検出モード設定処理の処理手順を図13に基づき説明する。
ここで、図13は、検出モード設定処理の処理手順の一例を示すフローチャートである。
検出モード設定処理は、上記図3のコード利用物品検出処理とは独立して行われる処理であって、入力装置74を介したユーザの指示入力に応じて起動し、図13に示すように、まず、ステップS600に移行する。
ここでは、入力装置74によって、簡易に検出モードが選択できるように、物品検出モードを選択するボタンのグラフィックスと、期限管理モードを選択するボタンのグラフィックスとを表示装置72の表示画面に表示する。
そして、例えば、画面に表示されたボタンを、入力装置74がタッチパネルであれば指でタッチすることで選択かつ押下し、入力装置がマウスであればマウスカーソルによって選択してクリックすることにより押下することで、いずれかのモードを選択できるようにしている。つまり、GUI(Graphical User Interface)によって、簡易に検出モードの選択および設定を行うことが可能となっている。
ステップS604に移行した場合は、検出モードとして物品検出モードを設定して、ステップS606に移行する。
ステップS606では、指定物品の入力を促す画面を表示装置72の表示画面に表示して、ステップS608に移行する。
例えば、指定物品として指定可能な物品のリストを表示して、その中から選択できるようにする。また、品名、品名コード、シリアル番号等で指定可能な物品を検索できるようにしてもよい。
なお、指定する物品が見つからなかった場合等において、設定モードを終了した場合は、判定処理から抜けて、一連の処理を終了する。
ステップS610では、ステップS608で入力された検出対象の指定物品を設定して、処理を終了する。
これにより、検出モードとして物品検出モードが設定され、さらに、指定物品が設定される。具体的に、これらの情報がRAM62の所定アドレスに格納される。
ステップS614に移行した場合は、検出モードとして期限管理モードを設定して、一連の処理を終了する。
これにより、検出モードとして期限管理モードが設定される。物品検出モードと同様に、この情報はRAM62の所定アドレスに格納される。
上記実施形態における二次元コードリーダ1であれば、取得された画像(原画像)から、グレースケール画像の生成(図5(b)のS202,S210)、二値化画像の生成(同図S204,S212)、二値化画像中の物体の輪郭部の線形化(同図S206)を経てエッジ画像を生成することができる(図3のS108)。
さらに、生成したエッジ画像に基づき、このエッジ画像中における候補領域の抽出(同図S110)、この抽出した候補領域に対応する原画像中の対応領域それぞれに特徴的なパターンが含まれているか否かの判定(同図S128)を経て、原画像中から二次元コードの領域を検出することができる(同図S130)。
このように、二値化画像中の物体の輪郭部が線形化されたエッジ画像から、候補領域を抽出することができるので、線形化しない場合と比較して高速に候補領域を抽出することができる。
また、上記実施形態では、原画像に基づいて生成される複数種類のエッジ画像それぞれについて、候補領域の抽出、この抽出した候補領域に特徴的なパターンが含まれているか否かの判定、および、二次元コードの領域の検出を繰り返し実施している(図3のS108~S144)。
また、この繰り返しの過程では、特定のエッジ画像について新たに抽出された候補領域が、先に参照されたエッジ画像について抽出された抽出済み候補領域と、原画像の領域において一致している場合も想定される。ところが、上記構成では、このような抽出済み領域について、抽出した候補領域に特徴的なパターンが含まれているか否かの判定、および、二次元コードの領域の検出を実施しない(同図S124の「Yes」の分岐)。
また、この繰り返しの過程では、理想的な領域形状に対して、各候補領域の縦横比および四隅の角度等の形状情報が、あらかじめ設定された誤差範囲内となるか否かを判定することによって(図6のS300~S308)、抽出した候補領域が有効な候補領域であるか否かを判定することができる(図3のS122)。
また、上記実施形態では、原画像からエッジ画像を生成し、このエッジ画像から、二次元コードの領域の候補となる候補領域を抽出したうえで(図3のS110)、原画像における、この抽出した候補領域に対応する領域から二次元コードの領域を検出して情報の識別を行っている(同図S116~S134)。そのため、候補領域を抽出することなく二次元コードの領域を検出しようとする場合と比べて、抽出した候補領域という限定的な範囲から二次元コードの領域の検出を行うことができる。これにより、二次元コードの領域から情報の識別を行うまでに要する処理負荷および処理時間を抑えることができる。
また、上記実施形態においては、特定のエッジ画像から抽出された候補領域と、別のエッジ画像における抽出済み候補領域との重複度合に応じ、その重複度合が一定以上であることをもって、両候補領域が一致すると判定することができる。
また、上記実施形態においては、特定のエッジ画像から抽出された候補領域における1以上の頂点が、抽出済み候補領域におけるいずれかの頂点から一定範囲内に位置していることをもって、両候補領域が一致すると判定することもできる。
また、上記実施形態においては、二次元コードの各セルCに付された色に基づいて、二次元コードで示される情報を識別することができる(図3のS132~S134)。
また、この構成においては、各ピクセルの色判定を行う際に、二次元コードの領域を、ラスタスキャンによって順番に走査して色判定処理を行い(図8のS410)、各セルCの領域における各行に位置するピクセルについて、一定数以上が判定領域に含まれると判定された場合(図8のS408の「Yes」の分岐)に、該当セルCの領域におけるその行の残りのピクセルに対して色判定処理を省略することができる。
また、この構成においては、各セルCの色を判定するに際し、多くのセルCに付された色がいずれの判定領域にも含まれず、情報の識別そのものができなくなるような場合であっても、そのようなことを防止できるように構成されている。
この構成であれば、画像の生成条件が悪く、適切に色の判定ができない場合であっても、判定領域を拡げることで判定の感度を上げて再度色を判定する、または、判定領域を色の分布に応じた適切な位置まで変移させて再度色を判定することにより、色の判定確率を高めることができる。
さらに、指定物品が存在する場合に、原画像における指定物品に対応する二次元コードの領域が強調表示されるように原画像を加工し(図9のS508)、加工した画像を表示することができる(図9のS516)。
また、この構成においては、指定物品が複数あるときに、各指定物品の管理開始時期情報に基づき、管理開始時期が古い順に、順番を示す番号の画像を、指定物品に対応する二次元コードの領域上、または、その近傍に表示されるように原画像に追加する加工を行うことができるように構成されている(図9のS512)。
また、この構成においては、原画像に対して、強調表示加工に加えて、指定物品に係る表示情報を追加する加工を行うことができるように構成されている(図9のS514)。
また、この構成においては、期限管理モードを設定した場合に、出荷期限、消費期限等の期限が経過した物品、または、期限までの期間が所定期間以下の物品を指定物品とすることができる。そして、各セルCの色の判定結果に基づいて識別された情報に対応する物品のなかから、期限を経過した物品、または、期限までの期間が所定期間以下の物品が存在するか否かを判定することができる(図9のS524)。
これによって、原画像中の指定物品に対応する二次元コードの領域が強調表示された画像を表示することができるので、ユーザは、表示された画像を見ることで、原画像中における指定物品の位置を簡易かつ瞬時に把握することができる。
以上、本発明の実施形態について説明したが、本発明は、上記実施形態に何ら限定されることはなく、本発明の技術的範囲に属する限り種々の形態をとり得ることはいうまでもない。
例えば、上記実施形態においては、二次元コードリーダ1が単体の装置により構成されている場合を例示したが、この二次元コードリーダ1は、複数の装置が協調して動作するシステムとして構成してもよい。
また、上記実施形態においては、二次元コードの領域としては、上述したような二次元コードに限らず、特定の画像(例えば、ロゴなど)を示す領域としてもよい。
また、候補として選出した色それぞれについて情報の識別までも行うようにし、そうして識別した情報の中からいずれかをユーザに選択させることとしてもよい。この場合、図8のS452では何らの処理も行わず、S454にて候補の色それぞれを、該当するセルCに付された色と判定する。そして、図3のS134では、セルCに付された色として判定された色が複数存在していれば、各色について、または、各色の組合せに基づいて情報を識別し、そうして識別した情報の中から、いずれかをユーザに選択させる、といった構成を考えることができる。
また、上記実施形態においては、管理開始期限の古い順に番号画像を二次元コードの領域上、または、その近傍に表示する構成としたが、この構成に限らず、消費期限が早い順など、他の条件に基づく順番の番号画像を表示する構成としてもよい。
例えば、検出対象の物品が設定(検出モードが設定)された状態であれば、トリガがなくてもコード利用物品検出処理を繰り返し実行して、常に、撮影画像に対して検出処理を実行し、検出結果の画像を表示する構成とするなど、他の構成としてもよい。
以上説明した実施形態において、図3のS102が本発明における画像取得部であり、同図S108(図5のS200~S212)が本発明における成分変換部であり、同図S110が本発明における領域抽出部であり、同図S128が本発明におけるパターン判定部である。
また、図3のS130が本発明における領域検出部であり、同図S108~S144(特にS108,S142,S144)が本発明における繰り返し実施部であり、同図S124が本発明における一致判定部であり、同図S134が本発明における情報識別部である。
また、図9のS502,S524が本発明における物品有無判定部であり、図9のS508,S512,S514が本発明における画像加工部であり、図9のS506が本発明における画像表示部である。
また、検出モードが本発明における指定情報であり、図13のS600~S614が本発明における指定情報設定部である。
Claims (14)
- 複数のセルが配列され、前記複数のセルに色の異なる複数種類のセルが含まれるように各セルに色を付すことで該色または色の組合せに応じた1以上の情報それぞれをコード化した構成の複数の二次元コードの領域を含む領域が撮影されてなる画像を取得する画像取得部と、
該画像取得部により取得された画像を、該画像に含まれるエッジ成分の分布を示すエッジ画像に変換する成分変換部と、
該成分変換部により変換されたエッジ画像から、あらかじめ定められた規則に従って形成されている領域を前記二次元コードの領域からなる候補領域として抽出する領域抽出部と、
前記画像取得部により取得された画像における、前記領域抽出部により抽出された候補領域に対応する対応領域それぞれについて、該対応領域を形成する要素に、前記二次元コードの領域を規定する特徴的なパターンが含まれているか否かを判定するパターン判定部と、
該パターン判定部により特徴的なパターンが含まれていると判定された対応領域を、前記二次元コードの領域として検出することにより、前記画像に含まれる複数の二次元コードの領域を検出可能な領域検出部と、
前記領域検出部により検出された二次元コードの領域それぞれについて、該二次元コードの領域における各セルの領域に付されている色を判定する色判定部と、
前記二次元コードの領域における各セルの領域に、該セルの領域について前記色判定部が判定した色が付されているものとして、各セルの領域に付された色または色の組合せに基づいて前記コード化された情報を識別する情報識別部と、を備え、
前記色判定部は、前記二次元コードの領域における各セルの領域についてピクセル毎に順次色を判定し、所定数の有効な色の判定結果を得たときに、色の判定処理が未処理の残りのピクセルについて色の判定処理を省略し、前記所定数の有効な色の判定結果に基づき各セルの領域に付された色を判定することを特徴とする二次元コードリーダ。 - 前記複数のセルは、あらかじめ定められた色が付されたセパレータによって分けられており、
前記あらかじめ定められた色に基づき前記二次元コードの領域における各ピクセルの色の判定処理を行うことで、前記二次元コードの領域における前記セパレータの領域の位置を特定するセパレータ領域特定部と、
前記セパレータ領域特定部で特定されたセパレータの領域の位置に基づき、前記二次元コードの領域における各セルの領域の位置を特定するセル領域特定部と、を備えることを特徴とする請求項1に記載の二次元コードリーダ。 - 前記色判定部は、前記二次元コードの領域において、行または列を形成するピクセル群ごとに各ピクセルの色の判定を順次行い、各行または各列の各セルの領域に対応する部分において所定数の有効な色の判定結果を得たときに、次のセルの領域を示すピクセルの手前のピクセルまで、その行または列における色の判定処理が未処理の残りのピクセルについて色の判定処理を省略し、各セルの領域に対する各行または各列の前記色の判定結果に基づき各セルの領域に付された色を判定することを特徴とする請求項2に記載の二次元コードリーダ。
- 前記色判定部は、前記二次元コードの領域における各セルの領域において、行または列を形成するピクセル群ごとに各ピクセルの色の判定を順次行い、各セルの領域に対応する各行または各列において所定数の有効な色の判定結果を得たときに、次のセルの領域を示すピクセルの手前のピクセルまで、その行または列における色の判定処理が未処理の残りのピクセルについて色の判定処理を省略し、各行または各列の前記色の判定結果に基づき各セルの領域に付された色を判定することを特徴とする請求項2に記載の二次元コードリーダ。
- 前記成分変換部による画像のエッジ画像への変換を、異なる1種類以上の変換条件のそれぞれについて順に実施させると共に、各変換条件について変換されたエッジ画像それぞれに対し、前記領域抽出部による候補領域の抽出、前記パターン判定部による特徴的なパターンの判定、および、前記領域検出部による二次元コードの領域の検出、を繰り返し実施させる繰り返し実施部と、
特定の前記エッジ画像に対して、前記領域抽出部により抽出された候補領域それぞれが、別のエッジ画像について前記領域抽出部が抽出した候補領域(以降「抽出済み候補領域」という)と一致するか否かを、両方の候補領域に基づいて判定する一致判定部と、を備えており、
前記繰り返し実施部は、前記パターン判定部による特徴的なパターンを有しているか否かの判定、および、前記領域検出部による二次元コードの領域の検出、を、前記領域抽出部により抽出された候補領域のうち、前記一致判定部により前記抽出済み候補領域と一致しないと判定された候補領域についてのみ実施させることを特徴とする請求項1乃至請求項4のいずれか1項に記載の二次元コードリーダ。 - 前記二次元コードは、前記複数のセルそれぞれに付される色が、複数種類の色のうち、該セルにてコード化すべき情報、および、該セルと隣接するセルに付された色に応じた着色規則に従って定められており、
さらに、
前記領域検出部により検出された二次元コードの領域それぞれについて、該二次元コードの領域における各セルの領域のうち、該セルの領域に対して前記着色規則に従って付されるべき色、および、前記二次元コードにおいて使用されるべき色、以外の色が付されているセルの領域につき、該セルの領域に本来付されるべき色を前記着色規則に従って推定する色推定部、を備えており、
前記情報識別部は、前記二次元コードの領域における各セルの領域のうち、前記色推定部により色が推定されたセルの領域に該推定された色が付されているものとして、各セルの領域に付された色または色の組合せに基づいて情報を識別することを特徴とする請求項1乃至請求項5のいずれか1項に記載の二次元コードリーダ。 - 前記色判定部は、前記二次元コードの領域における各セルの領域に付されている色を、該二次元コードにおいて使用される複数の色それぞれを中心に拡がる色空間上の判定領域のいずれに含まれているかにより判定することを特徴とする請求項1乃至請求項6のいずれか1項に記載の二次元コードリーダ。
- 前記色判定部は、複数の色それぞれに対応する前記判定領域のいずれにも含まれていないと判定したセルの領域が一定数以上存在する二次元コードの領域に対し、前記判定領域を一定領域だけ拡げたうえで、再度、各セルの領域に付されている色を判定することを特徴とする請求項7に記載の二次元コードリーダ。
- 前記色判定部は、複数の色それぞれに対応する前記判定領域のいずれにも含まれていないと判定したセルの領域が一定数以上存在する二次元コードの領域に対し、該二次元コードの領域における色の分布に応じて前記判定領域を色空間上で変移させたうえで、再度、各セルの領域に付されている色を判定することを特徴とする請求項7に記載の二次元コードリーダ。
- 前記一致判定部は、特定の前記エッジ画像に対して、前記領域抽出部により抽出された候補領域それぞれが、別のエッジ画像における前記抽出済み候補領域と一致するか否かを、両方の候補領域における重複度合に応じて判定することを特徴とする請求項5乃至請求項9のいずれか1項に記載の二次元コードリーダ。
- 前記一致判定部は、特定の前記エッジ画像に対して、前記領域抽出部により抽出された候補領域それぞれが、別のエッジ画像における前記抽出済み候補領域と一致するか否かを、両方の候補領域のうちの一方の候補領域が他方の候補領域に包摂されているか否かに応じて判定することを特徴とする請求項5乃至請求項10のいずれか1項に記載の二次元コードリーダ。
- 前記二次元コードの領域が多角形である場合において、
前記一致判定部は、特定の前記エッジ画像において前記領域抽出部により抽出された候補領域それぞれについて、該候補領域として形成された多角形における1以上の頂点が、前記抽出済み候補領域として形成された多角形におけるいずれかの頂点から一定範囲内に位置しているか否かに応じて、前記領域抽出部により抽出された候補領域それぞれが、別のエッジ画像における前記抽出済み候補領域と一致するか否かを判定することを特徴とする請求項5乃至請求項11のいずれか1項に記載の二次元コードリーダ。 - 前記領域抽出部は、前記二次元コードの領域の形成に係る規則を規定するテンプレートに基づいて、前記成分変換部により変換されたエッジ画像から、そのテンプレートにて定められた規則に従って形成されている領域の位置情報を候補領域の位置情報として抽出することを特徴とする請求項1乃至請求項12のいずれか1項に記載の二次元コードリーダ。
- 請求項1乃至請求項13のいずれか1項に記載の全ての構成部として機能させるための各種処理手順をコンピュータシステムに実行させるためのプログラム。
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US13/813,054 US8534560B2 (en) | 2010-07-30 | 2010-08-31 | Two-dimensional code reader and program |
KR1020137002514A KR101267216B1 (ko) | 2010-07-30 | 2010-08-31 | 이차원 코드 리더 및 프로그램 |
CN201080068357.3A CN103069430B (zh) | 2010-07-30 | 2010-08-31 | 二维码读取器及程序 |
EP10855275.3A EP2600278A4 (en) | 2010-07-30 | 2010-08-31 | TWO-DIMENSIONAL CODE READER AND PROGRAM THEREOF |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010172619A JP4724801B1 (ja) | 2010-07-30 | 2010-07-30 | 二次元コードリーダおよびプログラム |
JP2010-172619 | 2010-07-30 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2012014264A1 true WO2012014264A1 (ja) | 2012-02-02 |
Family
ID=44350532
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/JP2010/005360 WO2012014264A1 (ja) | 2010-07-30 | 2010-08-31 | 二次元コードリーダおよびプログラム |
Country Status (6)
Country | Link |
---|---|
US (1) | US8534560B2 (ja) |
EP (1) | EP2600278A4 (ja) |
JP (1) | JP4724801B1 (ja) |
KR (1) | KR101267216B1 (ja) |
CN (1) | CN103069430B (ja) |
WO (1) | WO2012014264A1 (ja) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140168259A1 (en) * | 2012-12-18 | 2014-06-19 | Fujitsu Limited | Image processing device, image processing method |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103310258B (zh) * | 2013-06-09 | 2016-02-17 | 江苏科技大学 | 一种自适应扩展黑白码编码方法 |
JP6299148B2 (ja) * | 2013-10-31 | 2018-03-28 | ブラザー工業株式会社 | 読み取り装置及びプログラム |
CN103680413B (zh) * | 2013-12-31 | 2015-07-01 | 京东方科技集团股份有限公司 | 一种图像处理装置及方法 |
US9367782B2 (en) | 2014-05-29 | 2016-06-14 | Konica Minolta Laboratory U.S.A., Inc. | High capacity 2D color barcode and method for decoding the same |
US10192022B2 (en) * | 2014-06-04 | 2019-01-29 | IronCAD, LLC | Geometric modeling system with intelligent behaviors of design components |
US20160379031A1 (en) * | 2015-06-23 | 2016-12-29 | Konica Minolta Laboratory U.S.A., Inc. | High capacity 2d color barcode design and processing method for camera based applications |
US9454688B1 (en) | 2015-07-20 | 2016-09-27 | Konica Minolta Laboratory U.S.A., Inc. | High capacity 2D color barcode design and decoding method |
CN106250009B (zh) * | 2015-08-31 | 2019-11-29 | 北京智谷睿拓技术服务有限公司 | 交互方法、交互装置、显示设备及图像获取设备 |
CN109454997B (zh) * | 2017-07-23 | 2020-11-24 | 泗县飞虹体育文化发展有限公司 | 一种具有电子纹理的二维码打印生成系统 |
US10740666B2 (en) * | 2018-09-27 | 2020-08-11 | Caleb J. Webster | Two-dimensional cryptographic poly-chromatic poly-digital code |
JP7176771B2 (ja) * | 2020-01-29 | 2022-11-22 | ビーコア株式会社 | 画像処理装置、画像処理システム、方法、プログラム、移動体及び工場または倉庫 |
CN111428530B (zh) * | 2020-02-29 | 2022-07-15 | 厦门华联电子股份有限公司 | 一种二维码图像检测识别设备、装置及方法 |
CN111523341B (zh) * | 2020-04-03 | 2023-07-11 | 青岛进化者小胖机器人科技有限公司 | 二维码图像的二值化方法及设备 |
CN112733567B (zh) * | 2021-01-15 | 2023-12-12 | 深圳市豪恩汽车电子装备股份有限公司 | 机动车二维码识别方法、装置及计算机可读存储介质 |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000148797A (ja) * | 1998-08-31 | 2000-05-30 | Sony Corp | 画像処理装置、画像処理方法、および画像処理プログラム格納媒体 |
JP2001195536A (ja) | 1999-11-13 | 2001-07-19 | Colorzip Media Inc | コード及びコードのエンコーディング/デコーディング方法及び装置 |
JP2003248792A (ja) * | 2002-02-22 | 2003-09-05 | Seiko Epson Corp | 2次元コードのデコード方法、2次元コードのデコード装置、コンピュータに2次元コードのデコード方法を実行させるためのプログラム、このプログラムを記録した記録媒体 |
JP2005509223A (ja) * | 2001-11-03 | 2005-04-07 | カラージップメディア, インコーポレイテッド | コード認識のための装置及びその方法 |
JP2006134337A (ja) * | 2004-11-05 | 2006-05-25 | Colorzip Media Inc | 混合コードのデコーディング方法及びその装置、記録媒体 |
JP2008004101A (ja) * | 2006-06-23 | 2008-01-10 | Colorzip Media Inc | カラーベースのイメージコードの色判別方法 |
JP2008027036A (ja) * | 2006-07-19 | 2008-02-07 | B-Core Inc | 光学式シンボル及びそれが付された物品並びに光学式シンボルを物品に付す方法及び光学式シンボルのデコード方法。 |
JP2010039624A (ja) * | 2008-08-01 | 2010-02-18 | B-Core Inc | 色彩認識方法及びプログラム |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010042788A1 (en) | 1998-08-31 | 2001-11-22 | Keigo Ihara | Image processing apparatus, image processing method and image processing program storage medium |
CN101088100B (zh) * | 2004-11-05 | 2014-03-12 | 卡勒兹普麦迪亚公司 | 对混合码进行解码的方法和装置 |
KR100653886B1 (ko) | 2004-11-05 | 2006-12-05 | 주식회사 칼라짚미디어 | 혼합코드 및 혼합코드 인코딩 방법과 장치 |
WO2006100720A1 (ja) * | 2005-03-18 | 2006-09-28 | Fujitsu Limited | コード画像処理方法 |
KR100914515B1 (ko) * | 2006-06-23 | 2009-09-02 | 주식회사 칼라짚미디어 | 색상 기반 이미지 코드의 색상 판별 방법 |
WO2008010544A1 (fr) | 2006-07-19 | 2008-01-24 | B-Core Inc. | Symbole optique, article auquel est fixé un symbole optique, procédé pour fixer un symbole optique à un article, et procédé de reconnaissance d'un code par reconnaissance optique |
JP4465723B2 (ja) * | 2007-05-14 | 2010-05-19 | コニカミノルタビジネステクノロジーズ株式会社 | コード検出プログラム及びコード検出方法並びに画像形成装置 |
JP5111055B2 (ja) * | 2007-10-26 | 2012-12-26 | キヤノン株式会社 | 画像処理装置及び画像処理方法、コンピュータプログラム |
US8366004B2 (en) * | 2008-02-22 | 2013-02-05 | Qualcomm Incorporated | Barcode detection based on morphological operations |
-
2010
- 2010-07-30 JP JP2010172619A patent/JP4724801B1/ja active Active
- 2010-08-31 KR KR1020137002514A patent/KR101267216B1/ko active IP Right Grant
- 2010-08-31 WO PCT/JP2010/005360 patent/WO2012014264A1/ja active Application Filing
- 2010-08-31 US US13/813,054 patent/US8534560B2/en active Active
- 2010-08-31 EP EP10855275.3A patent/EP2600278A4/en not_active Withdrawn
- 2010-08-31 CN CN201080068357.3A patent/CN103069430B/zh active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000148797A (ja) * | 1998-08-31 | 2000-05-30 | Sony Corp | 画像処理装置、画像処理方法、および画像処理プログラム格納媒体 |
JP2001195536A (ja) | 1999-11-13 | 2001-07-19 | Colorzip Media Inc | コード及びコードのエンコーディング/デコーディング方法及び装置 |
JP2005509223A (ja) * | 2001-11-03 | 2005-04-07 | カラージップメディア, インコーポレイテッド | コード認識のための装置及びその方法 |
JP2003248792A (ja) * | 2002-02-22 | 2003-09-05 | Seiko Epson Corp | 2次元コードのデコード方法、2次元コードのデコード装置、コンピュータに2次元コードのデコード方法を実行させるためのプログラム、このプログラムを記録した記録媒体 |
JP2006134337A (ja) * | 2004-11-05 | 2006-05-25 | Colorzip Media Inc | 混合コードのデコーディング方法及びその装置、記録媒体 |
JP2008004101A (ja) * | 2006-06-23 | 2008-01-10 | Colorzip Media Inc | カラーベースのイメージコードの色判別方法 |
JP2008027036A (ja) * | 2006-07-19 | 2008-02-07 | B-Core Inc | 光学式シンボル及びそれが付された物品並びに光学式シンボルを物品に付す方法及び光学式シンボルのデコード方法。 |
JP2010039624A (ja) * | 2008-08-01 | 2010-02-18 | B-Core Inc | 色彩認識方法及びプログラム |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140168259A1 (en) * | 2012-12-18 | 2014-06-19 | Fujitsu Limited | Image processing device, image processing method |
US9361708B2 (en) * | 2012-12-18 | 2016-06-07 | Fujitsu Limited | Image processing device, image processing method |
Also Published As
Publication number | Publication date |
---|---|
US20130186957A1 (en) | 2013-07-25 |
KR101267216B1 (ko) | 2013-05-24 |
KR20130019020A (ko) | 2013-02-25 |
EP2600278A4 (en) | 2014-04-09 |
EP2600278A1 (en) | 2013-06-05 |
US8534560B2 (en) | 2013-09-17 |
CN103069430A (zh) | 2013-04-24 |
CN103069430B (zh) | 2014-11-26 |
JP4724801B1 (ja) | 2011-07-13 |
JP2012033034A (ja) | 2012-02-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4724802B1 (ja) | 二次元コードリーダおよびプログラム | |
JP4724801B1 (ja) | 二次元コードリーダおよびプログラム | |
JP5298831B2 (ja) | 画像処理装置及びプログラム | |
EP2608104B1 (en) | Image processing device, image processing method, and image processing program | |
JP4764903B2 (ja) | テキストマップの中からライン構造を検出する方法および画像処理装置 | |
JP4149464B2 (ja) | 画像処理装置 | |
JP5319637B2 (ja) | 二次元コード、エンコード装置、エンコードプログラムおよび二次元コードリーダ | |
JP2009302758A (ja) | 画像処理装置、画像変換方法、およびコンピュータプログラム | |
JP4724800B1 (ja) | 物品検出装置およびプログラム | |
JP2008134791A (ja) | 画像処理装置及び画像処理プログラム | |
JP2006235785A (ja) | 画像処理装置、および画像処理方法、並びにコンピュータ・プログラム | |
JP4208520B2 (ja) | 画像処理装置および画像処理方法、プログラムおよび記憶媒体 | |
JP5691547B2 (ja) | 画像の変更箇所抽出装置、画像の変更箇所表示装置及びプログラム | |
JP4910635B2 (ja) | 画像処理装置及び画像処理プログラム | |
JP2013178732A (ja) | 画像処理装置及び画像処理方法 | |
JP5109548B2 (ja) | 画像処理装置及びプログラム | |
JP4973603B2 (ja) | 画像処理装置および画像処理プログラム | |
JP2010044517A (ja) | 画像処理装置、画像処理方法、画像処理プログラム及び記録媒体 | |
JP2017207837A (ja) | 画像検査装置、画像検査方法、およびプログラム | |
JP2008135857A (ja) | 画像処理装置及び画像処理プログラム | |
JP2009238202A (ja) | 輪郭抽出装置、輪郭抽出方法および輪郭抽出プログラム | |
JP2006092050A (ja) | 画像処理装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WWE | Wipo information: entry into national phase |
Ref document number: 201080068357.3 Country of ref document: CN |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 10855275 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 20137002514 Country of ref document: KR Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2010855275 Country of ref document: EP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 13813054 Country of ref document: US |