WO2014049729A1 - 動画像認識装置及び動画像認識方法 - Google Patents

動画像認識装置及び動画像認識方法 Download PDF

Info

Publication number
WO2014049729A1
WO2014049729A1 PCT/JP2012/074729 JP2012074729W WO2014049729A1 WO 2014049729 A1 WO2014049729 A1 WO 2014049729A1 JP 2012074729 W JP2012074729 W JP 2012074729W WO 2014049729 A1 WO2014049729 A1 WO 2014049729A1
Authority
WO
WIPO (PCT)
Prior art keywords
label
unit
moving image
data code
detected
Prior art date
Application number
PCT/JP2012/074729
Other languages
English (en)
French (fr)
Inventor
鈴木 智久
Original Assignee
株式会社 東芝
東芝ソリューション株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社 東芝, 東芝ソリューション株式会社 filed Critical 株式会社 東芝
Priority to JP2012544352A priority Critical patent/JP5670471B2/ja
Priority to CN201280076054.5A priority patent/CN104662590B/zh
Priority to PCT/JP2012/074729 priority patent/WO2014049729A1/ja
Publication of WO2014049729A1 publication Critical patent/WO2014049729A1/ja
Priority to US14/667,757 priority patent/US9779326B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/22Character recognition characterised by the type of writing
    • G06V30/224Character recognition characterised by the type of writing of printed characters having additional code marks or containing code marks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/22Character recognition characterised by the type of writing
    • G06V30/224Character recognition characterised by the type of writing of printed characters having additional code marks or containing code marks
    • G06V30/2247Characters composed of bars, e.g. CMC-7
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/09Recognition of logos

Definitions

  • Embodiments of the present invention relate to a moving image recognition apparatus and a moving image recognition method for recognizing a data code in an input moving image and a label such as a discount label in association with each other.
  • a point-of-sale (POS) system is known as a system for processing a data code (for example, a barcode) written on a product.
  • POS systems are commonly used in retail stores such as supermarkets.
  • the POS system acquires the product unit price of the product registered in the POS system based on the product code obtained by reading (decoding) the data code written on each product purchased by the customer, and the total Calculate the amount.
  • a product with a discount amount (hereinafter referred to as a discount label) may be included in a product handled at a retail store.
  • a discount label a product with a discount amount
  • the POS system is required to efficiently perform discount processing for products with discount labels attached thereto. Therefore, in recent years, technologies that meet such requirements have been proposed.
  • This technique uses an image acquired by photographing the surface of a product on which a data code is written. That is, this technique outputs the decoding result of the data code and the recognition result of the discount label together when the data code and the discount label are detected from the acquired same image.
  • the discount amount indicated on the discount label is used.
  • the product unit price can be automatically reduced. That is, a discount operation can be performed without requiring an operator's operation. Further, the POS system can perform the same processing when using a discount label in which a discount rate is written or a point grant label in which the number of points to be given is used instead of the discount label.
  • the above-described conventional technology requires that a label such as a discount label is attached to a surface that can be photographed simultaneously with the data code of the product. If a label is attached to a surface that cannot be photographed at the same time as the data code of the product, the label is not included in the image obtained by photographing the data code. For example, if a data code is printed on the front side (first side) of the milk pack and a label is attached to the back side (second side different from the first side) of the milk pack, the data code is included in the same image. And a label cannot be included.
  • a problem to be solved by the present invention is a moving image recognition apparatus and a moving image recognition method capable of associating both from a moving image even when a data code and a label are arranged on different surfaces of the same object Is to provide.
  • the moving image recognition apparatus includes a moving image input unit, a buffer unit, a moving object detection unit, a data code reading unit, a label recognition unit, an association unit, and an output unit.
  • the moving image input unit inputs a moving image.
  • the buffer unit stores the input moving image.
  • the moving object detecting unit detects moving objects from the moving images stored in the buffer unit and identifies each moving object.
  • the data code reading unit detects a data code such as a barcode or a two-dimensional barcode from each of the frames of the moving image, and decodes the detected data code.
  • the label recognizing unit detects a label from each of the frames of the moving image, and recognizes a symbol written on the detected label.
  • the associating unit converts the label recognition result into the data code decoding result. Associate.
  • the output unit outputs a decoding result of the data code and a recognition result of the label associated with the decoding result.
  • FIG. 1 is a block diagram illustrating a typical hardware configuration of the moving image recognition apparatus according to the embodiment.
  • FIG. 2 is a block diagram mainly showing a functional configuration of the moving image recognition apparatus.
  • FIG. 3 is a diagram illustrating an example of a correspondence relationship between the N pointers and the N buffers in the moving image area illustrated in FIG.
  • FIG. 4 is a diagram illustrating an example of a correspondence relationship between N pointers and N buffers in a moving image area after one frame from the state of FIG.
  • FIG. 5 is a diagram illustrating an example of a size of a buffer for storing a frame of a moving image and a coordinate system in the buffer.
  • FIG. 6 is a diagram illustrating an example of a relationship between a frame and a small section.
  • FIG. 1 is a block diagram illustrating a typical hardware configuration of the moving image recognition apparatus according to the embodiment.
  • FIG. 2 is a block diagram mainly showing a functional configuration of the moving image recognition apparatus.
  • FIG. 3 is
  • FIG. 7 is a diagram illustrating an example of the size and coordinates of the small sections in the frame.
  • FIG. 8 is a diagram schematically showing an example of a two-dimensional array for storing moving object numbers.
  • FIG. 9 is a diagram showing a state of block matching applied in the embodiment.
  • FIG. 10 is a diagram schematically showing a typical data structure of a label dictionary applied in the embodiment.
  • FIG. 11 is a diagram illustrating an example of output contents when there is no label associated with a barcode.
  • FIG. 12 is a diagram illustrating an example of output contents when there is a label associated with a barcode.
  • FIG. 13 is a diagram illustrating an example of a first request message for prompting input of a corrected label recognition result.
  • FIG. 14 is a diagram illustrating an example of a first response message corresponding to the first request message.
  • FIG. 15 is a diagram illustrating an example of a second request message for prompting input of a corrected decoding result.
  • FIG. 16 is a diagram illustrating an example of a second response message corresponding to the second request message.
  • FIG. 1 is a block diagram illustrating a typical hardware configuration of a moving image recognition apparatus 10 according to the embodiment.
  • the moving image recognition apparatus 10 operates as an element of the POS system.
  • the moving image recognition apparatus 10 is realized using, for example, a personal computer (PC) 11.
  • the PC 11 includes a CPU 12, a storage device 13, an input / output controller 14, and a system bus 15.
  • the CPU 12, the storage device 13 and the input / output controller 14 are interconnected by a system bus 15.
  • the PC 11 also includes a video terminal 16.
  • CPU 12 executes information processing including detection of moving objects, reading (decoding) of data codes, and recognition of labels.
  • the data code is a barcode (one-dimensional barcode).
  • the animal body is, for example, a product.
  • This operation is that the operator grasps the product and moves to the imaging range of the camera 17 described later (that is, holds it over the camera 17). In the case of self-checkout, the customer himself performs the above operation.
  • Products generally have a barcode surface with a barcode.
  • the barcode surface on which the barcode is written refers not only to the surface of the product on which the barcode is printed, but also to the surface of the product on which the barcode seal is affixed.
  • a barcode is printed on the barcode seal.
  • a label such as a discount label, a discount label, or a point grant label may be attached to the product. The discount amount is written on the discount label, the discount rate is written on the discount label, and the number of points given is written on the point grant label.
  • the storage device 13 includes a RAM unit, a ROM unit, and a flash memory unit.
  • the RAM unit is configured using at least one RAM
  • the ROM unit is configured using at least one ROM
  • the flash memory unit is configured using at least one flash memory (that is, a rewritable nonvolatile memory).
  • the storage device 13 includes a software area 13a, a moving image area 13b, a work data area 13c, a setting data area 13d, and a label dictionary area 13e.
  • the software area 13a is secured in the ROM section, for example.
  • the moving image area 13b and the work data area 13c are secured, for example, in the RAM unit.
  • the setting data area 13d and the label dictionary area 13e are secured, for example, in the flash memory unit.
  • the storage areas of the ROM part, RAM part and flash memory part are allocated in the same address space recognized by the CPU 12. Thereby, the CPU 12 accesses the software area 13a, the moving image area 13b, the work data area 13c, the setting data area 13d, and the label dictionary area 13e according to the use without being aware of the ROM, RAM, or flash memory. .
  • the software area 13a is used to store software for the information processing. This software includes instruction codes, constants, various tables, and initial values of variables.
  • the moving image area 13b is used for storing moving images. The moving image is input via the video terminal 16 and the input / output controller 14, for example.
  • the work data area 13c is used to store work data for the information processing.
  • the work data includes a barcode decoding result and a label recognition result.
  • the setting data area 13d is used to store setting data to be described later.
  • the label dictionary area 13e is used to store a label dictionary described later.
  • the input / output controller 14 is connected to an imaging device that acquires moving images, for example, a camera 17 via a video terminal 16.
  • the input / output controller 14 inputs a moving image acquired by the camera 17 and transfers the moving image to the storage device 13 by, for example, direct memory access (DMA).
  • the input / output controller 14 is also connected to a POS terminal via an input / output interface, for example, a serial input / output interface 18.
  • the input / output controller 14 outputs the processing result of the moving image recognition apparatus 10 via the serial input / output interface 18 under the control of the CPU 12 (software executed by the CPU 12).
  • the processing result of the moving image recognition apparatus 10 includes a barcode decoding result, a label recognition result, and a region detection result.
  • the input / output controller 14 also inputs data (for example, correction data) transferred from the POS terminal via the serial input / output interface 18.
  • the input / output controller 14 is further connected to a speaker 19.
  • the input / output controller 14 outputs a message or warning sound from the speaker 19.
  • FIG. 2 is a block diagram mainly showing a functional configuration of the moving image recognition apparatus 10. This functional configuration is realized by the CPU 12 of the PC 11 shown in FIG. 1 executing the software.
  • the moving image recognition apparatus 10 includes a moving image input unit 201, a buffer unit 202, a moving object detection unit 203, a data code reading unit 204, a label recognition unit 205, an association unit 206, an update unit 207, an output unit 208, and a warning unit (first unit).
  • 1 warning section) 209 (# 1), warning section (second warning section) 210 (# 2), correction input section 211, determination section 212, warning section (third warning section) 213 (# 3),
  • a correction unit 214 and a majority decision selection unit 215 are provided.
  • the elements excluding the buffer unit 202 are configured by software modules. However, some or all of these software modules may be replaced with hardware modules.
  • the buffer unit 202 is configured using the moving image area 13 b of the storage device 13.
  • the moving image input unit 201 inputs the moving image 221 transferred by the input / output controller 14.
  • the buffer unit 202 is used for storing the moving image 221. More specifically, the buffer unit 202 is used to temporarily store N consecutive frames of the moving image 221 in time series order.
  • the moving object detection unit 203 detects moving objects from the moving image 221 and identifies each moving object. Thereby, the moving object detection unit 203 acquires the detection result 222 of the moving object.
  • the moving object detection unit 203 includes an object number determination unit 203a.
  • the object number determination unit 203a determines a number for identifying the detected moving object.
  • the data code reading unit 204 detects a data code from each frame of the moving image 221 and decodes the data code.
  • the data code detected and decoded by the data code reading unit 204 is a barcode. Therefore, the data code reading unit 204 in the present embodiment detects a barcode from each frame of the moving image 221 and decodes the barcode. That is, the data code reading unit 204 reads a barcode from each frame of the moving image 221. As a result, the data code reading unit 204 acquires the barcode decoding result 223.
  • the label recognition unit 205 detects a label from each frame of the moving image 221 and recognizes a symbol written on the label (for example, printed). Thereby, the label recognition unit 205 acquires the label recognition result 224.
  • the label recognition result 224 includes a type (label type) indicating whether the label is a discount label, a discount label, or a point grant label, and a discount amount, a discount rate, or the number of points.
  • the associating unit 206 determines whether the label recognized by the label recognition result 224 and the barcode decoded by the data code reading unit 204 exist on the same object based on the detection result 222 of the moving object. This determination method will be described later.
  • the associating unit 206 associates the label recognition result 224 corresponding to the label with the decoding result 223 corresponding to the barcode.
  • the associating unit 206 acquires association data 225 in which the label recognition result 224 is associated with the decoding result 223.
  • the update unit 207 includes a history update unit 207a and a list update unit 207b.
  • the history update unit 207a updates a part of the work data 226 every time the association by the association unit 206 is completed.
  • the work data 226 will be described later.
  • the list updating unit 207b updates the list array ⁇ of the barcode decoding result 223 and the list array ⁇ of the label recognition result 223 every time the association unit 206 completes the association.
  • the arrays ⁇ and ⁇ will be described later.
  • the output unit 208 outputs the barcode decoding result 223 and the label recognition result 224 associated with the decoding result 223 together.
  • the warning unit 209 determines whether the first warning condition is satisfied based on the decoding result 223, the label recognition result 224, and the association data 225.
  • the first warning condition is that a barcode on the moving object is detected before the moving object is detected even though the label is detected on the moving object detected by the moving object detection unit 203. Refers to the state that was not done. Therefore, the warning unit 209 determines whether or not the first warning condition is satisfied when the moving object detected by the moving object detection unit 203 is not detected. When the first warning condition is satisfied, the warning unit 209 emits a message or a warning sound via the input / output controller 14.
  • the warning unit 210 determines whether the second warning condition is satisfied based on the label recognition result 224 and the association data 225. If the second warning condition is satisfied, the warning unit 210 determines that the input / output controller 14 is Make a message or beep sound through.
  • the second warning condition indicates a state in which a label having a different recognition result (that is, a different label recognition result 224) is detected by the label recognition unit 205 for the same object detected by the moving object detection unit 203. .
  • the correction input unit 211 requests the POS terminal operator to input the corrected label recognition result when the second warning condition is satisfied.
  • the determination unit 212 determines the label type, the discount amount, the discount rate, or the number of points by majority vote when the second warning condition is satisfied.
  • the warning unit 213 determines whether the third warning condition is satisfied based on the decoding result 223 and the association data 225. If the third warning condition is satisfied, the warning unit 213 determines whether the third warning condition is satisfied. Sound a message or beep.
  • the third warning condition is a state in which different barcodes (that is, different decoding results 223) of the decoding results 223 are detected by the data code reading unit 204 for the same object detected by the moving object detection unit 203. Point to.
  • the correction unit 214 requests the POS terminal operator to correct the decoding result (decoding content) when the third warning condition is satisfied.
  • the majority decision selection unit 215 selects the decoding result 223 by majority decision when the third warning condition is satisfied.
  • the operator of the POS terminal takes out a product purchased by a customer from, for example, a shopping basket, and moves the product to the imaging range of the camera 17.
  • the camera 17 acquires a moving image of an object within an imaging range including the product (that is, a moving object). Therefore, the operator points the product toward the camera 17 so that the barcode written on the barcode surface of the product and the label attached to the product are captured by the camera 17. If the label is affixed to a surface different from the barcode surface, the operator appropriately changes the direction of the product with respect to the camera 17 so that the barcode surface and the label sequentially enter the imaging range of the camera 17.
  • the input / output controller 14 receives the moving image acquired by the camera 17 via the video terminal 16.
  • the input / output controller 14 transfers the received moving image to the storage device 13 by DMA, for example.
  • the moving image input unit 201 controls the input / output controller 14 so that the moving image transferred by the input / output controller 14 is stored in the buffer unit 202 in the moving image area 13b in units of frames.
  • FIG. 3 shows an example of the moving image area 13b shown in FIG.
  • a buffer unit 202 is secured in the moving image area 13b.
  • the buffer unit 202 includes N buffers (frame buffers) A1, A2, A3,..., AN-1, AN.
  • the buffers A1 to AN are used for temporarily storing N consecutive frames of moving image frames in time series order. Therefore, the buffers A1 to AN are used as ring buffers.
  • N pointers P1, P2, P3,... PN-1, PN are also secured.
  • the pointer P1 indicates the position (for example, the start address) of the buffer in which the latest frame of the moving image is stored.
  • the pointer P2 points to the position of the buffer in which a frame that is one frame before the latest frame is stored.
  • the pointer PN-1 indicates the position of a buffer in which a frame that is N-1 frames before the latest frame is stored.
  • the pointer PN indicates the position of the buffer in which the frame currently being read is stored.
  • FIG. 3 shows the correspondence between the pointers P1 to PN and the buffers A1 to AN in the moving image area 13b.
  • the pointers P1 to PN are updated by the moving image input unit 201.
  • the pointers P1 to PN may be stored in a storage area other than the moving image area 13b, for example, the work data area 13c.
  • the pointer P1 points to the buffer Ai (i is one of 1 to N).
  • the pointer P2 points to Ai + 1 MOD N.
  • x MOD y indicates the remainder obtained by dividing x by y.
  • the moving image input unit 201 updates the pointers P1 to PN every time one frame of moving image input is completed. The completion of such an input frame is notified to the moving image input unit 201 by an interrupt from the input / output controller 14 triggered by a vertical synchronization signal obtained through the video terminal 16.
  • the moving image input unit 201 updates the pointers P ⁇ b> 1 to PN each time an interrupt is input from the input / output controller 14.
  • the moving image input unit 201 also performs setting for DMA transfer by the input / output controller 14 every time the pointers P1 to PN are updated. That is, the moving image input unit 201 causes the input / output controller 14 to transfer a moving image input via the video terminal 16 to the buffer indicated by the pointer PN by DMA by one frame.
  • the moving image input unit 201 also generates a thread for performing frame processing, which will be described later, and causes the CPU 12 to execute it every time the pointers P1 to PN are updated.
  • the pointer Pj is updated according to the following rules. If the number of the buffer pointed to by the pointer Pj is i (assuming that the pointer Pj points to the buffer Ai), the updated buffer number is i + 1 MOD N. However, x MOD y represents the remainder when x is divided by y.
  • FIG. 3 shows an example of the correspondence relationship between the pointers P1 to PN and the buffers A1 to AN in a state where the buffer AN is used to store the frame currently being read.
  • FIG. 4 shows an example of the correspondence between the pointers P1 to PN and the buffers A1 to AN one frame after the state of FIG.
  • the pointer P1 points to the buffer A1, the pointer P2 points to the buffer A2, and the pointer P3 points to the buffer A3.
  • the pointer PN-1 points to the buffer AN-1, and the pointer PN points to the buffer AN.
  • the buffer AN indicated by the pointer PN is used to store the frame currently being read. Assume that reading of a frame into the buffer AN has been completed.
  • the moving image input unit 201 updates the pointer P1 from the address indicating the buffer A1 to the address indicating the buffer AN, as shown in FIG.
  • the updated pointer P1 indicates that the buffer AN (that is, the buffer AN that has been read immediately before) is a buffer that stores the latest frame.
  • the moving image input unit 201 updates the pointer P2 from the address indicating the buffer A2 to the address indicating the buffer A1, and updates the pointer P3 from the address indicating the buffer A3 to the address indicating the buffer A2.
  • the moving image input unit 201 updates the pointers P4 to PN-2 to addresses indicating buffers A3 to AN-3, respectively.
  • the moving image input unit 201 also updates the pointer PN-1 from the address indicating the buffer AN-1 to the address indicating the buffer AN-2, and the pointer PN is changed from the address indicating the buffer AN to the address indicating the buffer AN-1. Update to Thereby, the buffer AN-1 is used for reading a new frame.
  • the buffer AN-1 is a buffer in which the oldest frame is stored when reading of the frame into the buffer AN is completed.
  • the frames stored in the buffers A1 to AN-2 are one frame to N-2 frames before the latest frame read into the buffer AN, respectively.
  • the buffers A1 to AN are sequentially used in a ring shape, and frames that are temporally continuous starting from the buffer pointed to by the pointer P1 that is updated according to the frame input are stored in the buffer unit 202. Stored. That is, the buffers A1 to AN are used as ring buffers.
  • the buffer Ai is a two-dimensional buffer having a horizontal width of W pixels and a height of H pixels.
  • the buffer Ai has the same size as the frame. That is, the size of the frame stored in the buffer Ai is W pixels in width and H pixels in height.
  • the coordinates of the pixel (pixel position) at the upper left corner of the buffer Ai (frame) are (0, 0), and the coordinates of the pixel (pixel position) at the lower right corner of the buffer Ai (frame) are (W ⁇ 1, H ⁇
  • the setting data stored in the setting data area 13d will be described.
  • the setting data includes variables C1, C2, and C3.
  • the variable C1 is used to switch the timing of output by the output unit 208.
  • the variable C2 is used to switch the operation when a different label of the label recognition result 224 is detected for the same object.
  • the variable C3 is used to switch the operation when a different barcode of the decoding result 223 is detected for the same object.
  • variables C1, C2, and C3 are stored as the setting data in, for example, a flash memory unit, and are set together with other data written in the flash memory when the moving image recognition apparatus according to the present invention is manufactured.
  • the output by the output unit 208 is performed after a predetermined time or the number of frames has elapsed since the detection of the barcode
  • 1 is set in the variable C1, for example.
  • 2 is set in the variable C1, for example.
  • 3 is set in the variable C1.
  • the variable C2 includes For example, 1 is set.
  • the decision unit 212 decides the label type and the discount amount or the discount rate or the number of points by majority decision, for example, 2 is set in the variable C2.
  • variable C3 is set to, for example, 1. To do. Further, when the decoding result 223 is selected by the majority decision by the majority decision selection unit 215 because the third warning condition is satisfied, for example, 2 is set in the variable C3.
  • the variables C1, C2, and C3 are set at the time of manufacture.
  • the operation of the apparatus may be changed by taking out the flash memory and resetting these variables with a flash writer. .
  • the work data includes an array (array data) E having a predetermined size K.
  • the array E is used to record the presence or absence of the moving object corresponding to the moving object number determined by the object number determination unit 203a.
  • the number of the moving object when there is an moving object corresponding to the number j, 1 is set in the j-th element E [j] of the array E, for example. Otherwise, for example, 0 is set in the element E [j].
  • the work data further includes arrays P and Q of size K.
  • the arrays P and Q are used to store the barcode number and the label number corresponding to the moving object number.
  • the barcode number is set in the j-th element P [j] of the array P. Otherwise, for example, 0 is set in the element P [j].
  • the number of the label is set in the j-th element Q [j] of the array Q. Otherwise, for example, 0 is set in the element Q [j].
  • the work data further includes an array d.
  • the array d is used to store the decoding result corresponding to the barcode number.
  • the work data further includes a variable L and arrays (array variables) s and t.
  • the variable L is used to represent the number of labels detected by the label recognition unit 205.
  • the arrays s and t are used to store the coordinates of the detected labels.
  • the coordinates of the center of the circumscribed rectangle of the label are used as the X coordinate and Y coordinate of the i-th label.
  • the work data further includes arrays (array variables) ⁇ and ⁇ .
  • the array ⁇ is used to store a number representing a label type corresponding to the label number.
  • the numbers representing the types of labels are 1 for discount labels, 2 for discount labels, and 3 for point labels.
  • the array ⁇ is used to store a discount amount, a discount rate, or a point number corresponding to the label number.
  • the i-th element ⁇ [i] of the array ⁇ stores the discount amount, the discount rate, or the number of points of the i-th label.
  • the work data further includes arrays (array variables) E2, P2, d2, ⁇ 2, and ⁇ 2.
  • the arrays E2, P2, d2, ⁇ 2, and ⁇ 2 are used to hold the contents of the aforementioned arrays E, P, d, ⁇ , and ⁇ in the previous frame.
  • the work data further includes an array g.
  • the array g is an array of character string variables indicating the decoding result of the barcode first detected for each moving object.
  • the j-th element g [j] of the array g has first the moving object.
  • the decoding result of the detected barcode is set. Otherwise, for example, an empty character string is set in the element g [j].
  • the work data further includes arrays (array variables) h, f and g2.
  • the array h indicates how many frames ago the barcode first detected for each moving object was detected.
  • a positive integer is set in the j-th element h [j] of the array h. Otherwise, for example, ⁇ 1 is set in the element h [j].
  • the numerical value h [j] indicates that the barcode on the moving object number j is detected before h [j] frame.
  • the array f indicates whether or not the barcode on the moving object has already been output.
  • 1 is set in the j-th element f [j] of the array f, for example. Otherwise, for example, 0 is set in the element f [j].
  • the sequence g2 indicates whether a label has already been detected on the moving object.
  • 1 is set in the j-th element g2 [j] of the array g2. Otherwise, for example, 0 is set in the element g2 [j].
  • the work data further includes arrays (array variables) ⁇ and ⁇ .
  • the array ⁇ is an array of lists (list variables) used to store a list of barcode recognition results detected on the moving object.
  • Each element of the jth list (list variable) ⁇ [j] in the list array ⁇ is a structure that stores the decoding result of the barcode detected on the moving object number j.
  • the array ⁇ is an array of lists (list variables) used to store a list of recognition results of labels detected on the moving object.
  • Each element of the j-th list (list variable) ⁇ [j] in the list array ⁇ stores a number indicating the type of label detected on the moving object number j and a discount amount, a discount rate, or the number of points. This is a structure.
  • the working data further includes arrays (array variables) ⁇ 2 and ⁇ 2. The arrays ⁇ 2 and ⁇ 2 are used to store the contents of the above-described arrays ⁇ and ⁇ one frame before.
  • the moving image input unit 201 transfers the moving image 221 by one frame by the input / output controller 14 and updates the pointers P1 to PN every time the moving image based on the present embodiment is updated.
  • the frame processing performed by the recognition apparatus 10 will be described.
  • the moving object detection unit 203 In the frame processing, the contents of the arrays E, P, d, ⁇ , ⁇ , ⁇ , and ⁇ are copied to the arrays E2, P2, d2, ⁇ 2, ⁇ 2, ⁇ 2, and ⁇ 2, respectively.
  • the moving object detection unit 203, data code reading unit 204, label recognition unit 205, association unit 206, update unit 207, output unit 208, warning unit 209, warning unit 210, correction input unit 211, determination unit 212, the warning unit 213, the correction unit 214, and the majority decision selection unit 215 operate as described below.
  • the latest frame stored in the buffer pointed to by the pointer P1 is the frame F1
  • the buffer pointed to by the pointer P2 is stored
  • the frame stored prior to the latest frame is the frame. It shall be called F2.
  • the moving object detection unit 203 detects the moving object from the moving image 221
  • the data code reading unit 204 detects the barcode from the frame F ⁇ b> 1
  • the label recognition unit 205 performs the frame F ⁇ b> 1 by the method described later. Detection and recognition of label images from
  • the moving object detection unit 203 detects a moving object from the moving image 221 stored in the buffer unit 202.
  • the moving object detection unit 203 identifies each detected moving object. Details of the operation of the moving object detection unit 203 will be described below.
  • the moving object detection unit 203 divides the frame F1 (frame image) into grid-like small sections having an interval of Z pixels. Then, the moving object detection unit 203 performs so-called block matching for searching for an area most similar (that is, matched) with the small section from the frame F2 (frame image) for each of the small sections.
  • FIG. 6 shows an example of the relationship between a frame and a small section.
  • the frame is divided into A ⁇ B grid-like subsections with an interval of Z pixels. That is, the frame is divided into A ⁇ B subdivisions in a matrix of A columns and B rows. The position of each subdivision is represented by column number a and row number b.
  • the position (a, b) of the small section is (0, 0)
  • the small section at the upper right corner of the frame is (A-1, 0)
  • In the lower left corner of the frame, (a, b) is (0, B-1), and in the lower right corner of the frame, (a, b) is (A-1, B-1).
  • FIG. 7 shows an example of the size and coordinates of a small section of the position (a, b) in the frame.
  • the coordinates of the pixel at the upper left corner of the frame are (0, 0) as shown in FIG.
  • the coordinates of the pixel at the upper left corner of the small section existing at the position (a, b) in the frame are represented by (aZ, bZ) as shown in FIG.
  • the coordinates of the pixel in the lower right corner of this small section are represented by ((a + 1) Z-1, (b + 1) Z-1) as shown in FIG.
  • the work data stored in the work data area 13c includes two two-dimensional arrays M1 and M2 in addition to the various arrays as described above.
  • Two-dimensional arrays M1 and M2 are used to store the number of moving objects for each of the subsections. More specifically, the two-dimensional array M1 is used to store the number of the moving object detected from the frame F1 stored in the buffer indicated by the pointer P1 for each small section.
  • the two-dimensional array M2 is used to store the number of the moving object detected from the previous frame (frame F2) stored in the buffer indicated by the pointer P2 for each small section.
  • areas 81 and 82 in which the numerical value 0 is described are a set of elements of the two-dimensional array Mr in which the numerical value 0 is set.
  • the moving object detection unit 203 initializes all elements of the two-dimensional arrays M1 and M2 to 0 when the moving image recognition apparatus 10 is activated. Therefore, the two-dimensional arrays M1 and M2 indicate that the moving object is not detected in the initial state.
  • the small section at the position (a, b) may be described as the small section (a, b).
  • areas 83, 84, and 85 in which numerical values 1, 2, and 3 are described are sets of elements of the two-dimensional array Mr in which numerical values 1, 2, and 3 are set, respectively.
  • the areas 83, 84, and 85 indicate that there are moving bodies having numbers 1, 2, and 3, respectively, in a set of small sections corresponding to the areas 83, 84, and 85.
  • the area 85 corresponds to the background image in the frame. In the present embodiment, the background image is detected as a moving object.
  • the moving object detection unit 203 performs block matching based on the frame F1 stored in the buffer pointed to by the pointer P1 and the frame F2 stored in the buffer pointed to by the pointer P2. That is, the moving object detection unit 203 searches, for each small section (a, b) in the frame F1, a region in the frame F2 that matches the small section (a, b).
  • FIG. 9 shows a block matching state applied in the present embodiment.
  • the moving object detection unit 203 searches the frame F ⁇ b> 2 for the area in the frame F ⁇ b> 2 indicated by the arrow 90 for the small section (a, b) in the frame F ⁇ b> 1. Find out by. If a region matching the small section (a, b) in the frame F1 cannot be found from the frame F2, the moving object detection unit 203 sets a value 0 to the variable M. On the other hand, when a matching area is found, the moving object detection unit 203 sets a value 1 to the variable M and sets the variables X [a, b] and Y [a, b] to the upper left corner of the area. X coordinate and Y coordinate are set respectively. Variable M and variables X [a, b] and Y [a, b] are part of the work data.
  • the mean square error of the pixel value is calculated.
  • the moving object detection unit 203 uses the calculated mean square error as the cost of matching between the small section (a, b) and the rectangular area (that is, the rectangular area corresponding to the coordinate (x, y) of the combination). .
  • the moving object detection unit 203 determines that an area matching the small section (a, b) has been found. In this case, the moving object detection unit 203 sets the value 1 to the variable F [a, b].
  • the variable F [a, b] is a part of the work data. When the variable F [a, b] is 1, it indicates that there is a matching area in the small section (a, b).
  • the moving object detection unit 203 determines that an area matching the small section (a, b) was not found.
  • the moving object detection unit 203 sets the value 0 to F [a, b]. This indicates that there is no matching area in the small section (a, b).
  • the moving object detection unit 203 uses the variable (X [ a, b], Y [a, b]).
  • the moving object detection unit 203 assigns the number of the moving object to the element M1 [a, b] for the small section (a, b) where the matching region is found, that is, the small section where F [a, b] ⁇ 0. Set. Therefore, the object number determination unit 203a of the moving object detection unit 203 determines the number of the moving object as follows.
  • FLOOR ( ⁇ ) is a function that returns the largest integer less than or equal to ⁇
  • MAX (x, y) is a function that compares the arguments x and y and returns the larger one
  • MIN (x, y) is an argument x and y.
  • S is a constant that is arbitrarily determined in advance.
  • the object number determination unit 203a has the number M2 [a, b] of the moving object in the set of small sections of M2 [a, b] ⁇ 0. Find the mode.
  • the moving object detection unit 203 assigns this mode value to M1 [a, b] as the moving object number corresponding to the small section (a, b).
  • the detection result 222 of the moving object is stored in the two-dimensional array M1 by a series of operations of the moving object detection unit 203 (that is, the moving object detection unit 203 including the object number determination unit 203a).
  • the moving object may be detected by a method different from that applied in the present embodiment as long as the moving object can be detected and the moving object corresponding to each location corresponding to the small section can be identified. .
  • the data code reading unit 204 detects a barcode from the frame F1.
  • the data code reading unit 204 assigns the number of detected barcodes to the variable M.
  • the data code reading unit 204 sets the X coordinate and Y coordinate of the center of the circumscribed rectangle of the barcode to variables u [i] and v [i].
  • Variables u [i] and v [i] are part of the work data.
  • the data code reading unit 204 decodes (that is, reads) information recorded on the barcode by analyzing each image of the detected barcode.
  • the data code reading unit 204 substitutes the decoding result 223 into the element (character string variable) d [i] of the array d.
  • i is a number used for identifying the detected barcode.
  • the label recognition unit 205 detects and recognizes a label image registered in the label dictionary from the frame F1 by template matching using the label dictionary stored in the label dictionary area 13e of the storage device 13.
  • FIG. 10 schematically shows a typical data structure of a label dictionary applied in the present embodiment.
  • the label dictionary includes an image serving as a reference for the label (that is, a reference image), a number indicating the type of the label, a discount amount, a discount rate, or the number of points. Are stored in advance.
  • the label recognizing unit 205 detects an area matching the reference image from the frame F1 by the template matching described above. That is, it is assumed that the label recognition unit 205 detects a label. In this case, the label recognition unit 205 acquires a label recognition result 224 related to the detected label for each detected label.
  • the label recognition result 224 includes a set of a detected label type (more specifically, a number indicating the type) and a discount amount, a discount rate, or the number of points.
  • the label recognition result 224 further includes the coordinates of the detected label, for example, the center coordinates of the label. In the present embodiment, the center coordinates of the label are the X coordinate and the Y coordinate of the center of the circumscribed rectangle of the label.
  • the label recognition unit 205 stores the number of detected labels and the acquired label recognition result 224 in the work data area 13c as follows. First, the label recognition unit 205 sets the number of detected labels to a variable L. For each detected label, the label recognition unit 205 sets the X and Y coordinates of the center of the circumscribed rectangle of the label in the elements (variables) s [i] and t [i] of the arrays s and t. To do. However, i is a number used for identifying the detected label, unlike the case of the operation of the data code reading unit 204 described above.
  • the label recognizing unit 205 assigns the number representing the type of the label to the element ⁇ [i] of the array ⁇ , and the discount amount, the discount rate, or the number of points of the label to the element ⁇ of the array ⁇ . Set each to [i].
  • the moving object detection unit 203 detects the moving object from the moving image 221
  • the data code reading unit 204 detects the barcode from the frame F1
  • the label recognition unit 205 detects the label image from the frame F1. May be sequentially executed on the same thread, or may be executed in parallel by a plurality of threads and CPU cores, and the execution order thereof may be arbitrarily determined.
  • the association unit 206 uses a method described later to detect the moving object detection result 222 by the moving object detection unit 203, the decoding result 223 by the data code reading unit 204, the label recognition unit 205 by the label recognition unit 205, and the like. Based on the above, the following association is executed. That is, the associating unit 206 checks the positional relationship between the label recognized by the label recognizing unit 205, the barcode decoded by the data code reading unit 204, and the moving object detected by the moving object detecting unit 203. Then, the associating unit 206 associates the label recognition result obtained by recognizing the label on the same object as the barcode with the barcode decoding result.
  • the associating unit 206 initializes all the elements of the arrays P and Q to 0.
  • the number M1 [u [i] / Z, v [i] / Z] of the moving object is obtained.
  • the associating unit 206 sets i to the element P [M1 [u [i] / Z, v [i] / Z]] of the array P.
  • the body number M1 [s [i] / Z, t [i] / Z] is acquired.
  • associating unit 206 sets i to element Q [M1 [s [i] / Z, t [i] / Z]] of array Q.
  • the association data 225 is stored in the work data area 13c by the operation of the arrays P and Q by the association unit 206 described above.
  • the associating unit 206 recognizes the barcode decoding result detected on the moving object and the label detected on the moving object for each detected moving object by operating the arrays P and Q. Associate the result.
  • the decoding result of the barcode is associated with the recognition result of the label detected on the object on which the barcode is written (that is, the same object).
  • the surface of the object on which the barcode is written that is, the barcode surface
  • the surface of the object to which the label is attached need not be the same surface.
  • the update unit 207 performs the following work data update processing (history update processing) by a method described later.
  • the history update unit 207a of the update unit 207 performs the following work data update process (history update process) every time the association by the association unit 206 is completed.
  • the increment of h [j] in the above-described history update process is 1 (a constant value).
  • the history update unit 207a may adjust the increment of h [j] to be proportional to the time interval between frames. After time, h [j] can be made to reach a certain value.
  • the list update unit 207b of the update unit 207 also performs work data update processing every time the association by the association unit 206 is completed.
  • the list array ⁇ that is, the list array ⁇ of the barcode decoding result 223
  • the list array ⁇ that is, the list array ⁇ of the label recognition result 2244
  • the work data update process executed by the list update unit 207b is referred to as a list update process.
  • This list update process is performed as follows.
  • the list updating unit 207b determines that the decoding result d [P [ j]] is added to the list ⁇ [j].
  • a label recognition result composed of a combination of the type number ⁇ [Q [j]] and the discount amount, the discount rate, or the number of points ⁇ [Q [j]] is added to the list ⁇ [j].
  • the barcode decoding result 223 and the label recognition result 224 are output by the output unit 208 by the method described later.
  • the output unit 208 combines the barcode decoding result 223 and the label recognition result 224 associated with the decoding result 223 by the association data 225 at the timing determined by the value of the variable C1. And output to the POS terminal via the serial input / output interface 18. The operation of the output unit 208 will be described in more detail.
  • the output unit 208 determines whether or not the j-th list ⁇ [j] in the list array ⁇ (that is, the list array ⁇ of the label recognition result 224) is an empty list. If the list ⁇ [j] is not an empty list, and thus has a label associated with the jth moving object (ie, a label associated with the barcode), the output unit 208 outputs the list ⁇ [j].
  • the information that is, the label recognition result 224) composed of the label type number stored in the first element and the discount amount, the discount rate, or the number of points is output via the input / output controller 14 and the serial input / output interface 18. To do.
  • FIG. 11 shows an example of output contents when there is no label associated with the barcode.
  • FIG. 12 shows an example of output contents when there is a label associated with a barcode.
  • the output unit 208 determines whether or not the j-th list ⁇ [j] in the list array ⁇ (that is, the list array ⁇ of the label recognition result 224) is an empty list. If the list ⁇ [j] is not an empty list, and thus has a label associated with the jth moving object (ie, a label associated with the barcode), the output unit 208 outputs the list ⁇ [j].
  • the information composed of the label type number stored in the first element and the discount amount, the discount rate, or the number of points is output via the input / output controller 14 and the serial input / output interface 18. At this time, the output unit 208 sets 1 to f [j]. Accordingly, it is possible to prevent the barcode decoding result of the same moving object (the same object) and the recognition result of the label of the same moving object from being output twice or more.
  • the warning unit 209 detects the barcode on the moving object when the moving object detected by the moving object detection unit 203 is not detected, even though the label is detected on the moving object.
  • the state that is not performed is detected as a state that satisfies the first warning condition.
  • a voice message that prompts the operator (or customer) of the POS terminal to hold the barcode surface of the product over the camera 17 such as “Please hold the barcode” is used.
  • the message may be composed of a character string, sent to the POS terminal via the serial input / output interface 18, and displayed on the display screen of the POS terminal.
  • the warning unit 210 detects a state where a label with a different recognition result is detected for the same object detected by the moving object detection unit 203 as a state satisfying the second warning condition. Specifically, the warning unit 210 determines that the second warning condition is satisfied when the number of different elements in the list ⁇ [j] is two or more. In this case, the warning unit 210 outputs a message or warning sound from the speaker 19.
  • the above-described determination is based on both the lists ⁇ [j] and ⁇ 2 [j] as follows. May be done.
  • the warning unit 210 compares the recognition result list ⁇ 2 [j] one frame before and the current recognition result list ⁇ [j], and detects a frame in which the number of different elements is changed from 1 to 2. It may be determined that the second warning condition is satisfied only in the case where
  • the correction input unit 211 requests input of the corrected label recognition result. That is, when a label with a different label recognition result is detected for the same object detected by the moving object detection unit 203, the correction input unit 211 inputs the corrected label recognition result to the operator of the POS terminal. Request. Specifically, the correction input unit 211 sends a first request message for prompting input of the corrected label recognition result to the POS terminal via the serial input / output interface 18. This first request message is displayed on the display screen of the POS terminal.
  • the operator of the POS terminal inputs the label recognition result corrected by operating the POS terminal in response to the first request message.
  • the corrected label recognition result includes a set of a number indicating the type of the corrected label and a corrected discount amount, a discount rate, or the number of points.
  • the POS terminal returns a first response message including the corrected label recognition result to the moving image recognition apparatus 10 via the serial input / output interface 18.
  • the correction input unit 211 receives the first response message returned from the POS terminal via the input / output controller 14. Then, the correction input unit 211 decodes the first response message to obtain a set of the corrected label recognition result, that is, the number indicating the type of the corrected label and the corrected discount amount, the discount rate, or the number of points. get.
  • the correction input unit 211 replaces the list ⁇ [j] of the label recognition result of the corresponding object (the object with the number j) with a list including only one structure containing the acquired label recognition result.
  • FIG. 13 shows an example of the first request message
  • FIG. 14 shows an example of the first response message.
  • the warning unit 210 may make the above determination. Further, the correction input unit 211 may perform the determination at this timing. However, the determination at this timing needs to be performed based on the number of different elements of ⁇ 2 [i], not the number of different elements of ⁇ [j]. That is, when the number of different elements of ⁇ 2 [i] is two or more, it is only necessary to request input of a corrected label recognition result.
  • the warning unit 213 determines that the third warning condition is satisfied when the number of different elements in the list ⁇ [j] is two or more. That is, when the number of different elements in the list ⁇ [j] is two or more, the warning unit 213 decodes the same object among the moving objects detected by the moving object detection unit 203 by the data code reading unit 204. It is determined that 223 different barcodes have been detected. In this case, the warning unit 213 outputs a message or warning sound from the speaker 19.
  • the above determination is based on both the lists ⁇ [j] and ⁇ 2 [j] as follows: May be done. That is, the warning unit 210 compares the recognition result list ⁇ 2 [j] of the previous frame with the current recognition result list ⁇ [j], and detects a frame in which the number of different elements has changed from 1 to 2. It may be determined that the second warning condition is satisfied only in the case where
  • the correction unit 214 sends a second request message for prompting input of the corrected decoding result to the POS terminal via the serial input / output interface 18. This second request message is displayed on the display screen of the POS terminal.
  • the operator of the POS terminal inputs the decoding result corrected by operating the POS terminal (that is, the decoding result of a single barcode).
  • the POS terminal returns a second response message including the corrected decoding result to the moving image recognition apparatus 10 via the serial input / output interface 18.
  • the correction unit 214 receives the second response message returned from the POS terminal via the input / output controller 14. Then, the correction unit 214 acquires the corrected decoding result by decoding the second response message.
  • the correction unit 214 replaces the list of barcode decoding results of the corresponding object with a list including only one structure containing the acquired decoding results.
  • FIG. 15 shows an example of the second request message
  • FIG. 16 shows an example of the second response message.
  • a warning is issued immediately before the output unit 208 outputs the combination of the barcode decoding result and the label recognition result for the corresponding moving object.
  • the unit 213 may make the above determination.
  • the correction unit 214 may perform the determination at this timing. However, the determination at this timing needs to be performed based on the number of different elements of ⁇ 2 [i], not the number of different elements of ⁇ [j]. That is, when the number of different elements of ⁇ 2 [i] is two or more, it is only necessary to request input of a corrected decoding result.
  • the selection of the decoding content by the majority decision is performed, for example, at a timing immediately before the output unit 208 outputs the barcode decoding result and the label recognition result regarding the same object.
  • the majority decision selection unit 215 sets the largest number of decoding results in the list ⁇ 2 [i] as new decoding results.
  • Majority selection section 215 sets ⁇ [i] and ⁇ 2 [i] to a list including only this new decoding result.
  • the associating unit 206 associates the barcode decoding result detected from the same object among the moving objects detected by the moving object detecting unit 203 with the label recognition result. As a result, even when the barcode and the label (that is, the label such as the discount label) are arranged at a place where they do not fit in the same frame, they can be associated with each other.
  • the warning unit 209 detects that the bar is not detected when the barcode is detected on the moving object even though the label is detected on the moving object when the moving object is not detected. A message or warning sound is issued to urge the operator to hold the code (barcode surface) over the camera 17 (moving image capturing apparatus). As a result, the frequency with which the operator forgets to hold the barcode over the camera 17 can be reduced.
  • the warning unit 210 (correction input unit 211) displays a message or warning sound (corrected) when a label with a different recognition result is detected for the same object among the moving objects detected by the moving object detection unit 203.
  • This message or warning sound prompts the operator to input a corrected label recognition result.
  • the determination unit 212 determines a recognition result by majority vote when a label with a different recognition result is detected for the same object. Thereby, the influence of the misrecognition of a label can be reduced.
  • the warning unit 213 (input unit 214), when a barcode with a different decoding result is detected for the same object, a message or warning sound (message or warning sound for prompting input of the corrected decoding result) To emit. Thereby, it is expected that correct information regarding the barcode is input. Therefore, the influence of barcode decoding errors can be reduced.
  • the majority decision selection unit 214 selects the content of decoding by majority decision when barcodes having different decoding results are detected for the same object. As a result, it is possible to reduce the influence of barcode decoding errors.
  • a barcode one-dimensional barcode
  • another data code for example, a two-dimensional barcode such as a QR code (registered trademark) may be applied.
  • a moving image recognition apparatus capable of associating both from a moving image even when the data code and the label are arranged so as not to fit within the same frame.
  • a moving image recognition method can be provided.

Abstract

 実施形態によれば、動画像認識装置は、動物体検出部とデータコード読み取り部とラベル認識部と関連付け部と出力部とを具備する。動物体検出部は、バッファ部に格納された動画像から動物体を検出してその各々を識別する。データコード読み取り部は、前記動画像のフレームの各々からデータコードを検出し、デコードする。ラベル認識部は、前記動画像のフレームの各々からラベルを検出し、認識する。関連付け部は、前記認識されたラベルと前記デコードされたデータコードとが同一物体上にある場合、両者を関連付ける。出力部は、前記データコードのデコード結果と当該デコード結果に関連付けられた前記ラベルの認識結果とを併せて出力する。

Description

動画像認識装置及び動画像認識方法
 本発明の実施形態は、入力された動画像中のデータコードと値引きラベルのようなラベルとを関連付けて認識する動画像認識装置及び動画像認識方法に関する。
 商品に記されたデータコード(例えばバーコード)を処理するシステムとして、販売時点管理(POS)システムが知られている。POSシステムは、スーパーマーケットのような小売店で用いられるのが一般的である。POSシステムは、顧客が購入した商品それぞれに記されたデータコードを読み取って(デコードして)得られる商品コードに基づき、当該POSシステムに登録された当該商品の商品単価を取得して、その合計金額を算出する。
 小売店で扱われる商品の中に、例えば値引き額が記されたラベル(以下、値引きラベルと称する)が貼付された商品が含まれることがある。このためPOSシステムには、値引きラベルが貼付された商品の値引き処理を効率的に行うことが要求される。そこで近年は、このような要求に応える技術が提案されている。この技術は、データコードが記された商品の面を撮影することにより取得される画像を利用する。つまり、この技術は、取得された同一画像内からデータコードと値引きラベルとが検出された場合に、前記データコードのデコード結果と前記値引きラベルの認識結果とを併せて出力する。
 このような技術(以下、従来技術と称する)を適用するPOSシステムによれば、データコードのデコード結果と併せてラベルの認識結果が出力される場合に、前記値引きラベルに記された値引き額で商品単価を自動的に減額することができる。つまり、オペレータの操作を要することなく値引き操作ができる。また、値引きラベルに代えて、割引率が記された割引ラベルまたは付与されるポイント数が記されたポイント付与ラベルを用いる場合にも、POSシステムは同様に処理できる。
特許第4422706号公報
 上述の従来技術は、値引きラベルのようなラベルが商品のデータコードと同時に撮影できる面に貼付されている必要がある。もし、商品のデータコードとは同時に撮影できない面にラベルが貼付されている場合、当該ラベルは、当該データコードを撮影することにより取得される画像に含まれない。例えば、牛乳パックの表側(第1の面)にデータコードが印刷され、当該牛乳パックの裏側(第1の面とは異なる第2の面)にラベルが貼付されている場合、同一画像内にデータコードとラベルの両方を含めることはできない。このように、ラベルが、商品のデータコードと一緒に同一画像に収まらないような配置で当該商品に貼付されている場合、従来技術では、データコードとラベルとを関連付けることは難しい。もし、このような関連付けができないならば、値引き処理(または割引処理またはポイント付与処理)を正しく行うことは難しい。
 本発明が解決しようとする課題は、データコードとラベルとが、同一物体の異なる面に配置されている場合でも、動画像から両者の関連付けを行うことができる動画像認識装置及び動画像認識方法を提供することにある。
 実施形態によれば、動画像認識装置は、動画像入力部と、バッファ部と、動物体検出部と、データコード読み取り部と、ラベル認識部と、関連付け部と、出力部とを具備する。動画像入力部は、動画像を入力する。バッファ部は、前記入力された動画像を格納する。前記動物体検出部は、前記バッファ部に格納された前記動画像から動物体を検出してその各々を識別する。前記データコード読み取り部は、前記動画像のフレームの各々からバーコードや二次元バーコード等のデータコードを検出して、当該検出されたデータコードをデコードする。前記ラベル認識部は、前記動画像のフレームの各々からラベルを検出して、当該検出されたラベルに記されたシンボルを認識する。前記関連付け部は、前記認識されたラベルと前記デコードされたデータコードとが、前記識別された動物体のうちの同一物体上にある場合に、前記ラベルの認識結果を前記データコードのデコード結果に関連付ける。前記出力部は、前記データコードのデコード結果と当該デコード結果に関連付けられた前記ラベルの認識結果とを併せて出力する。
図1は、実施形態に係る動画像認識装置の典型的なハードウェア構成を示すブロック図である。 図2は、前記動画像認識装置の機能構成を主として示すブロック図である。 図3は、図1に示される動画像領域におけるN個のポインタとN個のバッファとの対応関係の例を示す図である。 図4は、図3の状態から1フレーム後の、動画像領域におけるN個のポインタとN個のバッファとの対応関係の例を示す図である。 図5は、動画像のフレームを格納するバッファの大きさと当該バッファ内の座標系の例を示す図である。 図6は、フレームと小区画との関係の例を示す図である。 図7は、フレーム内の小区画の大きさと座標の例を示す図である。 図8は、動物体の番号を格納する2次元配列の例を模式的に示す図である。 図9は、同実施形態で適用されるブロックマッチングの様子を示す図である。 図10は、同実施形態で適用されるラベル辞書の典型的なデータ構造を模式的に示す図である。 図11は、バーコードに関連付けられたラベルが無い場合の出力内容の例を示す図である。 図12は、バーコードに関連付けられたラベルが有る場合の出力内容の例を示す図である。 図13は、修正されたラベル認識結果の入力を促すための第1の要求メッセージの例を示す図である。 図14は、前記第1の要求メッセージに対応する第1の応答メッセージの例を示す図である。 図15は、修正されたデコード結果の入力を促すための第2の要求メッセージの例を示す図である。 図16は、前記第2の要求メッセージに対応する第2の応答メッセージの例を示す図である。
 以下、実施の形態につき図面を参照して説明する。 
 図1は、実施形態に係る動画像認識装置10の典型的なハードウェア構成を示すブロック図である。本実施形態において動画像認識装置10は、POSシステムの一要素として動作する。動画像認識装置10は、例えば、パーソナルコンピュータ(PC)11を用いて実現される。PC11は、CPU12、記憶装置13、入出力コントローラ14及びシステムバス15を備えている。CPU12、記憶装置13及び入出力コントローラ14は、システムバス15によって相互接続されている。PC11はまた、ビデオ端子16を備えている。
 CPU12は、動物体の検出、データコードの読み取り(デコード)及びラベルの認識を含む情報処理を実行する。本実施形態では、データコードはバーコード(1次元バーコード)であるものとする。また、動物体は例えば商品である。この商品が動物体として検出されるためには、例えば、POSシステム内のPOS端末のオペレータには、次のような操作が要求される。この操作は、オペレータが前記商品をつかんで、後述するカメラ17の撮像範囲に移動する(つまりカメラ17にかざす)ことである。なお、セルフレジの場合には、顧客自身が上述の操作を行うことになる。
 商品は、一般にバーコードが記されたバーコード面を有する。バーコードが記されたバーコード面は、バーコードが印刷された商品の面だけでなく、バーコードシールが貼付された商品の面をも指す。バーコードシールには、バーコードが印刷されている。また前記商品には、値引きラベル、割引ラベルまたはポイント付与ラベルのようなラベルが貼付されることもある。値引きラベルには値引き額が記され、割引ラベルには割引率が記され、ポイント付与ラベルには、付与されるポイント数が記される。
 記憶装置13は、RAM部、ROM部及びフラッシュメモリ部から構成される。RAM部は少なくとも1つのRAMを用いて構成され、ROM部は少なくとも1つのROMを用いて構成され、フラッシュメモリ部は少なくとも1つのフラッシュメモリ(つまり、書き換え可能な不揮発性メモリ)を用いて構成される。
 記憶装置13は、ソフトウェア領域13a、動画像領域13b、作業データ領域13c、設定データ領域13d及びラベル辞書領域13eを備えている。ソフトウェア領域13aは、例えばROM部内に確保される。動画像領域13b及び作業データ領域13cは、例えばRAM部内に確保される。設定データ領域13d及びラベル辞書領域13eは、例えばフラッシュメモリ部内に確保される。ROM部、RAM部及びフラッシュメモリ部の記憶領域は、CPU12によって認識される同一のアドレス空間内に割り当てられる。これによりCPU12は、ROM部、RAM部またはフラッシュメモリ部を意識することなく、用途に応じてソフトウェア領域13a、動画像領域13b、作業データ領域13c、設定データ領域13d及びラベル辞書領域13eにアクセスする。
 ソフトウェア領域13aは、前記情報処理のためのソフトウェアを格納するのに用いられる。このソフトウェアは、命令コード、定数、各種テーブル、変数の初期値を含む。動画像領域13bは、動画像を格納するのに用いられる。動画像は、例えばビデオ端子16及び入出力コントローラ14を介して入力される。
 作業データ領域13cは、前記情報処理のための作業データを格納するのに用いられる。作業データは、バーコードのデコード結果及びラベルの認識結果を含む。設定データ領域13dは、後述する設定データを格納するのに用いられる。ラベル辞書領域13eは、後述するラベル辞書を格納するのに用いられる。
 入出力コントローラ14は、動画像を取得する撮像装置、例えばカメラ17と、ビデオ端子16を介して接続されている。入出力コントローラ14は、カメラ17によって取得された動画像を入力して、当該動画像を例えばダイレクトメモリアクセス(DMA)により記憶装置13に転送する。入出力コントローラ14はまた、入出力インタフェース、例えばシリアル入出力インタフェース18を介して、POS端末と接続されている。入出力コントローラ14は、CPU12(CPU12によって実行されるソフトウェア)の制御の下で、動画像認識装置10の処理結果を、シリアル入出力インタフェース18を介して出力する。動画像認識装置10の処理結果は、バーコードのデコード結果、ラベルの認識結果及び領域検出結果を含む。入出力コントローラ14はまた、POS端末から転送されるデータ(例えば、修正データ)を、シリアル入出力インタフェース18を介して入力する。入出力コントローラ14は更にスピーカ19と接続されている。入出力コントローラ14は、メッセージまたは警告音をスピーカ19から出力する。
 図2は、動画像認識装置10の機能構成を主として示すブロック図である。この機能構成は、図1に示されるPC11のCPU12が前記ソフトウェアを実行することにより実現されるものとする。動画像認識装置10は、動画像入力部201、バッファ部202、動物体検出部203、データコード読み取り部204、ラベル認識部205、関連付け部206、更新部207、出力部208、警告部(第1の警告部)209(#1)、警告部(第2の警告部)210(#2)、修正入力部211、決定部212、警告部(第3の警告部)213(#3)、修正部214及び多数決選択部215を備えている。本実施形態では、これらの要素201乃至215のうち、バッファ部202を除く要素は、ソフトウェアモジュールにより構成される。しかし、これらのソフトウェアモジュールの一部または全部がハードウェアモジュールに置き換えられても構わない。バッファ部202は、記憶装置13の動画像領域13bを用いて構成される。
 動画像入力部201は、入出力コントローラ14によって転送された動画像221を入力する。バッファ部202は、動画像221を格納するのに用いられる。より詳細に述べるならば、バッファ部202は、動画像221のフレームのうちの連続するN個のフレームを時系列順に一時格納するのに用いられる。動物体検出部203は、動画像221から動物体を検出して、当該動物体をそれぞれ識別する。これにより動物体検出部203は、動物体の検出結果222を取得する。動物体検出部203は、物体番号決定部203aを含む。物体番号決定部203aは、検出された動物体を識別するため番号を決定する。
 データコード読み取り部204は、動画像221のフレームの各々からデータコードを検出して、当該データコードをデコードする。本実施形態においてデータコード読み取り部204で検出しデコードするデータコードはバーコードであるものとする。従って、本実施形態におけるデータコード読み取り部204は、動画像221のフレームの各々からバーコードを検出して、当該バーコードをデコードする。つまりデータコード読み取り部204は、動画像221のフレームの各々からバーコードを読み取る。これによりデータコード読み取り部204は、バーコードのデコード結果223を取得する。
 ラベル認識部205は、動画像221のフレームの各々からラベルを検出して、当該ラベルに記された(例えば印刷された)シンボルを認識する。これによりラベル認識部205は、ラベル認識結果224を取得する。ラベル認識結果224は、ラベルが値引きラベル、割引ラベルまたはポイント付与ラベルのいずれであるかを示す種別(ラベル種別)と、値引き額、割引率またはポイント数とを含む。
 関連付け部206は、ラベル認識結果224によって認識されたラベルとデータコード読み取り部204によってデコードされたバーコードとが同一物体上に存在するかを、動物体の検出結果222に基づいて判定する。この判定の手法については後述する。前記ラベル及び前記バーコードが同一物体上に存在する場合、関連付け部206は、前記ラベルに対応するラベル認識結果224を前記バーコードに対応するデコード結果223に関連付ける。これにより関連付け部206は、ラベル認識結果224がデコード結果223に関連付けられた関連付けデータ225を取得する。
 更新部207は、履歴更新部207a及びリスト更新部207bを含む。履歴更新部207aは、関連付け部206による関連付けが完了する度に、作業データ226の一部を更新する。作業データ226については後述する。リスト更新部207bは、関連付け部206による関連付けが完了する度に、バーコードのデコード結果223のリストの配列Λ、及びラベル認識結果223のリストの配列Γを更新する。配列Λ及びΓについては後述する。
 出力部208は、前記バーコードのデコード結果223と、当該デコード結果223に関連付けられたラベル認識結果224とを併せて出力する。警告部209は、デコード結果223、ラベル認識結果224及び関連付けデータ225に基づいて、第1の警告条件が成立しているかを判定する。第1の警告条件とは、動物体検出部203によって検出された動物体上でラベルが検出されているにも拘わらず、当該動物体が検出されなくなるまでに当該動物体上のバーコードが検出されなかった状態を指す。このため警告部209は、動物体検出部203によって検出されていた動物体が検出されなくなった際に、前記第1の警告条件が成立しているかを判定する。前記第1の警告条件が成立している場合、警告部209は、入出力コントローラ14を介してメッセージまたは警告音を発する。
 警告部210は、ラベル認識結果224及び関連付けデータ225に基づいて、第2の警告条件が成立しているかを判定し、当該第2の警告条件が成立している場合に、入出力コントローラ14を介してメッセージまたは警告音を発する。第2の警告条件は、動物体検出部203によって検出された動物体のうちの同一物体について、ラベル認識部205によって認識結果の異なるラベル(つまり異なるラベル認識結果224)が検出された状態を指す。
 修正入力部211は、前記第2の警告条件が成立している場合に、POS端末のオペレータに修正されたラベル認識結果の入力を要求する。決定部212は、前記第2の警告条件が成立している場合に、前記ラベル種別と、値引き額または割引率またはポイント数とを、多数決により決定する。
 警告部213は、デコード結果223及び関連付けデータ225に基づいて、第3の警告条件が成立しているかを判定し、当該第3の警告条件が成立している場合に、入出力コントローラ14を介してメッセージまたは警告音を発する。第3の警告条件は、動物体検出部203によって検出された動物体のうちの同一物体について、データコード読み取り部204によってデコード結果223の異なるバーコード(つまり異なるデコード結果223)が検出された状態を指す。
 修正部214は、前記第3の警告条件が成立している場合に、POS端末のオペレータにデコード結果(デコード内容)の修正を求める。多数決選択部215は、前記第3の警告条件が成立している場合に、多数決でデコード結果223を選択する。
 次に本実施形態の動作を説明する。まず、POS端末のオペレータは、顧客が購入した商品を例えば買い物かごから取り出して、当該商品をカメラ17の撮像範囲に移動する。カメラ17は、前記商品(つまり動物体)を含む撮像範囲内の対象物の動画像を取得する。そこでオペレータは、前記商品のバーコード面に記されたバーコード及び前記商品に貼付されたラベルがカメラ17で撮像されるように、前記商品をカメラ17に向ける。もし、ラベルがバーコード面とは異なる面に貼付されているならば、バーコード面及びラベルが順次カメラ17の撮像範囲に入るように、オペレータは前記商品のカメラ17に対する向きを適宜変える。
 入出力コントローラ14は、カメラ17によって取得された動画像を、ビデオ端子16を介して受け取る。入出力コントローラ14は、受け取った動画像を例えばDMAにより記憶装置13に転送する。動画像入力部201は、入出力コントローラ14によって転送された動画像が動画像領域13b内のバッファ部202にフレーム単位で格納されるように、入出力コントローラ14を制御する。
 図3は図1に示される動画像領域13bの一例を示す。動画像領域13bには、バッファ部202が確保される。バッファ部202は、N個のバッファ(フレームバッファ)A1,A2,A3,…,AN-1,ANから構成される。バッファA1乃至ANは、動画像のフレームのうちの連続するN個のフレームを時系列順に一時格納するのに用いられる。このためバッファA1乃至ANは、リングバッファとして用いられる。
 動画像領域13bにはまた、N個のポインタP1,P2,P3,…,PN-1,PNの領域が確保される。ポインタP1は、動画像の最新のフレームが格納されるバッファの位置(例えば先頭アドレス)を指し示す。ポインタP2は、最新のフレームよりも1フレームだけ前のフレームが格納されるバッファの位置を指し示す。同様に、ポインタPN-1は、最新のフレームよりもN-1フレームだけ前のフレームが格納されるバッファの位置を指し示す。ポインタPNは、現在読み込み中のフレームが格納されるバッファの位置を指し示す。
 このように図3は、動画像領域13bにおけるポインタP1乃至PNとバッファA1乃至ANとの対応関係を示す。ポインタP1乃至PNは、動画像入力部201によって更新される。なお、ポインタP1乃至PNが、動画像領域13b以外の記憶領域、例えば作業データ領域13cに格納されていても構わない。
 今、ポインタP1が、バッファAi(iは1乃至Nのいずれか)を指し示しているものとする。このとき、ポインタP2はAi+1 MOD Nを指し示す。ただし、x MOD y はxをyで割った剰余を示す。
 動画像入力部201は、動画像の入力が1フレーム完了する毎にポインタP1乃至PNを更新する。このような入力フレームの完了は、ビデオ端子16を通して得られる垂直同期信号でトリガーされる入出力コントローラ14からの割り込みによって、動画像入力部201に通知される。動画像入力部201は、入出力コントローラ14からの割り込みの都度、ポインタP1乃至PNを更新する。動画像入力部201はまた、ポインタP1乃至PNを更新する都度、入出力コントローラ14によるDMA転送のための設定を行う。つまり動画像入力部201は、ビデオ端子16を介して入力される動画像を1フレームだけポインタPNの指し示すバッファに、入出力コントローラ14によってDMAにより転送させる。動画像入力部201はまた、ポインタP1乃至PNを更新する都度、後述するフレーム処理を行うスレッドを生成し、CPU12に実行させる。
 ここで、ポインタP1乃至PNの更新においては、1乃至Nの各々について、以下の規則でポインタPjを更新する。ポインタPjが指しているバッファの番号をiとすると(ポインタPjがバッファAiを指しているものとすると)、更新後のバッファの番号はi+1 MOD Nである。ただし、x MOD yはxをyで割った場合の剰余を表すものとする。
 ここで、ポインタP1乃至PNとバッファA1乃至ANとの関係の具体例について、図3及び図4を参照して説明する。図3は、前述の説明から明らかなように、バッファANが現在読み込み中のフレームの格納に用いられている状態における、ポインタP1乃至PNとバッファA1乃至ANとの対応関係の例を示す。図4は、図3の状態から1フレーム後の、ポインタP1乃至PNとバッファA1乃至ANとの対応関係の例を示す。
 図3の例では、ポインタP1はバッファA1を、ポインタP2はバッファA2を、そしてポインタP3はバッファA3を、それぞれ指し示している。同様に、ポインタPN-1はバッファAN-1を、そしてポインタPNはバッファANを、それぞれ指し示している。このとき、ポインタPNの指し示すバッファANは、現在読み込み中のフレームを格納するのに用いられている。このバッファANへのフレームの読み込みが完了したものとする。
 この場合、動画像入力部201は、ポインタP1を、図4に示すように、バッファA1を示すアドレスからバッファANを示すアドレスに更新する。この更新されたポインタP1により、バッファAN(つまり直前に読み込みの完了したバッファAN)が、最新のフレームを格納するバッファであることが示される。また動画像入力部201は、ポインタP2を、バッファA2を示すアドレスからバッファA1を示すアドレスに更新し、ポインタP3を、バッファA3を示すアドレスからバッファA2を示すアドレスに更新する。同様に動画像入力部201は、図4では省略されているが、ポインタP4乃至PN-2を、それぞれバッファA3乃至AN-3を示すアドレスに更新する。動画像入力部201はまた、ポインタPN-1を、バッファAN-1を示すアドレスからバッファAN-2を示すアドレスに更新し、ポインタPNを、バッファANを示すアドレスからバッファAN-1を示すアドレスに更新する。これにより、バッファAN-1は、新たなフレームの読み込みに用いられる。バッファAN-1は、バッファANへのフレームの読み込みが完了した時点で最も古いフレームを格納していたバッファである。
 上述のポインタP1乃至PNの更新により、バッファA1乃至AN-2に格納されているフレームは、バッファANに読み込まれた最新のフレームよりも、それぞれ1フレーム乃至N-2フレーム前となる。このように本実施形態では、バッファA1乃至ANはリング状に順番に用いられ、フレーム入力に応じて更新されるポインタP1によって指し示されるバッファを起点に時間的に連続するフレームがバッファ部202に格納される。つまりバッファA1乃至ANはリングバッファとして用いられる。
 図5は、動画像のフレーム(つまりフレーム画像)を格納するバッファAi(i=1,2,…,N)の大きさと当該バッファAi内の座標系の例を示す。バッファAiは、横幅がW画素、高さがH画素の2次元バッファである。ここでは、バッファAiは、フレームと同サイズであるものとする。つまりバッファAiに格納されるフレームのサイズは、横幅がW画素、高さがH画素である。バッファAi(フレーム)の左上角の画素(画素位置)の座標は(0,0)であり、当該バッファAi(フレーム)の右下角の画素(画素位置)の座標は(W-1、H-1)であるものとする
 ここで、設定データ領域13dに格納される設定データについて説明する。動画像認識装置10では、前記設定データの内容に応じて動作が切り替えられる。前記設定データは、変数C1,C2及びC3を含む。変数C1は、出力部208による出力のタイミングを切り替えるのに用いられる。変数C2は、同一物体についてラベル認識結果224の異なるラベルが検出された場合の動作を切り替えるのに用いられる。変数C3は、同一物体についてデコード結果223の異なるバーコードが検出された場合の動作を切り替えるのに用いられる。
 変数C1,C2及びC3は前記設定データとして例えばフラッシュメモリ部内に格納され、本発明に基づく動画像認識装置の製造時にフラッシュメモリに書き込まれる他のデータと共に設定される。
 出力部208による出力を、バーコードの検出から一定の時間またはフレーム数が経過した後に行わせる場合、変数C1には例えば1を設定する。また、出力部208による出力を、バーコードを含む物体が検出されなくなるまで待ってから行わせる場合、変数C1には例えば2を設定する。また、出力部208による出力を、バーコードの検出から一定の時間またはフレーム数が経過するか、或いはバーコードを含む物体が検出されなくなくなってから行わせる場合、変数C1には例えば3を設定する。
 また、前記第2の警告条件が成立したために警告部210によりメッセージまたは警告音を発行させた上で、修正された認識結果の入力を修正入力部211によりオペレータに求めさせる場合、変数C2には例えば1を設定する。また、前記第2の警告条件が成立したために、ラベルの種別と値引き額または割引率またはポイント数を決定部212により多数決で決定させる場合、変数C2には例えば2を設定する。
 また、前記第3の警告条件が成立したために警告部213によりメッセージまたは警告音を発行させた上で、デコード内容の修正を修正部214によりオペレータに求めさせる場合、変数C3には例えば1を設定する。また、前記第3の警告条件が成立したために多数決選択部215により多数決でデコード結果223を選択させる場合、変数C3には例えば2を設定する。
 以上の説明では、変数C1,C2及びC3を製造時に設定するものとしたが、フラッシュメモリを取り出してフラッシュライターでこれらの変数を再設定するなどして、本装置の動作を変更しても良い。
 次に、記憶装置13の作業データ領域13cに格納される作業データについて説明する。前記作業データは、予め定められたサイズKの配列(配列データ)Eを含む。配列Eは、物体番号決定部203aによって決定される動物体の番号に対応する当該動物体の有無を記録するのに用いられる。動物体の番号は、番号jに対応する動物体が有る場合、配列Eのj番目の要素E[j]には、例えば1が設定される。そうでない場合、要素E[j]には、例えば0が設定される。
 前記作業データは、サイズKの配列P及びQを更に含む。配列P及びQは、動物体の番号に対応するバーコードの番号及びラベルの番号を格納するのに用いられる。番号jの動物体が存在し、且つ当該動物体上にバーコードが存在する場合、配列Pのj番目の要素P[j]には、当該バーコードの番号が設定される。そうでない場合、要素P[j]には、例えば0が設定される。また、番号jの動物体が存在し、且つ当該動物体上にラベルが存在する場合、配列Qのj番目の要素Q[j]には、当該ラベルの番号が設定される。そうでない場合、要素Q[j]には、例えば0が設定される。
 前記作業データは、配列dを更に含む。配列dは、バーコードの番号に対応するデコード結果を収めるのに用いられる。 
 前記作業データは、変数Lと、配列(配列変数)s及びtとを更に含む。変数Lは、ラベル認識部205によって検出されたラベルの個数を表すのに用いられる。配列s及びtは、検出されたラベルの座標を格納するのに用いられる。配列s及びtのi番目の要素s[i]及びt[i]には、i番目(i=1,…,L)のラベルのX座標及びY座標が格納される。ここでは、i番目のラベルのX座標及びY座標として、当該ラベルの外接矩形の中心の座標が用いられる。
 前記作業データは、配列(配列変数)α及びβとを更に含む。配列αは、ラベルの番号に対応するラベルの種別を表す番号を格納するのに用いられる。ラベルの種別を表す番号は、値引きラベルの場合1、割引ラベルの場合2、そしてポイント付与ラベルの場合3である。配列αのi番目の要素α[i]には、i番目(i=1,…,L)のラベルの種別の番号が格納される。配列βは、ラベルの番号に対応する値引き額または割引率またはポイント数を格納するのに用いられる。配列βのi番目の要素β[i]には、i番目のラベルの値引き額または割引率またはポイント数が格納される。
 前記作業データは、配列(配列変数)E2,P2,d2,α2及びβ2を更に含む。配列E2,P2,d2,α2及びβ2は、1フレーム前における、前述の配列E,P,d,α及びβの内容を保持するのに用いられる。
 前記作業データは、配列gを更に含む。配列gは、動物体毎に最初に検出されたバーコードのデコード結果を示す文字列変数の配列である。番号jの動物体が存在し、且つ当該動物体上に存在するバーコードが以前のフレームから検出されている場合、配列gのj番目の要素g[j]には、当該動物体について最初に検出されたバーコードのデコード結果が設定される。そうでない場合、要素g[j]には、例えば空文字列が設定される。
 前記作業データは、配列(配列変数)h,f及びg2を更に含む。配列hは、動物体毎に最初に検出されたバーコードが、何フレーム前で検出されたかを示す。番号jの動物体が存在し、且つ当該動物体上のバーコードが以前のフレームで検出されている場合、配列hのj番目の要素h[j]には、正の整数が設定される。そうでない場合、要素h[j]には、例えば、-1が設定される。h[j]に正の整数が設定されている場合、数値h[j]は、番号jの動物体上のバーコードがh[j]フレーム前で検出されたことを示す。
 配列fは、動物体上のバーコードが既に出力されたか否かを示す。番号jの動物体上のバーコードが出力済みの場合、配列fのj番目の要素f[j]には、例えば1が設定される。そうでない場合、要素f[j]には、例えば0が設定される。
 配列g2は、動物体上でラベルが既に検出されているか否かを示す。番号jの動物体が存在し、且つ当該動物体上のラベルが以前のフレームで検出されている場合、配列g2のj番目の要素g2[j]には、例えば1が設定される。そうでない場合、要素g2[j]には、例えば0が設定される。
 前記作業データは、配列(配列変数)Λ及Γを更に含む。配列Λは、動物体上で検出されたバーコードの認識結果のリストを格納するのに用いられるリスト(リスト変数)の配列である。リストの配列Λにおけるj番目のリスト(リスト変数)Λ[j]の各要素は、番号jの動物体上で検出されたバーコードのデコード結果を格納した構造体である。配列Γは、動物体上で検出されたラベルの認識結果のリストを格納するのに用いられるリスト(リスト変数)の配列である。リストの配列Γにおけるj番目のリスト(リスト変数)Γ[j]の各要素は、番号jの動物体上で検出されたラベルの種別を表す番号と値引き額または割引率またはポイント数とを格納した構造体である。前記作業データは、配列(配列変数)Λ2及びΓ2を更に含む。配列Λ2及びΓ2は、1フレーム前における、上述の配列Λ及びΓの内容を格納するのに用いられる。
 次に、本実施形態の動作について、動画像認識装置10によって実行される動画像認識処理を例に説明する。まず、動画像認識装置10の起動時には、作業データ領域13c内の配列E,P,Q,α,β,d,g,h,f及びg2の要素は全て初期化される。具体的には、配列E,P,Q,α及びβの全要素に0が設定され、配列d及びgの全要素に空文字列が設定される。また配列hの全要素に-1が設定され、配列f及びg2の全要素に0が設定される。同様に、リストの配列Λ,Γ,Λ2及びΓ2の全要素も初期化される。具体的には、配列Λ,Γ,Λ2及びΓ2の全要素に空リストが設定される。
 以下に続く本実施形態の残りの記述では、動画像入力部201が、入出力コントローラ14によって動画像221を1フレームだけ転送し、ポインタP1乃至PNを更新する毎に本実施形態に基づく動画像認識装置10で行うフレーム処理について説明する。
 フレーム処理では、配列E,P,d,α,β,Λ及びΓの内容を配列E2,P2,d2,α2,β2,Λ2及びΓ2にそれぞれ複写する。 
 フレーム処理では次に、動物体検出部203、データコード読み取り部204、ラベル認識部205、関連付け部206、更新部207、出力部208、警告部209、警告部210、修正入力部211、決定部212、警告部213、修正部214及び多数決選択部215が、以下に述べるように動作する。
 説明を簡略化するため以降の説明では、ポインタP1が指し示すバッファに格納された最新のフレームをフレームF1、ポインタP2が指し示すバッファに格納され、前記最新のフレームに先行して格納されたフレームをフレームF2と称するものとする。
 フレーム処理では次に、後述する方法で、動物体検出部203による動画像221からの動物体の検出、データコード読み取り部204による、フレームF1からのバーコードの検出、ラベル認識部205によるフレームF1からのラベル画像の検出と認識を行う。
 動物体検出部203は、バッファ部202に格納された動画像221から動物体を検出する。動物体検出部203は、検出された動物体の各々を識別する。この動物体検出部203の動作の詳細を、以下で説明する。
 動物体検出部203は、フレームF1(フレーム画像)を間隔Z画素の格子状の小区画に分割する。そして動物体検出部203は、前記小区画の各々について、フレームF2(フレーム画像)から前記小区画と最も類似した(つまりマッチングした)領域を探索するための、いわゆるブロックマッチングを行う。
 図6は、フレームと小区画との関係の例を示す。図6の例では、フレームは、間隔がZ画素のA×B個の格子状の小区画に分割される。つまりフレームは、A列、B行のマトリクス状に、A×B個の小区画に分割される。各小区画の位置は、列番号a及び行番号bによって表される。列番号aは、フレームの左端の小区画を起点の番号(=0)として横方向(つまりフレームの右側の方向)に小区画毎にシーケンシャルに付与される番号である。行番号bは、フレームの上端の小区画を起点の番号(=0)として縦方向(つまりフレームの下側の方向)に小区画毎にシーケンシャルに付与される番号である。例えば、フレームの左上角において、小区画の位置(a,b)は(0,0)、フレームの右上角の小区画において(a,b)は(A-1,0)である。また、フレームの左下角の小区画において(a,b)は(0,B-1)、フレームの右下角の小区画において(a,b)は(A-1,B-1)である。
 図7は、フレーム内の位置(a,b)の小区画の大きさと座標の例を示す。ここでは、フレームの左上角の画素の座標が、図5に示したように(0,0)であるものとする。この場合、フレーム内の位置(a,b)に存在する小区画の左上角の画素の座標は、図7に示されるように(aZ,bZ)で表される。この小区画の右下角の画素の座標は、図7に示されるように((a+1)Z-1,(b+1)Z-1)で表される。
 作業データ領域13cに格納される作業データは、前述のような種々の配列に加えて、2つの2次元配列M1及びM2を含む。2次元配列M1及びM2は、前記小区画の各々について動物体の番号を格納するのに用いられる。より具体的に述べるならば、2次元配列M1は、ポインタP1の指し示すバッファに格納されたフレームF1から検出された動物体の番号を小区画毎に格納するのに用いられる。一方、2次元配列M2は、ポインタP2の指し示すバッファに格納された一つ前のフレーム(フレームF2)から検出された動物体の番号を小区画毎に格納するのに用いられる。
 図8は、動物体の番号を格納する2次元配列Mr(r=1,2)の例を模式的に示す。図8において、数値0が記載された領域81及び82は、数値0が設定された2次元配列Mrの要素の集合である。位置(a,b)の小区画に対応する動物体が無い場合、当該小区画に対応する2次元配列Mrの要素には0が設定される。したがって、領域81及び82は、当該領域81及び82に対応する小区画の集合に動物体が無いことを示す。本実施形態において動物体検出部203は、動画像認識装置10の起動時に、2次元配列M1及びM2の全要素を0に初期化する。したがって2次元配列M1及びM2は、初期状態では、動物体が検出されていないことを示す。以下の説明では、位置(a,b)の小区画を、小区画(a,b)と表記することもある。
 図8において、数値1,2及び3が記載された領域83,84及び85は、それぞれ数値1,2及び3が設定された2次元配列Mrの要素の集合である。小区画(a,b)に対応する動物体が有る場合、当該小区画(a,b)に対応する2次元配列Mrの要素には、当該動物体の番号が設定される。したがって、領域83,84及び85は、当該領域83,84及び85に対応する小区画の集合に、それぞれ番号が1,2及び3の動物体が有ることを示す。なお、領域85は、フレーム内の背景画像に対応する。本実施形態では、背景画像は動物体として検出されるものとする。
 動物体検出部203はポインタP1の指し示すバッファに格納されたフレームF1及びポインタP2の指し示すバッファに格納されたフレームF2に基づいてブロックマッチングを行う。つまり動物体検出部203は、フレームF1内の小区画(a,b)の各々について、当該小区画(a,b)がマッチングするフレームF2内の領域を探索する。
 図9は、本実施形態で適用されるブロックマッチングの様子を示す。図9の例では、動物体検出部203は、フレームF1内の小区画(a,b)について、矢印90によって示されるフレームF2内の領域がマッチングしているかを、フレームF2内を探索することにより調べる。もし、フレームF1内の小区画(a,b)にマッチングする領域をフレームF2から見つけられなかった場合、動物体検出部203は、変数Mへ値0を設定する。これに対し、マッチングする領域が見つかった場合、動物体検出部203は、前記変数Mへ値1を設定し、且つ変数X[a,b]及びY[a,b]へ当該領域の左上角のX座標及びY座標をそれぞれ設定する。変数Mと変数X[a,b]及びY[a,b]は、前記作業データの一部である。
 前記ブロックマッチングにおいて動物体検出部203は、フレームF2内の変数Xの値(つまりX座標)の候補x(x=0,…,W-Z)及びフレームF2内の変数Yの値(つまりY座標)の候補y(y=0,…,H-Z)の組み合わせ(x,y)の各々について、次の処理を実行する。即ち動物体検出部203は、フレームF1内の小区画(a,b)とフレームF2内の左上角の画素の座標が(x,y)で且つ横幅と高さがZの矩形領域とを重ねて画素値の平均二乗誤差を算出する。動物体検出部203は、算出された平均二乗誤差を、小区画(a,b)と前記矩形領域(つまり、組み合わせの座標(x,y)に対応する矩形領域)とのマッチングのコストとする。
 もし、前記コストが予め定められた閾値θ以下となる座標(x,y)が存在する場合、動物体検出部203は、小区画(a,b)にマッチングする領域が見つかったと判定する。この場合、動物体検出部203は、変数F[a,b]へ値1を設定する。変数F[a,b]は前記作業データの一部であり、変数F[a,b]が1の場合、小区画(a,b)にマッチングする領域が存在することを示す。一方、前記コストが閾値θ以下となる座標(x,y)が存在しない場合、動物体検出部203は、小区画(a,b)にマッチングする領域が見つからなかったと判定する。この場合、動物体検出部203は、F[a,b]へ値0を設定する。これにより、小区画(a,b)にマッチングする領域が存在しないことが示される。前記コストが閾値θ以下となる座標(x,y)が存在する場合、動物体検出部203は、これらの座標(x,y)のうち、前記コストが最小となる座標を、変数(X[a,b],Y[a,b])に設定する。
 動物体検出部203は、前記ブロックマッチングでマッチングする領域が見つからなかった小区画(a,b)、つまりF[a,b]=0の小区画について、2次元配列M1中の対応する要素M1[a,b]に0を設定する。また動物体検出部203は、マッチングする領域が見つかった小区画(a,b)、つまりF[a,b]≠0の小区画については、動物体の番号を要素M1[a,b]に設定する。そのため動物体検出部203の物体番号決定部203aは、動物体の番号を次のように決定する。
 物体番号決定部203aは、前記ブロックマッチングで求められた座標(X[a,b],Y[a,b])に基づき、次式
  a0=FLOOR(X[a,b]/Z)
  a1=MAX(0,a0-S)
  a2=MIN(A-1,a0+S)
  b0=FLOOR(Y[a,b]/Z)
  b1=MAX(0,b0-S)
  b2=MIN(B-1,b0+S)
により、a0乃至a2及びb0乃至b2を取得する。ここで、FLOOR(ξ)はξ以下の最大の整数を返す関数、MAX(x,y)は引数xとyを比較して大きい方を返す関数、MIN(x,y)は引数xとyを比較して小さい方を返す関数、Sは予め任意に定めた定数とする。
 次に物体番号決定部203aは2次元配列M2を参照して、a=a1,…,a2で且つb=b1,…,b2の範囲の小区画の集合の中に、M2[a,b]≠0の小区画が有るか否かを判定する。もし、M2[a,b]≠0の小区画が無い場合、物体番号決定部203aは、配列Eから値が0の要素を検索する。もし、値が0の要素が見つかった場合、物体番号決定部203aは、配列Eの当該値が0の要素の番号を、小区画(a,b)に対応する動物体の番号としてM1[a,b]に設定する。これに対し、配列Eに値が0の要素が無い場合、物体番号決定部203aは0をM1[a,b]に設定する。
 一方、M2[a,b]≠0の小区画が有る場合、物体番号決定部203aは、当該M2[a,b]≠0の小区画の集合における動物体の番号M2[a,b]の最頻値を求める。動物体検出部203は、この最頻値を、小区画(a,b)に対応する動物体の番号としてM1[a,b]に代入する。
 その後、物体番号決定部203aは、配列Eの要素全てに0を設定する。そして物体番号決定部203aは、a=a1,…,a2で且つb=b1,…,b2の範囲の小区画の各々について、E[M1[a,b]]に1を設定する。
 上述した動物体検出部203(つまり物体番号決定部203aを含む動物体検出部203)の一連の動作により、2次元配列M1に動物体の検出結果222が格納される。しかし、動物体を検出して、前記小区画に相当する場所毎に対応する動物体が特定できるのであれば、本実施形態で適用されたのとは異なる方法で動物体が検出されても良い。
 次に、データコード読み取り部204及びラベル認識部205の動作について説明する。 
 データコード読み取り部204は、フレームF1からバーコードを検出する。データコード読み取り部204は、検出されたバーコードの個数を変数Mに代入する。またデータコード読み取り部204は、検出されたバーコードの各々について、当該バーコードの外接矩形の中心のX座標及びY座標を変数u[i]及びv[i]に設定する。変数u[i]及びv[i]は、前記作業データの一部である。
 また、データコード読み取り部204は、検出されたバーコードの各々の画像を解析することで、当該バーコードに記録された情報をデコードする(つまり読み取る)。データコード読み取り部204は、デコード結果223を配列dの要素(文字列変数)d[i]に代入する。但し、iは検出されたバーコードの識別に用いられる番号である。
 ラベル認識部205は、記憶装置13のラベル辞書領域13eに格納されているラベル辞書を用いたテンプレートマッチングにより、フレームF1から当該ラベル辞書に登録されたラベル画像を検出し且つ認識する。図10は、本実施形態で適用されるラベル辞書の典型的なデータ構造を模式的に示す。図10に示すように、ラベル辞書は、認識対象のラベルの各々について、当該ラベルの基準となる画像(つまり参照画像)と当該ラベルの種別を表す番号と、値引き額または割引率またはポイント数とを予め格納している。
 ここで、上述のテンプレートマッチングにより、ラベル認識部205が、フレームF1から参照画像とマッチングする領域を検出したものとする。即ちラベル認識部205が、ラベルを検出したものとする。この場合、ラベル認識部205は、検出されたラベルの各々について、当該ラベルに関するラベル認識結果224を取得する。ラベル認識結果224は、検出されたラベルの種別(より詳細には、種別を表す番号)と値引き額または割引率またはポイント数との組を含む。またラベル認識結果224は、検出されたラベルの座標、例えば当該ラベルの中心座標を更に含む。本実施形態において、ラベルの中心座標は、当該ラベルの外接矩形の中心のX座標及びY座標である。
 ラベル認識部205は、検出されたラベルの個数及び取得されたラベル認識結果224を作業データ領域13cに次のように格納する。まずラベル認識部205は、検出されたラベルの個数を、変数Lに設定する。またラベル認識部205は、検出されたラベルの各々について、当該ラベルの外接矩形の中心のX座標及びY座標を、配列s及びtの要素(変数)s[i],t[i]に設定する。但し、iは、前述のデータコード読み取り部204の動作の場合と異なり、検出されたラベルの識別に用いられる番号である。またラベル認識部205は、検出されたラベルの各々について、当該ラベルの種別を表す番号を配列αの要素α[i]に、当該ラベルの値引き額または割引率またはポイント数を配列βの要素β[i]に、それぞれ設定する。
 以上で述べた、動物体検出部203による動画像221からの動物体の検出、データコード読み取り部204による、フレームF1からのバーコードの検出、ラベル認識部205によるフレームF1からのラベル画像の検出と認識は同一スレッド上で逐次実行しても良いし、複数のスレッドやCPUコアで並行して実行しても良く、それらの実行順序は任意に定めて良い。
 フレーム処理では次に、後述する方法で関連付け部206により、動物体検出部203による動物体の検出結果222と、データコード読み取り部204によるデコード結果223と、ラベル認識部205によるラベル認識部205とに基づき、次のような関連付けを実行する。即ち関連付け部206は、ラベル認識部205によって認識されたラベル、データコード読み取り部204によってデコードされたバーコード、及び動物体検出部203によって検出された動物体の位置関係を調べる。そして関連付け部206は、バーコードと同一物体上のラベルを認識して得られたラベル認識結果を、当該バーコードのデコード結果に関連付ける。
 次に関連付け部206の動作の詳細について説明する。まず関連付け部206は、配列P及びQの要素を全て0に初期化する。次に関連付け部206は、データコード読み取り部204によって検出されたバーコードの各々について、つまりi=1,…,Mについて、当該バーコードの中心座標(u[i],v[i])が位置する動物体の番号M1[u[i]/Z,v[i]/Z]を取得する。次に関連付け部206は、配列Pの要素P[M1[u[i]/Z,v[i]/Z]]にiを設定する。次に関連付け部206は、ラベル認識部205によって認識されたラベルの各々について、つまりi=1,…,Lについて、当該ラベルの中心座標(s[i],t[i])が位置する動物体の番号M1[s[i]/Z,t[i]/Z]を取得する。そして関連付け部206は、配列Qの要素Q[M1[s[i]/Z,t[i]/Z]]にiを設定する。
 上述の関連付け部206による配列P及びQの操作によって、関連付けデータ225が作業データ領域13cに格納される。このように関連付け部206は、配列P及びQの操作により、検出された動物体の各々に、当該動物体上で検出されたバーコードのデコード結果と当該動物体上で検出されたラベルの認識結果とを関連付ける。これにより、バーコードのデコード結果が、当該バーコードが記された物体(つまり同一物体)上で検出されたラベルの認識結果と関連付けられる。ここで、バーコードが記された物体の面(つまりバーコード面)と、ラベルが貼付された当該物体の面が同一面である必要はないことに注意されるべきである。
 フレーム処理では次に、後述する方法で更新部207により次のような作業データ更新処理(履歴更新処理)を行う。 
 以降では、更新部207の動作について説明する。更新部207の履歴更新部207aは、関連付け部206による関連付けが完了する度に、次のような作業データ更新処理(履歴更新処理)を行う。まず履歴更新部207aは、j=1,…,Kについて、E[j]が1(E[j]=1)で、且つP[j]が0以外(P[j]≠0)で、且つg[j]が空文字列ならば、g[j]にd[P[j]]を、f[j]に0を、それぞれ設定する。またE[j]が0(E[j]=0)ならば、履歴更新部207aは、g[j]に空文字列を設定する。
 履歴更新部207aはまた、j=1,…,Kについて、g[j]が空文字列でないならば、h[j]の値を1増やす。一方、g[j]が空文字列ならば、履歴更新部207aはh[j]に-1を設定する。履歴更新部207aは更に、j=1,…,Kについて、E[j]が1(E[j]=1)で、且つQ[j]が0以外(Q[j]≠0)ならば、g2[j]に1を設定する。
 動画像入力部201による動画像221からのフレームの入力が一定の時間間隔で行われる場合、前述の履歴更新処理におけるh[j]の増分が1(一定値)であることから、h[j]は予め定められた時間の後に一定の値に達する。また、動画像221からのフレームの入力が一定間隔でない場合でも、履歴更新部207aが、h[j]の増分をフレーム間の時間間隔に比例させるように調整するならば、前記予め定められた時間の後に、h[j]を一定の値に達するようにすることができる。
 一方、更新部207のリスト更新部207bも、関連付け部206による関連付けが完了する度に、作業データ更新処理を行う。この作業データ更新処理では、リストの配列Λ(つまり、バーコードのデコード結果223のリストの配列Λ)及びリストの配列Γ(つまり、ラベル認識結果224のリストの配列Γ)が更新される。そこで、リスト更新部207bによって実行される作業データ更新処理をリスト更新処理と呼ぶ。このリスト更新処理は次のように行われる。
 まずリスト更新部207bは、動物体の番号j=1,…,Kについて、P[j]が0以外(P[j]≠0)ならば、リスト更新部207bは、デコード結果d[P[j]]をリストΛ[j]に追加する。
 またリスト更新部207bは、動物体の番号j=1,…,Kについて、Q[j]が0以外(Q[j]≠0)ならば、j番目の動物体上で検出されたラベルの種別番号α[Q[j]]と値引き額または割引率またはポイント数β[Q[j]]との組からなるラベル認識結果をリストΓ[j]に追加する。
 フレーム処理では次に、後述する方法で出力部208による前記バーコードのデコード結果223とラベル認識結果224の出力を行う。
 以降では、出力部208の動作について説明する。出力部208は、変数C1の値によって決定されるタイミングで、前記バーコードのデコード結果223と、関連付けデータ225によって当該デコード結果223に関連付けられたラベル認識結果224とを併せて、入出力コントローラ14及びシリアル入出力インタフェース18を介してPOS端末に出力する。この出力部208の動作を更に詳細に説明する。
 まず出力部208は、C1=2またはC1=3の場合、j=1,…,Kについて、E2[j]=1で且つE[j]=0であるかを判定する。即ち出力部208は、現在のフレームを境にj番目の動物体が検出されなくなったかを判定する。この判定の結果に基づき、出力部208は、現在のフレームを境に検出されなくなったj番目の動物体の各々について、リストの配列Λ(つまり、バーコードのデコード結果223のリストの配列Λ)におけるj番目のリストΛ[j]の最初の要素を入出力コントローラ14及びシリアル入出力インタフェース18を介して出力する。
 次に出力部208は、リストの配列Γ(つまりラベル認識結果224のリストの配列Γ)におけるj番目のリストΓ[j]が空リストであるかを判定する。もし、リストΓ[j]が空リストでなく、したがってj番目の動物体に関連付けられたラベル(つまりバーコードに関連付けられたラベル)が有るならば、出力部208は、当該リストΓ[j]の最初の要素に格納されたラベルの種別の番号と値引き額または割引率またはポイント数とから構成される情報(つまりラベル認識結果224)を入出力コントローラ14及びシリアル入出力インタフェース18を介して出力する。
 図11は、バーコードに関連付けられたラベルが無い場合の出力内容の例を示す。図12は、バーコードに関連付けられたラベルが有る場合の出力内容の例を示す。図11及び図12における「BARCODE=012345678」はバーコードのデコード結果が012345678であることを示す。図12の例では、ラベル認識結果が「LABEL=1,10」のように表されている。この「LABEL=1,10」は、ラベルの種別の番号が1であること(つまり当該ラベルが値引きラベルであること)、及び値引き額が10円であることを示す。
 出力部208は、C1=1またはC1=3の場合、j=1,…,Kについて、予め任意に定められた定数(閾値)θに基づき、h[j]>θで且つf[j]=0であるかを判定する。即ち出力部208は、j番目の動物体上でバーコードが検出されてから予め定められた時間またはフレーム数が経過し、且つ当該検出されたバーコードのデコード結果223が未出力であるかを判定する。この判定の結果、バーコードのデコード結果223が未出力であると判定したならば、出力部208は、該当するj番目の動物体の各々について、バーコードのデコード結果223のリストΛ[j]の最初の要素を入出力コントローラ14及びシリアル入出力インタフェース18を介して出力する。
 次に出力部208は、リストの配列Γ(つまりラベル認識結果224のリストの配列Γ)におけるj番目のリストΓ[j]が空リストであるかを判定する。もし、リストΓ[j]が空リストでなく、したがってj番目の動物体に関連付けられたラベル(つまりバーコードに関連付けられたラベル)が有るならば、出力部208は、当該リストΓ[j]の最初の要素に格納されたラベルの種別の番号と値引き額または割引率またはポイント数とから構成される情報を入出力コントローラ14及びシリアル入出力インタフェース18を介して出力する。このとき出力部208は、f[j]に1を設定する。これにより、同じ動物体(同一物体)のバーコードのデコード結果、更には同じ動物体のラベルの認識結果が2回以上出力されるのを防止できる。
 次に、警告部209及び210の動作について説明する。警告部209は、動物体検出部203によって検出されていた動物体が検出されなくなった際に、当該動物体上でラベルは検出されていたにも拘わらず、当該動物体上でバーコードが検出されていない状態を、第1の警告条件を満たす状態として検出する。具体的には、警告部209は、E[j]=0、且つE2[j]=1、且つg[j]=空文字列、且つg2[j]=1となるjをj=1,…,Kについて検索する。このようなjを検索できた場合、警告部209は、第1の警告条件が成立したと判定する。この場合、警告部209は、メッセージまたは警告音をスピーカ19から出力する。本実施形態では、例えば「バーコードをかざして下さい。」など、商品のバーコード面をカメラ17にかざすようにPOS端末のオペレータ(または顧客)に促す音声メッセージが用いられるものとする。しかし、メッセージが文字列から構成されており、シリアル入出力インタフェース18を介してPOS端末に送出されて、当該POS端末の表示画面に表示されても良い。
 一方、警告部210は、動物体検出部203によって検出された動物体のうちの同一物体について、認識結果の異なるラベルが検出された状態を、第2の警告条件を満たす状態として検出する。具体的には、警告部210は、リストΓ[j]の相異なる要素の数が2以上の場合に、第2の警告条件が成立したと判定する。この場合、警告部210は、メッセージまたは警告音をスピーカ19から出力する。ここで、スピーカ19からメッセージまたは警告音が出力される状態が不必要に続くのを防止するため、上述の判定が、リストΓ[j]及びΓ2[j]の両方に基づいて、次のように行われても良い。つまり警告部210は、1フレーム前の認識結果のリストΓ2[j]と現在の認識結果のリストΓ[j]とを比較し、相異なる要素の数が1から2に変わったフレームが検出された場合だけ、第2の警告条件が成立したと判定しても良い。
 次に修正入力部211の動作について説明する。修正入力部211は、C2=1で、且つ警告部210によって前記第2の警告条件が成立したと判定された場合、修正されたラベル認識結果の入力を求める。即ち修正入力部211は、動物体検出部203によって検出された動物体のうちの同一物体について、ラベル認識結果の異なるラベルが検出された場合、POS端末のオペレータに修正されたラベル認識結果の入力を要求する。具体的には、修正入力部211は、修正されたラベル認識結果の入力を促すための第1の要求メッセージを、シリアル入出力インタフェース18を介してPOS端末に送出する。この第1の要求メッセージはPOS端末の表示画面に表示される。
 POS端末のオペレータは、前記第1の要求メッセージに応じて、当該POS端末を操作することにより修正されたラベル認識結果を入力する。修正されたラベル認識結果は、修正されたラベルの種別を表す番号と修正された値引き額または割引率またはポイント数の組を含む。POS端末は、修正されたラベル認識結果を含む第1の応答メッセージを、シリアル入出力インタフェース18を介して動画像認識装置10に返す。修正入力部211は、このPOS端末から返された第1の応答メッセージを、入出力コントローラ14を介して受信する。すると修正入力部211は、第1の応答メッセージを解読することにより、修正されたラベル認識結果、即ち修正されたラベルの種別を表す番号と修正された値引き額または割引率またはポイント数の組を取得する。修正入力部211は、取得されたラベル認識結果を収めた構造体一つのみが含まれたリストで、該当する物体(番号がjの物体)のラベル認識結果のリストΓ[j]を置き換える。
 図13は、前記第1の要求メッセージの例を示し、図14は前記第1の応答メッセージの例を示す。図13及び図14における「OBJECT=1」は動物体の番号jが1であることを示す。図14における「LABEL=1,10」は、図12の例と同様に、ラベルの種別の番号が1であること(つまり当該ラベルが値引きラベルであること)、及び値引き額が10円であることを示す。
 さて、修正されたラベル認識結果の入力の要求が不必要に繰り返されるのを防止するため、該当する動物体に関するバーコードのデコード結果とラベル認識結果の組を出力部208が出力する直前に、警告部210が上述の判定を行っても良い。また、このタイミングでの前記判定を、修正入力部211が行っても良い。但し、このタイミングでの判定は、Γ[j]の相異なる要素の数ではなくてΓ2[i]の相異なる要素の数に基づいて行われる必要がある。つまり、Γ2[i]の相異なる要素の数が2以上の場合に、修正されたラベル認識結果の入力が要求されれば良い。
 次に決定部212の動作について説明する。決定部212は、C2=2で、且つ前述の第2の警告条件が成立している場合、前記種別と値引き額または割引率またはポイント数とを多数決により決定する。つまり決定部212は、C2=2で、且つ検出部203によって検出された動物体のうちの同一物体について、ラベル認識結果224の異なるラベルが検出された場合、上述の多数決による決定を行う。この多数決による決定は、例えば、出力部208が前記同一物体に関するバーコードのデコード結果とラベル認識結果とを出力する直前のタイミングで行われる。このタイミングで決定部212は、リストΓ2[i]内で最多数のラベル認識結果を、新しいラベル認識結果として決定する。そして決定部212は、この新しいラベル認識結果のみを含むリストをΓ[i]及びΓ2[i]に設定する。
 次に警告部213の動作について説明する。警告部213は、リストΛ[j]の相異なる要素の数が2以上の場合に、前記第3の警告条件が成立していると判定する。即ち警告部213は、リストΛ[j]の相異なる要素の数が2以上の場合に、動物体検出部203によって検出された動物体のうちの同一物体について、データコード読み取り部204によってデコード結果223の異なるバーコードが検出された判定する。この場合、警告部213は、メッセージまたは警告音をスピーカ19から出力する。ここで、スピーカ19からメッセージまたは警告音が出力される状態が不必要に続くのを防止するため、上述の判定が、リストΛ[j]及びΛ2[j]の両方に基づいて、次のように行われても良い。つまり警告部210は、1フレーム前の認識結果のリストΛ2[j]と現在の認識結果のリストΛ[j]とを比較し、相異なる要素の数が1から2に変わったフレームが検出された場合だけ、第2の警告条件が成立したと判定しても良い。
 次に、修正部214の動作について説明する。修正部214は、C3=1で、且つ警告部213によって前記第3の警告条件が成立したと判定された場合、修正されたデコード結果の入力を求める。即ち修正部214は、C3=1で、且つ検出された動物体のうちの同一物体についてデコード結果223の異なるバーコードが検出された場合(つまり、リストΛ[j]の相異なる要素の数が2以上の場合)、POS端末のオペレータに修正されたデコード結果の入力を要求する。具体的には、修正部214は、修正されたデコード結果の入力を促すための第2の要求メッセージを、シリアル入出力インタフェース18を介してPOS端末に送出する。この第2の要求メッセージはPOS端末の表示画面に表示される。
 POS端末のオペレータは、前記第2の要求メッセージに応じて、当該POS端末を操作することにより修正されたデコード結果(つまり単一のバーコードのデコード結果)を入力する。POS端末は、修正されたデコード結果を含む第2の応答メッセージを、シリアル入出力インタフェース18を介して動画像認識装置10に返す。修正部214は、このPOS端末から返された第2の応答メッセージを、入出力コントローラ14を介して受信する。すると修正部214は、第2の応答メッセージを解読することにより、修正されたデコード結果を取得する。修正部214は、取得されたデコード結果を収めた構造体一つのみが含まれたリストで、該当する物体のバーコードのデコード結果のリストを置き換える。
 図15は、前記第2の要求メッセージの例を示し、図16は前記第2の応答メッセージの例を示す。図15及び図16における「OBJECT=1」は動物体の番号jが1であることを示す。図15における「BARCODE=987654321」は入力されたデコード結果が987654321であることを示す。
 さて、修正されたデコード結果の入力の要求が不必要に繰り返されるのを防止するため、該当する動物体に関するバーコードのデコード結果とラベル認識結果の組を出力部208が出力する直前に、警告部213が上述の判定を行っても良い。また、このタイミングでの前記判定を、修正部214が行っても良い。但し、このタイミングでの判定は、はΛ[j]の相異なる要素の数ではなくてΛ2[i]の相異なる要素の数に基づいて行われる必要がある。つまり、Λ2[i]の相異なる要素の数が2以上の場合に、修正されたデコード結果の入力が要求されれば良い。
 次に、多数決選択部215の動作について説明する。多数決選択部215は、C3=2で、且つ前述の第3の警告条件が成立している場合、多数決でデコード内容を選択する。即ち多数決選択部215は、C3=2で、且つ検出された動物体のうちの同一物体についてデコード結果223の異なるバーコードが検出された場合(つまり、Γ[j]の相異なる要素の数が2以上の場合)、に多数決でデコード内容を選択する。この多数決によるデコード内容の選択は、例えば、出力部208が前記同一物体に関するバーコードのデコード結果とラベル認識結果とを出力する直前のタイミングで行われる。このタイミングで多数決選択部215は、リストΛ2[i]で最多数のデコード結果を新しいデコード結果とする。そして多数決選択部215は、この新しいデコード結果のみを含むリストをΛ[i]およびΛ2[i]に設定する。
 本実施形態によれば、次に列挙されるような効果を得ることできる。 
 a)関連付け部206は、動物体検出部203によって検出された動物体のうちの同一物体上から検出されたバーコードのデコード結果とラベルの認識結果とを関連付ける。これにより、バーコード及びラベル(つまり値引きラベルのようなラベル)の両者が同一フレーム内に収まらないような箇所に配置されている場合でも、その両者を関連付けることができる。
 b)警告部209は、動物体が検出されなくなった時点で、当該動物体上でラベルは検出されているにも拘わらず、当該動物体上のバーコードが検出されていない場合に、当該バーコード(バーコード面)をカメラ17(動画像撮像装置)にかざすのをオペレータに促すメッセージまたは警告音を発する。これにより、オペレータがバーコードをカメラ17にかざすのを忘れる頻度を減らすことができる。
 c)警告部210(修正入力部211)は、動物体検出部203によって検出された動物体のうちの同一物体について認識結果の異なるラベルが検出された場合に、メッセージまたは警告音(修正されたラベル認識結果の入力を促すためのメッセージまたは警告音)を発する。このメッセージまたは警告音により、オペレータに対して修正されたラベル認識結果の入力が促される。これにより、ラベルに関する正しい情報(より詳細には、ラベルに示されたシンボルの表す正しい情報)が入力されることが期待される。よって、ラベルの誤認識があっても、金額またはポイントの計算への悪影響を防止できる。
 d)決定部212は、前記同一物体について認識結果の異なるラベルが検出された場合に、多数決により認識結果を決定する。これにより、ラベルの誤認識の影響を低減することができる。
 e)警告部213(入力部214)は、前記同一物体についてデコード結果の異なるバーコードが検出された場合に、メッセージまたは警告音(修正されたデコード結果の入力を促すためのメッセージまたは警告音)を発する。これにより、バーコードに関する正しい情報が入力されることが期待される。よって、バーコードのデコード誤りの影響を低減することができる。
 f)多数決選択部214は、前記同一物体についてデコード結果の異なるバーコードが検出された場合に、多数決でデコード内容を選択する。これにより、バーコードのデコード誤りの影響を低減することができる。 
 前記実施形態では、データコードとしてバーコード(1次元バーコード)が適用されている。しかし、他のデータコード、例えばQRコード(登録商標)のような2次元バーコードが適用されても良い。
 以上説明した少なくとも1つの実施形態によれば、データコードとラベルとが、同一フレーム内に収まらないような配置となっている場合でも、動画像から両者の関連付けを行うことができる動画像認識装置及び動画像認識方法を提供することができる。
 本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。

Claims (7)

  1.  動画像を入力する動画像入力部と、
     前記入力された動画像を格納するバッファ部と、
     前記バッファ部に格納された前記動画像から動物体を検出してその各々を識別する動物体検出部と、
     前記動画像のフレームの各々からデータコードを検出して、当該検出されたデータコードをデコードするデータコード読み取り部と、
     前記動画像のフレームの各々からラベルを検出して、当該検出されたラベルに記されたシンボルを認識するラベル認識部と、
     前記認識されたラベルと前記デコードされたデータコードとが、前記識別された動物体のうちの同一物体上にある場合に、前記ラベルの認識結果を前記データコードのデコード結果に関連付ける関連付け部と、
     前記データコードのデコード結果と当該デコード結果に関連付けられた前記ラベルの認識結果とを併せて出力する出力部と
     を具備する動画像認識装置。
  2.  前記出力部は、前記データコードが検出されてから、予め定められた時間またはフレーム数が経過した後に、前記データコードのデコード結果及び前記ラベルの認識結果を出力する請求項1記載の動画像認識装置。
  3.  前記出力部は、前記検出されたデータコードを含む動物体が前記動物体検出部によって検出されなくなった後に、前記データコードのデコード結果及び前記ラベルの認識結果を出力する請求項1記載の動画像認識装置。
  4.  前記動物体検出部によって検出された動物体のうちの同一物体について認識結果の異なるラベルが検出された場合に、多数決により認識結果を決定する決定部を更に具備する請求項1記載の動画像認識装置。
  5.  前記ラベルが、値引き額を表すシンボルが記された値引きラベル、割引率を表すシンボルが記された割引ラベル、または付与されるポイント数を表すポイント付与ラベルであり、
     前記ラベルの認識結果は、前記ラベルの種別と、前記引き額、前記割引率または前記ポイント数とを含み、
     前記決定部は、前記ラベルの前記種別と、前記引き額、前記割引率または前記ポイント数とを、前記異なる認識結果に基づき多数決により決定する
     請求項4記載の動画像認識装置。
  6.  前記動物体検出部によって検出された動物体のうちの同一物体についてデコード結果の異なるデータコードが検出された場合に、多数決によりデコード結果を選択する多数決選択部を更に具備する請求項1記載の動画像認識装置。
  7.  動画像を入力し、
     前記入力された動画像をバッファ部に格納し、
     前記バッファ部に格納された前記動画像から動物体を検出し、
     前記検出された動物体の各々を識別し、
     前記動画像のフレームの各々からデータコードを検出し、
     前記検出されたデータコードをデコードし、
     前記動画像のフレームの各々からラベルを検出し、
     前記検出されたラベルに記されたシンボルを認識し、
     前記認識されたラベルと前記デコードされたデータコードとが、前記識別された動物体のうちの同一物体上にある場合に、前記ラベルの認識結果を前記データコードのデコード結果に関連付け、
     前記データコードのデコード結果と当該デコード結果に関連付けられた前記ラベルの認識結果とを併せて出力する
     動画像認識方法。
PCT/JP2012/074729 2012-09-26 2012-09-26 動画像認識装置及び動画像認識方法 WO2014049729A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2012544352A JP5670471B2 (ja) 2012-09-26 2012-09-26 動画像認識装置及び動画像認識方法
CN201280076054.5A CN104662590B (zh) 2012-09-26 2012-09-26 运动图像识别装置以及运动图像识别方法
PCT/JP2012/074729 WO2014049729A1 (ja) 2012-09-26 2012-09-26 動画像認識装置及び動画像認識方法
US14/667,757 US9779326B2 (en) 2012-09-26 2015-03-25 Moving image recognition apparatus and moving image recognition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/074729 WO2014049729A1 (ja) 2012-09-26 2012-09-26 動画像認識装置及び動画像認識方法

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/667,757 Continuation US9779326B2 (en) 2012-09-26 2015-03-25 Moving image recognition apparatus and moving image recognition method

Publications (1)

Publication Number Publication Date
WO2014049729A1 true WO2014049729A1 (ja) 2014-04-03

Family

ID=50387195

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/074729 WO2014049729A1 (ja) 2012-09-26 2012-09-26 動画像認識装置及び動画像認識方法

Country Status (4)

Country Link
US (1) US9779326B2 (ja)
JP (1) JP5670471B2 (ja)
CN (1) CN104662590B (ja)
WO (1) WO2014049729A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015228079A (ja) * 2014-05-30 2015-12-17 日本電気株式会社 情報処理装置、制御方法、及びプログラム
JP2021093188A (ja) * 2021-02-24 2021-06-17 日本電気株式会社 商品登録装置及び制御方法

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10460574B2 (en) * 2015-05-12 2019-10-29 Symbol Technologies, Llc Arrangement for and method of processing products at a workstation upgradeable with a camera module for capturing an image of an operator of the workstation
CN105260733A (zh) * 2015-09-11 2016-01-20 北京百度网讯科技有限公司 用于处理图像信息的方法和装置
CN105354526B (zh) * 2015-09-28 2018-03-20 西安中颖电子有限公司 提高一维条码解码效率的方法以及一维条码的解码系统
JP6736334B2 (ja) * 2016-04-07 2020-08-05 東芝テック株式会社 画像処理装置
JP7200487B2 (ja) * 2018-03-19 2023-01-10 日本電気株式会社 精算システム、精算方法及びプログラム
JP2020064373A (ja) 2018-10-15 2020-04-23 富士通株式会社 コード情報読取装置、方法、及びプログラム
JP2020064374A (ja) 2018-10-15 2020-04-23 富士通株式会社 コード情報読取装置、方法、及びプログラム

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004185418A (ja) * 2002-12-04 2004-07-02 Matsushita Electric Ind Co Ltd 精算装置
JP2004287806A (ja) * 2003-03-20 2004-10-14 Mitsubishi Electric Corp 移動目標検出装置、追尾システム及び移動目標識別方法
JP4422706B2 (ja) * 2006-07-28 2010-02-24 東芝テック株式会社 データコード読取装置
JP2010113729A (ja) * 2009-12-25 2010-05-20 Toshiba Tec Corp データコード読み取り装置及びその方法
JP2011164934A (ja) * 2010-02-09 2011-08-25 Toshiba Tec Corp シンボル読取装置及びその制御プログラム
JP2011248917A (ja) * 2011-07-21 2011-12-08 Toshiba Tec Corp 商品販売登録データ処理装置
JP2012014271A (ja) * 2010-06-29 2012-01-19 Toshiba Tec Corp コード読取装置およびプログラム
JP2012053783A (ja) * 2010-09-02 2012-03-15 Toshiba Tec Corp 商品情報処理装置及びプログラム
JP2012113689A (ja) * 2010-11-01 2012-06-14 Toshiba Tec Corp コード読取装置およびプログラム
JP2012119005A (ja) * 2008-04-08 2012-06-21 Toshiba Tec Corp スキャナ装置及びそのスキャナ方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004127013A (ja) * 2002-10-03 2004-04-22 Matsushita Electric Ind Co Ltd 販売時点情報管理装置
JP4738469B2 (ja) 2008-10-29 2011-08-03 株式会社東芝 画像処理装置、画像処理プログラムおよび画像処理方法
JP5502662B2 (ja) 2010-09-01 2014-05-28 東芝テック株式会社 店舗システム及び商品コード読取装置
JP5149950B2 (ja) * 2010-10-28 2013-02-20 東芝テック株式会社 商品情報読取装置及びプログラム
JP5653308B2 (ja) 2011-06-30 2015-01-14 株式会社東芝 領域検出装置、領域検出方法及びプログラム
JP5337844B2 (ja) 2011-06-30 2013-11-06 株式会社東芝 領域検出装置、領域検出方法及びプログラム

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004185418A (ja) * 2002-12-04 2004-07-02 Matsushita Electric Ind Co Ltd 精算装置
JP2004287806A (ja) * 2003-03-20 2004-10-14 Mitsubishi Electric Corp 移動目標検出装置、追尾システム及び移動目標識別方法
JP4422706B2 (ja) * 2006-07-28 2010-02-24 東芝テック株式会社 データコード読取装置
JP2012119005A (ja) * 2008-04-08 2012-06-21 Toshiba Tec Corp スキャナ装置及びそのスキャナ方法
JP2010113729A (ja) * 2009-12-25 2010-05-20 Toshiba Tec Corp データコード読み取り装置及びその方法
JP2011164934A (ja) * 2010-02-09 2011-08-25 Toshiba Tec Corp シンボル読取装置及びその制御プログラム
JP2012014271A (ja) * 2010-06-29 2012-01-19 Toshiba Tec Corp コード読取装置およびプログラム
JP2012053783A (ja) * 2010-09-02 2012-03-15 Toshiba Tec Corp 商品情報処理装置及びプログラム
JP2012113689A (ja) * 2010-11-01 2012-06-14 Toshiba Tec Corp コード読取装置およびプログラム
JP2011248917A (ja) * 2011-07-21 2011-12-08 Toshiba Tec Corp 商品販売登録データ処理装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015228079A (ja) * 2014-05-30 2015-12-17 日本電気株式会社 情報処理装置、制御方法、及びプログラム
JP2021093188A (ja) * 2021-02-24 2021-06-17 日本電気株式会社 商品登録装置及び制御方法

Also Published As

Publication number Publication date
US9779326B2 (en) 2017-10-03
CN104662590A (zh) 2015-05-27
US20150199589A1 (en) 2015-07-16
JP5670471B2 (ja) 2015-02-18
JPWO2014049729A1 (ja) 2016-08-22
CN104662590B (zh) 2017-11-28

Similar Documents

Publication Publication Date Title
JP5670471B2 (ja) 動画像認識装置及び動画像認識方法
US20220172157A1 (en) Information processing apparatus, control method, and program
JP6962356B2 (ja) 画像処理装置、表示制御装置、画像処理方法、および、記録媒体
WO2019107157A1 (ja) 棚割情報生成装置及び棚割情報生成プログラム
US8607246B2 (en) Multiprocessor circuit using run-time task scheduling
US10636391B2 (en) Electronic label system including control device for controlling electronic labels
JP2019094191A (ja) 棚割生成プログラム、棚割生成方法及び棚割生成装置
JP5876129B2 (ja) 動画像認識装置及び動画像認識方法
US10853611B1 (en) Method for scanning multiple barcodes and system thereof
CN111814802B (zh) 一种文字图像的处理方法、装置、存储介质和电子设备
JP2019200533A (ja) 計数装置、会計システム、学習装置、及び、制御方法
US9805357B2 (en) Object recognition apparatus and method for managing data used for object recognition
JP6304473B2 (ja) 画像処理システム、画像処理方法及びプログラム
JP6695454B1 (ja) 情報処理装置、情報処理方法、及びプログラム
WO2015159586A1 (ja) 入力装置、情報処理装置及びプログラム
JP7381330B2 (ja) 情報処理システム、情報処理装置及び情報処理方法
WO2023233638A1 (ja) トラッキング方法、トラッキングプログラムおよび情報処理装置
US20200394637A1 (en) Registration apparatus, registration method, and non-transitory storage medium
JP2016033772A (ja) 情報表示装置およびプログラム
KR20230046978A (ko) 컴퓨터 판독 가능한 기억 매체에 저장된 통지 프로그램, 통지 방법 및 정보 처리 장치
JPH0793667A (ja) 販売時点情報管理用入出力制御方法及びこの方法を用いたレジスタ装置
JPH0223419A (ja) マルチウインド表示におけるカーソル認識方式

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2012544352

Country of ref document: JP

Kind code of ref document: A

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

Ref document number: 12885293

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12885293

Country of ref document: EP

Kind code of ref document: A1