Optical information reading method, optical information reading device and program

By periodically capturing images and estimating movement and brightness, and adjusting imaging conditions, the problems of long optical information reading time and poor environmental adaptability in existing technologies have been solved, achieving fast and successful optical information reading.

CN122317451APending Publication Date: 2026-06-30OPTOELECTRONICS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
OPTOELECTRONICS CO LTD
Filing Date
2025-10-29
Publication Date
2026-06-30

Smart Images

  • Figure CN122317451A_ABST
    Figure CN122317451A_ABST
Patent Text Reader

Abstract

The optical information reading method, when analyzing captured images and reading the optical information contained within those images, can appropriately adjust imaging conditions with fewer attempts, regardless of the environment in which the information to be read is placed. In the case of periodically capturing images, analyzing those images, and reading the optical information contained within them, the method estimates the amount of movement of the imaging unit within a certain time range based on the images captured within that time range, and adjusts the imaging conditions based on the pixel values ​​of the pixels in the captured images through imaging adjustment processing (212), so that the brightness of the image obtained through subsequent imaging reaches a predetermined target level. If, although the imaging target can be determined based on the estimated amount of movement (S101 is "yes"), but the reading of optical information fails and imaging adjustment processing (212) is performed again, the target level is changed to a higher level (S104).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to an optical information reading method for reading optical information such as code symbols contained in a captured image, an optical information reading device for reading such optical information, and a program for causing a computer to execute the optical information reading method described above. Background Technology

[0002] Previously, there were known optical information reading devices that used imaging units such as cameras to capture images of the target object and read optical information such as code symbols and characters contained in the obtained images.

[0003] Such optical information reading devices typically begin capturing images when a trigger is given to start reading, and perform various processes on the acquired image data for information reading.

[0004] However, when the operator cannot align the image and the optical information to be read is not included in the captured image, or when the operator moves the device and the captured image is blurry, the information may not be read or misreading may occur.

[0005] As a reading control technology that takes this situation into account, Patent Document 1 discloses an optical information reading device that outputs the interpretation result of the interpretation unit when the number of times the change in the value related to a specific part of the area occupied by optical information in the captured image is equal to or less than a predetermined value is more than a predetermined number.

[0006] Patent document 2 discloses a barcode reading device that automatically decodes the barcode only when it stops at the appropriate position.

[0007] Patent document 3 discloses an optical information reading device configured not to decode the image data of the captured image before giving a shooting instruction and before the standby period has elapsed.

[0008] Patent document 4 discloses an optical information reading device that compares the total number of bright and dark patterns constituting a bright and dark pattern column in a binarized signal captured within two or more consecutive predetermined periods, and performs decoding if the result satisfies a predetermined stability condition.

[0009] In addition, as another aspect of the prior art, Patent Document 5 discloses an optical information reading device that changes the control conditions related to the reading of the reading unit when it is determined that the reading unit has failed to read the information code and the optical information reading device is in a state within a predetermined range for a predetermined time.

[0010] Existing technical documents Patent documents Patent Document 1: Japanese Patent No. 6638614 Patent Document 2: Japanese Patent Application Publication No. 5-324898 Patent Document 3: Japanese Patent No. 3918713 Patent Document 4: Japanese Patent No. 3944997 Patent Document 5: Japanese Patent No. 6065719 Patent Document 6: Japanese Patent No. 5381928 Patent Document 7: Japanese Patent No. 4175223 Patent Document 8: Japanese Patent No. 3632578 Summary of the Invention The problem that the invention aims to solve In the technologies described in Patent Documents 1 to 4, decoding is generally considered to be performed when the reading device determines that an input such as a decodeable image has been expected to be obtained. However, there is still room for improvement in the criteria for this determination.

[0011] In addition, when various objects such as packaging paper, the LCD screen of the device, and metal surfaces are used as reading targets, analysis processing to determine what the reading target is and filtering processing based on the analysis results are performed before reading the code symbols or characters. Therefore, it may take a certain amount of time from image capture to reading.

[0012] Considering this situation, for example, if the optical information reading device only begins decoding after determining that it has reached a state where it can expect to obtain input such as images with readable code symbols or characters, the time until the decoding result is obtained becomes longer.

[0013] Furthermore, regarding image brightness adjustments, even if a read fails under certain conditions, it's difficult to distinguish whether the failure is due to brightness mismatch, image blur, or the absence of the optical information to be read within the imaging range. Therefore, adjusting imaging conditions solely due to a read failure does not necessarily guarantee a successful read.

[0014] For example, simply because the image is too dark is one of the typical reasons for read failure. If the exposure time or illumination time is always increased to obtain a brighter image in the case of read failure, the image taken in an originally bright environment may cause halos, which may lead to read failure.

[0015] In view of the above, the purpose of this disclosure is to be able to appropriately adjust the imaging conditions with fewer attempts, regardless of the environment in which the information to be read is placed, when resolving the captured image and reading the optical information contained in the image.

[0016] Technical solutions for solving the problem The first aspect of this disclosure provides an optical information reading method, the purpose of which is to shorten the time from successfully capturing an image capable of reading the optical information contained in the image to outputting the reading result when parsing the captured image and reading the optical information contained in the image.

[0017] The optical information reading method includes: an imaging step in which an imaging unit periodically captures images; a reading step in which the images captured by the imaging step are analyzed and optical information contained in the images is read; and an estimation step in which the amount of movement of the imaging unit within a certain time range is estimated based on the images captured by the imaging step within that time range.

[0018] It may also include a readout control step to determine whether the amount of movement estimated in the aforementioned estimation step is below a predetermined first reference. Furthermore, if it is determined that the movement is below the first reference, and if the image resolved in the aforementioned readout step was captured within the aforementioned time range, then the aforementioned readout step is continued as is to decode the optical information; if the image resolved in the aforementioned readout step was captured before the aforementioned time range, then the aforementioned readout step is re-executed to resolve an image captured by the aforementioned imaging step within or after the aforementioned time range and to read the optical information contained in that image.

[0019] In this optical information reading method, estimating the movement of the imaging unit in the estimation step may include estimating the range of movement of the imaging unit within the time range based on three or more images captured by the imaging step within the time range. Furthermore, the first reference may be that the range of movement estimated by the estimation step falls within a predetermined convergence range.

[0020] Alternatively or additionally, estimating the movement of the imaging unit in the above estimation step may include estimating the average movement of the imaging unit per frame within the aforementioned time range based on three or more images captured by the imaging step within that time range. Furthermore, the first reference may be that the average movement estimated by the estimation step is below a predetermined threshold.

[0021] Furthermore, the aforementioned optical information reading method may include: an illumination step, illuminating a aiming light, the aiming light serving as a reference for pointing the imaging unit towards the optical information of the target; and an aiming light detection step, detecting the position of the aiming light in the image captured by the imaging step. It may also include an imaging adjustment step, adjusting the imaging conditions of the imaging unit based on the pixel values ​​of the pixels in the image captured by the imaging step.

[0022] Furthermore, the above-mentioned imaging adjustment step may include the following steps: when it is determined that the amount of movement estimated by the above-mentioned estimation step is below the above-mentioned first reference, the imaging conditions of the above-mentioned imaging unit are adjusted based on the pixel values ​​of pixels within a predetermined range near the position of the above-mentioned aiming light detected in the image captured by the above-mentioned imaging step.

[0023] Alternatively, the above-mentioned imaging adjustment step may be a step of adjusting the imaging conditions of the imaging unit based on the pixel values ​​of the pixels around the position of the aiming light in the image captured by the above-mentioned imaging step. This may be the following steps: when it is determined that the amount of movement estimated by the above-mentioned estimation step is below the first reference, compared with when it is determined that the amount of movement estimated by the above-mentioned estimation step is not below the first reference, the imaging conditions of the imaging unit are adjusted based on the pixel values ​​of the pixels in a narrower range around the position of the aiming light.

[0024] Alternatively, it may include an imaging adjustment step, which adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels at predetermined reference positions in the image captured by the imaging step. The imaging adjustment step may include the following steps: when it is determined that the amount of movement estimated by the estimation step is below the first reference, compared with when it is determined that the amount of movement estimated by the estimation step is not below the first reference, the imaging conditions of the imaging unit are adjusted based on the pixel values ​​of pixels in a narrower range of the image.

[0025] Furthermore, the aforementioned optical information reading methods may include an imaging adjustment step to adjust the imaging conditions of the imaging unit, wherein the imaging conditions include at least one of exposure time and illumination time. Additionally, the estimation step estimates the movement of the imaging unit, including estimating the movement of the imaging unit in each frame based on images captured by the imaging step during all or part of a certain time range. Moreover, based on the estimated movement of the imaging unit in each frame, an upper limit can be determined for the value of the at least one of the aforementioned conditions set by the imaging adjustment step.

[0026] It may also include the step of obtaining the amount of blur allowed in the image when reading the optical information, and determining an upper limit of the value of at least one of the above-mentioned items set by the imaging adjustment step based on the estimated amount of movement of the imaging unit in each frame and the obtained amount of blur.

[0027] In addition, this disclosure also provides an optical information reading method, the method comprising: an imaging step, wherein an imaging unit periodically captures images; an estimation step, wherein based on three or more images captured by the imaging step within a certain time range, the movement range of the imaging unit within that time range is estimated; and a reading step, wherein when it is determined that the movement range estimated by the estimation step falls within a predetermined convergence range, an image captured by the imaging step within or after the time range is parsed, and optical information contained in the image is read.

[0028] Furthermore, in order to output read results quickly, it is important to adjust the imaging conditions to obtain an image with appropriate brightness, thereby preventing read failures due to image defects. It can be assumed that performing this adjustment based on an image obtained through recent imaging can yield an image that is easier to read successfully.

[0029] However, depending on the environment used to read the optical information, the brightness of the area to be read and its surrounding area can be completely different. For example, when the information to be read is printed on paper, there is a window behind the paper through which bright light can pass. In this case, when both the paper and the window are within the imaging range, it is assumed that the portion of the window is imaged in a very bright manner and its area is also large, while the portion of the information to be read is imaged in a shadow and darkness.

[0030] In this situation, it is believed that even if imaging conditions are adjusted based on the brightness of the entire image, an image suitable for reading information cannot be obtained. However, when the information to be read does not have adequate brightness, it is not easy to determine where the information to be read is, even when resolving the image, and it is difficult to adjust imaging conditions based on the brightness near the information to be read.

[0031] In view of the above, a second aspect of this disclosure provides an optical information reading method, the purpose of which is to be able to appropriately adjust imaging conditions regardless of the environment in which the information to be read is placed when parsing an image and reading the optical information contained in the image.

[0032] The optical information reading method includes: an imaging step in which an imaging unit periodically captures images; a reading step in which the images captured by the imaging step are analyzed and optical information contained in the images is read; and an estimation step in which the amount of movement of the imaging unit within a certain time range is estimated based on the images captured by the imaging step within that time range.

[0033] In addition, it may include: an illumination step, illuminating a aiming light, the aiming light serving as a reference for pointing the imaging unit toward reading optical information of a target; an aiming light detection step, detecting the position of the aiming light in an image captured by the imaging step; and an imaging adjustment step, adjusting the imaging conditions of the imaging unit based on the pixel values ​​of the pixels in the image captured by the imaging step.

[0034] In addition, the above-mentioned imaging adjustment step may be the following steps: when it is determined that the amount of movement estimated by the above-mentioned estimation step is below the above-mentioned first reference, the imaging conditions of the above-mentioned imaging unit are adjusted based on the pixel values ​​of the pixels in a predetermined range near the position of the above-mentioned aiming light detected in the image captured by the above-mentioned imaging step.

[0035] Alternatively, the above-described imaging adjustment step, which adjusts the imaging conditions of the imaging unit based on the pixel values ​​of the pixels around the position of the aiming light in the image captured by the above-described imaging step, may also include the following steps: when it is determined that the amount of movement estimated by the above-described estimation step is below the first reference, compared with when it is determined that the amount of movement estimated by the above-described estimation step is not below the first reference, the imaging conditions of the imaging unit are adjusted based on the pixel values ​​of the pixels in a narrower range around the position of the aiming light.

[0036] Alternatively, in addition to the imaging step, reading step, and estimation step described above, an imaging adjustment step may be included, which adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels at predetermined reference positions in the image captured by the imaging step. The imaging adjustment step may include the following steps: when it is determined that the amount of movement estimated by the estimation step is below a predetermined first reference, compared with when it is determined that the amount of movement estimated by the estimation step is not below the first reference, the imaging conditions of the imaging unit are adjusted based on the pixel values ​​of pixels within a narrower range of the image.

[0037] Furthermore, regarding image brightness adjustments, even if a read fails under certain conditions, it's difficult to distinguish whether the failure is due to brightness mismatch, image blur, or the absence of the optical information to be read within the imaging range. Therefore, adjusting imaging conditions solely due to a read failure does not necessarily guarantee a successful read.

[0038] For example, simply because the image is too dark is one of the typical reasons for read failure. If the exposure time or illumination time is always increased to obtain a brighter image in the case of read failure, the image taken in an originally bright environment may cause halos, which may lead to read failure.

[0039] In view of the above, a third aspect of this disclosure provides an optical information reading method, the purpose of which is to appropriately adjust the imaging conditions with fewer attempts, regardless of the environment in which the information to be read is placed, when analyzing a captured image and reading the optical information contained in the image.

[0040] The optical information reading method includes: an imaging step in which an imaging unit periodically captures images; a reading step in which the images captured by the imaging step are analyzed and optical information contained in the images is read; and an estimation step in which the amount of movement of the imaging unit within a certain time range is estimated based on the images captured by the imaging step within that time range.

[0041] Furthermore, the method may also include: an imaging adjustment step, which adjusts the imaging conditions of the imaging unit based on the pixel values ​​of the pixels in the image captured by the imaging step, so that the brightness of the image obtained by subsequent imaging becomes a predetermined target level; and a target adjustment step, which changes the target level in the imaging adjustment step to a higher level when the amount of movement estimated by the estimation step is below a predetermined first reference and the reading of optical information fails in the reading step.

[0042] In such an optical information reading method, the above-mentioned imaging adjustment step may be the following steps: based on the pixel values ​​of the pixels in the image captured by the above-mentioned imaging step, calculate the brightness index value of the image, and adjust the imaging conditions of the above-mentioned imaging unit so that the brightness index value of the image obtained by subsequent imaging becomes the target level.

[0043] In addition, the above imaging adjustment steps can also be steps to adjust at least one of the exposure time and illumination time in the above imaging conditions.

[0044] Furthermore, if the amount of movement estimated by at least the above estimation step is below the first benchmark, the brightness index value can be determined based on a threshold when the pixels sampled from the image captured by the above imaging step are classified into a first category of dark pixels and a second category of bright pixels based on the variance of the pixel values ​​of pixels in each category.

[0045] In addition, classification can be performed to minimize the dispersion of pixel values ​​in each category.

[0046] Furthermore, when the amount of movement estimated by the above estimation step is below the first reference, the index value of the brightness can be calculated by the first step, and when the amount of movement estimated by the above estimation step exceeds the first reference, the index value of the brightness can be calculated by the second step, which is different from the first step.

[0047] In this case, for an image whose optical information can be read through the reading step, the brightness index value obtained in the first step above may be less than the brightness index value of the same image obtained in the second step above.

[0048] Furthermore, in each of the above optical information reading methods, the target adjustment step may include the following steps: when it is determined that the amount of movement estimated by the above estimation step is not below a predetermined first reference, the target level is set to a predetermined initial value.

[0049] Furthermore, in the aforementioned optical information reading methods, the target adjustment step may include the following steps: when the optical information reading in the reading step fails when the target level is at a predetermined upper limit value, the target level is restored to a predetermined initial value.

[0050] Furthermore, the aforementioned optical information reading methods may include: an illumination step, illuminating a aiming light, the aiming light serving as a reference for pointing the imaging unit toward the optical information of the target; and an aiming light detection step, detecting the position of the aiming light in the image captured by the imaging step. Moreover, the aforementioned imaging adjustment step may include the following steps: determining whether the amount of movement estimated by the estimation step is below the first reference; and when it is determined to be below the first reference, adjusting the imaging conditions of the imaging unit based on the pixel values ​​of pixels within a predetermined range near the position of the aiming light detected in the image captured by the imaging step.

[0051] Alternatively, the above-described imaging adjustment step may be a step of adjusting the imaging conditions of the imaging unit based on the pixel values ​​of the pixels around the position of the aiming light in the image captured by the above-described imaging step, and may also include the following steps: when it is determined that the amount of movement estimated by the above-described estimation step is below the first reference, compared with when it is determined that the amount of movement estimated by the above-described estimation step is not below the first reference, the imaging conditions of the imaging unit are adjusted based on the pixel values ​​of the pixels in a narrower range around the position of the aiming light.

[0052] Alternatively, instead of providing the above-described illumination step and the above-described aiming light detection step, the above-described imaging adjustment step may be a step of adjusting the imaging conditions of the above-described imaging unit based on the pixel values ​​of pixels at predetermined reference positions in the image captured by the above-described imaging step, and may also include the following steps: when it is determined that the amount of movement estimated by the above-described estimation step is below the above-described first reference, compared with when it is determined that the amount of movement estimated by the above-described estimation step is not below the above-described first reference, the imaging conditions of the above-described imaging unit are adjusted based on the pixel values ​​of pixels within a narrower range of the above-described image.

[0053] Furthermore, regarding image brightness adjustment, failing to read an image simply because it's too dark doesn't mean that brightening the image is sufficient. If the image is too bright, parts of the optical information to be read, such as black objects with low light reflectivity, will also be overexposed, resulting in insufficient contrast and, like with an image that's too dark, causing reading failure.

[0054] In view of the above, the fourth aspect of this disclosure provides an optical information reading method, the purpose of which is to precisely adjust the imaging conditions to obtain an image with suitable brightness for reading when parsing an image and reading the optical information contained in the image.

[0055] The optical information reading method includes: an imaging step in which an imaging unit periodically captures images; and a reading step in which the images captured by the imaging step are analyzed and the optical information contained in the images is read.

[0056] In addition, an imaging adjustment step may be included, which calculates a brightness index value of the image based on the pixel values ​​of the pixels in the image captured by the imaging step, and adjusts the imaging conditions of the imaging unit so that the brightness index value of the image obtained in subsequent imaging becomes a predetermined target level. The brightness index value may be determined based on a threshold value when the pixels sampled from the image captured by the imaging step are classified into a first category of dark pixels and a second category of bright pixels based on the variance of the pixel values ​​of pixels in each category.

[0057] In addition, classification can be performed to minimize the dispersion of pixel values ​​in each category.

[0058] Alternatively, the above classification can be performed in this optical information reading method to minimize the intra-class variance, which is obtained by taking a weighted average of the variances of the pixel values ​​in each class, considering the number of pixels belonging to each class.

[0059] Furthermore, in the aforementioned optical information reading methods, the brightness index value can be a value representing a pixel value that is brighter than the aforementioned threshold. Alternatively, the brightness index value can also be a value near the aforementioned threshold that represents a pixel value brighter than the aforementioned threshold.

[0060] Furthermore, in each of the above optical information reading methods, the imaging adjustment step may be a step of adjusting at least one of the exposure time and illumination time in the above imaging conditions.

[0061] Furthermore, to output readout results quickly, it is important to adjust imaging conditions to obtain a blur-free image, thus preventing readout failures due to image defects. This can be achieved simply by setting a short exposure time. However, in some cases, a longer exposure time is necessary, such as when sufficient exposure is desired in low-light conditions. Achieving this solely by increasing the gain of the light-receiving element may result in increased noise.

[0062] In view of the above, the fifth aspect of this disclosure provides an optical information reading method, the purpose of which is to be able to appropriately adjust imaging conditions while widely selecting exposure times when analyzing a captured image and reading the optical information contained in the image.

[0063] The optical information reading method includes: an imaging step, in which an imaging unit periodically captures images; a reading step, in which the images captured by the imaging step are analyzed and optical information contained within the images is read; and an estimation step, in which the amount of movement of the imaging unit in each frame is estimated based on the images captured by the imaging step within a certain time range. It may also include an imaging adjustment step, in which imaging conditions of the imaging unit are adjusted, including at least one of exposure time and illumination time. Furthermore, an upper limit for the value of the at least one of the conditions set by the imaging adjustment step can be determined based on the estimated amount of movement of the imaging unit in each frame.

[0064] This optical information reading method may include the step of obtaining the amount of blur in the image allowed when reading the optical information, and determining an upper limit of the value of at least one of the above-mentioned items set by the imaging adjustment step based on the estimated amount of movement of the imaging unit in each frame and the obtained amount of blur.

[0065] The sixth aspect of this disclosure provides an optical information reading method, the purpose of which is to shorten the time from successfully capturing an image capable of reading the optical information to outputting the reading result when parsing a captured image and reading the optical information contained in the image.

[0066] The optical information reading method includes: an imaging step in which an imaging unit periodically captures images; a reading step in which the images captured by the imaging step are analyzed and optical information contained in the images is read; and an estimation step in which the amount of movement of the imaging unit within a certain time range is estimated based on the images captured by the imaging step within that time range.

[0067] In addition, it may include: a first reading control step, which, when a time corresponding to a certain time range has elapsed since the image of the image parsed in the above reading step was started, re-executes the reading step of parsing an image captured by the above imaging step after the image in the parsing and reading the optical information contained in the image; and a second reading control step, which determines whether the amount of movement estimated by the above estimation step is below a predetermined first reference, and when it is determined to be below the above first reference, does not execute the above first reading control step.

[0068] Alternatively, it may include: a first reading control step, which, after a time corresponding to a certain time range has elapsed since the start of the reading step, re-executes the reading step of parsing the most recent image captured by the imaging step and reading the optical information contained in the image; and a second reading control step, which determines whether the amount of movement estimated by the estimation step is below a predetermined first reference, and if it is determined to be below the first reference, does not execute the first reading control step.

[0069] In addition to the methods described above, the various aspects of this disclosure can be implemented in any way, such as by means of an apparatus, a system, a program, and a recording medium for recording the program.

[0070] Invention Effects According to the structure of this disclosure, when analyzing a captured image and reading the optical information contained in the image, the imaging conditions can be appropriately adjusted with fewer attempts, regardless of the environment in which the information to be read is placed. Attached Figure Description

[0071] Figure 1 This is a block diagram illustrating the hardware structure of a reading device 100 according to one embodiment of the optical information reading device of this disclosure.

[0072] Figure 2 It means Figure 1 The diagram shows a functional block diagram of the structure of the reading device 100.

[0073] Figure 3 This schematically illustrates the time point from when the read is detected to trigger the start of the reading process. Figure 1 The diagram shows the basic execution timing of the reading process performed by the reading device 100 for reading optical information.

[0074] Figure 4A and Figure 4B This diagram schematically illustrates different examples of the execution timing of the reading process for reading optical information, which is performed by the reading device 100 starting from a point in time after a certain period of time has elapsed since the detection of the start of reading.

[0075] Figure 5 This is a flowchart of the process executed by the CPU 121 of the reading device 100 when a read start trigger is detected.

[0076] Figure 6A and Figure 6B This is an example diagram showing images taken in two consecutive frames. Figure 6C This is a diagram used to illustrate the estimation of the movement of the imaging sensor 111 based on the positions of feature points in these images.

[0077] Figure 7A This is a diagram illustrating an example of the range used as a template image in an image captured in a particular frame. Figure 7B This is a diagram illustrating an example of the search range compared to the template image in the next frame.

[0078] Figure 8A and Figure 8B These are diagrams illustrating examples of motion paths obtained by connecting the motion vectors of each frame within a predetermined time range T.

[0079] Figure 9 This is a flowchart of the target determination process 220 executed by the CPU 121 of the reading device 100.

[0080] Figure 10 yes Figure 9 The subsequent flowchart.

[0081] Figure 11 yes Figure 9 The flowchart for the movement estimation process in the processing.

[0082] Figure 12 Through Figure 5 The flowchart of the read routine initiated by the processing.

[0083] Figure 13A and Figure 13B These are figures illustrating different examples of the dimming range determined in the imaging adjustment process 212.

[0084] Figure 14 It is a diagram showing an example of the frequency distribution of pixels within the dimming range, and is used to illustrate the classification of pixels into black pixel class and white pixel class by discriminant analysis.

[0085] Figure 15 yes Figure 12 The flowchart of the imaging adjustment process 212 in the processing.

[0086] Figures 16A to 16C These are figures illustrating examples of images processed in each readout process 210 when the image adjustment process 212 is performed and the readout process 210 is retried multiple times. Figure 16D It is shown in magnification Figure 16C The image is a diagram.

[0087] Figures 17A to 17D They are shown respectively with Figures 16A to 16D The corresponding image is another example of an image that is being processed.

[0088] Figure 18A and Figure 18B They are respectively with Figure 4A and Figure 4B The corresponding figures show different examples of timing for performing read processing in the comparative examples of this disclosure.

[0089] Figure 19 In a variation of this disclosure, the CPU 121 of the reading device 100 executes the operation when a read start trigger is detected. Figure 5 The corresponding flowchart.

[0090] Figure 20 In another variation of this disclosure, when a read start trigger is detected, the CPU 121 of the read device 100 executes a process similar to... Figure 5 The corresponding flowchart.

[0091] Explanation of reference numerals in the attached figures: 20a, 20b…Image, 21…Code symbol, 22a, 22b…Reference point, 23, 24…Template image, 25…Search range, 41…Move end position, 42a~42n…Move vector, 43…Move start position, 44…Convergence range, 50a, 50b…Image, 51, 52…Dimming range, 53…Aiming light, 60…Curve of relative frequency distribution, 100…Reading device, 101…Reading target, 102a…Code symbol, 102b…String, 110…Optics, 111…Imaging sensor, 112…Lens, 113…L D, 114…Pulse LED, 120…Control Unit, 131…Operation Unit, 132…Notification Unit, 133…Display Unit, 141…Imaging Unit, 142…Image Acquisition Unit, 143…Information Reading Unit, 144…Output Unit, 145…Target Determination Unit, 146…Reading Control Unit, 147…Imaging Condition Setting Unit, 148…Exposure Time Upper Limit Setting Unit, 201…Frame (Imaging Frame), 210…Reading Processing, 211…Object Analysis Processing, 212…Imaging Adjustment Processing, 213…Filtering Processing, 214…Target Extraction / Decoding Processing, 220…Target Determination Processing Detailed Implementation The embodiments of this disclosure will be described with reference to the accompanying drawings.

[0092] Figure 1This is a block diagram showing the hardware structure of a reading device 100, which is an embodiment of the optical information reading device of this disclosure.

[0093] Figure 1 The reading device 100 shown is a device for optically reading optical information such as code symbols 102a and string 102b, which are represented by a portion of the light reflectivity on the reading target 101 that is different from the light reflectivity of the surrounding area.

[0094] The reading target 101 can be a static recording medium such as paper that carries code symbols 102a or string 102b, or a display that dynamically displays code symbols 102a or string 102b.

[0095] like Figure 1 As shown, the reading device 100 includes an optical unit 110, a control unit 120, an operation unit 131, a notification unit 132, and a display unit 133.

[0096] The optical unit 110 includes an imaging sensor 111, a lens 112, an LD (laser diode) 113, and a pulsed LED (light-emitting diode) 114, and is an imaging unit used to perform optical imaging of the image of the target 101.

[0097] The imaging sensor 111 is a light-receiving element used to image an image of an imaging target, such as the reading target 101, and may be, for example, constructed from a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor. Furthermore, the imaging sensor 111 can generate image data representing the grayscale value of each pixel based on the charge accumulated in each pixel of the image sensor through imaging, and output the image data to the control unit 120. In this imaging sensor 111, the pixels are arranged in a two-dimensional manner.

[0098] Lens 112 is an optical system for forming an image of reflected light from an imaging target on an imaging sensor 111.

[0099] LD113 is an illumination unit used to illuminate the imaging target with a aiming light (marking light) indicating the central position of the imaging range of the imaging sensor 111, so that the operator can orient the optical unit 110 (especially the imaging range of the imaging sensor 111) toward a reference for reading optical information on the target 101. The process of illuminating with the aiming light is an illumination process. The shape of the aiming light can be any shape, such as a circle, rectangle, or cross. The aiming light can also indicate a suitable target position or target range other than the central position.

[0100] The pulsed LED114 is a light projection unit that projects illumination light onto the imaging target.

[0101] Next, the control unit 120 includes a CPU 121, a ROM 122 storing the program executed by the CPU 121 and various tables and other data, a RAM 123 serving as the working area when the CPU 121 performs various processes, and a communication I / F 124 for communicating with external devices.

[0102] CPU 121 is a processor that executes a program stored in ROM 122 using RAM 123 as its operating area to control the operation of the entire reading device 100, including the optical unit 110, operation unit 131, notification unit 132, and display unit 133, thereby enabling the use of... Figure 2 Perform various functions described below. These functions may include reading, displaying, outputting to an external device, or storing optical information contained in the image data of the image captured by the imaging sensor 111, estimating the movement of the imaging sensor 111, controlling the processing related to the reading of optical information based on the estimation result, and adjusting the imaging conditions in the optics unit 110, etc.

[0103] The Communication I / F124 is an interface for communicating with various external devices, such as data processing devices that use the recognition results of string 102b.

[0104] Operation unit 131 is an operation unit such as a button or trigger for receiving operations from the operator. Notification unit 132 is a notification unit for providing various notifications to the operator. Specific notification methods may include displaying messages or data on a screen, illuminating or flashing lights, or outputting sound through a speaker, but are not limited to these. Display unit 133 is a display unit for displaying the content of the optical information read by the reading device 100, information related to the operating state of the reading device 100, etc., and may be composed of a liquid crystal display screen or the like. Notification unit 132 and display unit 133 may also be common hardware.

[0105] When the reading device 100 is operated automatically through external device control or autonomous control, the operation unit 131, notification unit 132 and display unit 133 may not be provided.

[0106] The aforementioned reading device 100 may be configured as a handheld or fixed code symbol reading device with character reading function, but is not limited thereto. As all or part of the hardware, a general-purpose computer such as a smartphone or personal computer may be used.

[0107] The features of the aforementioned reading device 100 include a method for estimating the movement of the imaging sensor 111, a control method for processing related to the reading of optical information based on the estimation result, and a method for adjusting the imaging conditions in the optical unit 110. These features will be described below.

[0108] First, the functions related to reading optical information provided by the reading device 100 will be explained.

[0109] Figure 2 This is a functional block diagram illustrating the structure of this function.

[0110] like Figure 2 As shown, the reading device 100 includes the functions of an imaging unit 141, an image acquisition unit 142, an information reading unit 143, an output unit 144, a target determination unit 145, a reading control unit 146, an imaging condition setting unit 147, and an exposure time upper limit setting unit 148. In the example described here, the functions of each part of the reading device 100, including the optical unit 110, are achieved by executing software through the CPU 121. However, some or all of these functions can also be achieved through a dedicated control circuit.

[0111] Figure 2 The imaging unit 141 shown has the following functions: controlling the optical unit 110 to periodically perform imaging, acquiring image data obtained through imaging in each frame (during the imaging cycle), and transmitting it to the image acquisition unit 142. That is, the imaging unit 141 also functions as an imaging control unit that performs the imaging control process. The imaging condition setting unit 147 determines the imaging conditions.

[0112] The image acquisition unit 142 has the function of holding the image data acquired by the imaging unit 141 so that the information reading unit 143, the target determination unit 145 and the imaging condition setting unit 147 can refer to it.

[0113] The information reading unit 143 is a reading unit that performs the following functions: acquiring image data from the image acquisition unit 142, performing processing such as target extraction and decoding, and reading optical information from the image represented by the image data. The actual processing performed depends on the type of optical information to be read and the environment in which the optical information exists.

[0114] That is, for example, when a character is assumed to be optical information, the information reading unit 143 can perform character recognition processing. In addition, when it is assumed that the optical information is in an environment that is difficult to read due to scratches, background patterns, etc., or when it is assumed that the state of the background such as paper, metal surface, or display screen changes, image analysis processing for identifying what the object being photographed and filtering processing for processing the image based on the analysis results to facilitate decoding can be performed before target extraction, decoding, and other processing.

[0115] In practice, the order and manner of processing can be selected based on operator input or automatic settings based on certain conditions. The imaging condition settings performed by the imaging condition setting unit 147 can also be performed in conjunction with the processing performed by the information reading unit 143.

[0116] The output unit 144 has the following functions: using the communication I / F 124 and the notification unit 132, it outputs the reading results, such as strings, obtained by the information reading unit 143 to an external device such as a data processing device that processes the data, and notifies the operator of successful reading. Notification to the operator can be performed by any method such as a buzzer or vibration, or it can be omitted if notification is not required. Furthermore, the output unit 144 may also have the function of displaying the reading results on the display unit 133.

[0117] The target determination unit 145 has the function of an estimation unit that estimates the amount of movement of the imaging sensor 111 within a specific time range by acquiring image data of each frame from the image acquisition unit 142 and parsing it in chronological order. The estimated amount of movement may include the amount of movement per frame and the amount of movement over a range of multiple frames. In addition, the estimated amount of movement may include a scalar amount of movement that can be expressed as translational or rotational movement without considering intermediate trajectories, and a range of movement that considers intermediate trajectories.

[0118] Furthermore, if the entire optical unit 110 is a rigid body, the amount of movement of the optical unit 110 can also be identified as the same as the amount of movement of the imaging sensor 111. Additionally, if the entire reading device 100 is a rigid body, the amount of movement of the reading device 100 can also be identified as the same as the amount of movement of the imaging sensor 111.

[0119] The reading control unit 146 has the following function: if the estimated movement amount estimated by the target determination unit 145 is below a predetermined benchmark (first benchmark), it restarts the processing performed by the information reading unit 143 as needed. (This will be used later.) Figure 4A and Figure 4B Describe the conditions for restarting.

[0120] The imaging condition setting unit 147 has the function of an imaging adjustment unit: adjusting the imaging conditions of the imaging unit 141 based on the content of the image data obtained through imaging and the imaging conditions used for imaging, and providing this adjustment to the imaging unit 141. The adjusted imaging conditions may include, for example, the exposure time and gain of the imaging sensor 111. They may also include the illumination intensity and illumination time of the pulsed LED 114.

[0121] The exposure time upper limit setting unit 148 has the function of setting the upper limit of exposure time set by the imaging condition setting unit 147. Alternatively or additionally, the exposure time upper limit setting unit 148 may also include the function of setting the upper limit of illumination intensity and illumination time of the pulse LED 114.

[0122] Next, use Figure 3 The basic execution timing of the reading process performed by the reading device 100 for reading optical information is explained. Figure 3 This is a schematic diagram illustrating the execution timing of the read process, starting from the detection time point triggered by the start of the read. Furthermore, Figure 3 The diagram of the processing performed by the target determination unit 145 is omitted.

[0123] exist Figure 3 In the middle, the horizontal axis represents the passage of time, and one of the quadrilaterals arranged in the upper layer represents the imaging time of a frame.

[0124] When the reading device 100 detects a reading start trigger indicating the start of reading optical information, such as through operator operation or receiving an external command, the imaging unit 141 begins imaging. Then, when one frame is captured, the image acquisition unit 142 retains the image data acquired through imaging.

[0125] Furthermore, when the reading device 100 detects that image data captured by a new frame 201 is held in the image acquisition unit 142 while the reading process 210 is not being executed, the reading device 100 begins the reading process 210, using the image data as the processing object to analyze the image and read the optical information included in the image. In this embodiment, the reading process 210 sequentially includes object analysis processing 211, imaging adjustment processing 212, filtering processing 213, and target extraction / decoding processing 214. The imaging adjustment processing 212 corresponds to the function of the imaging condition setting unit 147, while the other processes correspond to the function of the information reading unit 143.

[0126] Object analysis processing 211 is the process of performing image analysis to identify what the captured object is.

[0127] Imaging adjustment processing 212 is a process that adjusts the imaging conditions of the optics unit 110 based on the content of the image data and the imaging conditions used for imaging. However, when it is necessary to change the imaging conditions, the necessary settings are performed on the optics unit 110 in imaging adjustment processing 212, and imaging is performed according to the changed settings starting from the next frame. However, when the next read processing 210 starts, the image captured according to the changed settings becomes the object of read processing 210.

[0128] Filtering 213 is a process that processes image data based on the recognition results in object analysis 211 to improve the success probability of target extraction / decoding 214. AI (Artificial Intelligence) can be used in object analysis 211, and the algorithm and parameters of filtering 213 can be determined by AI.

[0129] The execution order of imaging adjustment processing 212 and filtering processing 213 is optional.

[0130] The target extraction / decoding process 214 involves extracting code symbols or characters representing the target from the image data representation after filtering 213, and performing decoding or character recognition to obtain the information to be read. The target extraction / decoding process 214 does not need to be separated into a target extraction part and a decoding part. For example, it could be a process where the AI ​​model pre-learns what an image of a specific size (e.g., 100×100 pixels) is, and the optical information in the image is determined by inputting the image into the already learned model.

[0131] When information is successfully read through target extraction / decoding process 214, the reading device 100 outputs the reading result. On the other hand, if the reading fails, the reading process 210 is retried. At this time, the image data of the latest frame 201a (using a letter symbol if a specific frame 201 is specified) that was imaged at the retry time point is used as the processing object.

[0132] The reading device 100 similarly repeats the reading process 210 until a predetermined number of retries is reached or information is successfully read. When the predetermined number of retries is reached, the operator is notified of the reading failure, and the reading process 210 is stopped.

[0133] Next, use Figure 4A and Figure 4B The execution control of the read process 210, which is one of the features of this embodiment, is described, while the processing performed by the target determination unit 145 is also taken into consideration.

[0134] Figure 4A and Figure 4B Different examples of execution timing for reading optical information, performed by the reading device 100, are illustrated schematically from a point in time after a certain period of time has elapsed since the detection of the start of reading.

[0135] Although Figure 3 The illustration is omitted, but each time the reading device 100 completes the imaging of a frame, it executes target determination processing 220 at the time indicated by the dashed line to estimate the movement of the imaging sensor 111. This processing corresponds to the function of the target determination unit 145. (This will be used later.) Figure 9 The details of the processing are described, but the target determination processing 220 in this embodiment includes processing to estimate the amount of movement of the imaging sensor 111 within a certain time range based on the images captured within that time range, and processing to estimate the amount of movement of the imaging sensor 111 in each frame.

[0136] Compared to the imaging frame 201 or the readout process 210, the target determination process 220 can be executed in a very short time of approximately 1 ms. The target determination process 220 can be executed in parallel with the readout process 210 in the CPU 121, or it can be executed when the readout process 210 is interrupted.

[0137] Here, as a case of using the reading device 100, the following approach can be considered: when the operator performs a reading start operation on the reading device 100 and gives a reading start trigger, the imaging range of the imaging sensor 111 is not yet aligned with the optical information of the reading target. Then the operator moves the reading device 100 so that it is aligned with the optical information of the reading target and keeps the reading device 100 stationary.

[0138] This static state is typically the state in which the operator subjectively believes that the reading device 100 can read the optical information of the target to be read through the current positional relationship, and in many cases, the actual imaging range and the positional relationship of the optical information are also suitable for reading. In other words, this static state can be said to be the state in which the reading device 100 is positioned relative to the target of the optical information to be read. However, when the operator manually operates the reading device 100, the reading device 100 is not completely static.

[0139] In this usage scenario, such as Figure 3 As described, during a certain timing period when the reading device 100 repeatedly executes the reading process 210, the reading device 100 is (almost) stationary. Figure 4A and Figure 4B In the diagram, the timing is represented by arrow A.

[0140] Furthermore, in the target determination process 220 performed based on imaging several frames later, the estimated result of the movement range of the imaging sensor 111 within the most recent predetermined time range T (during a predetermined number of frames) falls within a predetermined convergence range. That is, the amount of movement obtained as the movement range is below a predetermined reference. When this condition is met, the reading device 100 (almost) stops, and the target for the optical information is determined. Figure 4A and Figure 4B In the diagram, the timing is represented by arrow B.

[0141] At the timing indicated by arrow B, read processing 210 is considered to be in progress, but the specific stage within read processing 210 varies depending on the situation. Object analysis processing 211 may have just begun, or target extraction / decoding processing 214 may be nearing completion.

[0142] Here, if the read process 210 executed at the timing of arrow B processes image data captured in frames at least after the timing of arrow A, then since imaging is performed under a defined target condition, the target extraction / decoding process 214 is unlikely to fail due to severe image blur or the optical information of the target being outside the imaging range. Therefore, it can be expected that the read process 210, which continues to execute as is, has a high probability of successful reading.

[0143] However, it is not easy to accurately specify the timing of arrow A. On the other hand, it is assumed that in the target determination process 220, the estimation result of the movement range first falls within the predetermined convergence range when the predetermined time range T starts near the timing of arrow A. Therefore, in this embodiment, the image data captured within the predetermined time range T in the target determination process 220 executed at the timing of arrow B is used as the processing object as a reference (called "reference R"). If reference R is satisfied, the reading process 210 continues to be executed as is at the timing of arrow B.

[0144] Figure 4A The illustration shows the end of a read process 210a within a predetermined time range T (in the case of read process 210 indicating a specific time, letter reference numerals are used), and at the timing of arrow B, an example is shown of the execution of the next read process 210b, which processes image data of frame 201b within the predetermined time range T. In this case, the read device 100 continues the read process 210b as is.

[0145] On the other hand, if the object of the read process 210 during the timing of arrow B is image data captured in a frame prior to the timing of arrow A, then since the image was captured in a state where the target was not determined, the target extraction / decoding process 214 is highly likely to fail due to severe image blurring or the optical information of the target being outside the imaging range. Therefore, it can be assumed that even if the read process 210 continues, the read will fail, thus wasting processing time.

[0146] Therefore, in this situation, the reading process 210, which was stopped at the time indicated by arrow B, restarts. That is, if the reference R is not met, the reading process 210 restarts using the aforementioned reference R. The image data to be processed in the new reading process 210 can be any image data captured within a predetermined time range T, but considering the... Figure 3 The commonality of the envisioned repeated readout process 210 is that the image data of the latest frame is preferably used as the processing object. Alternatively, the image data captured in the frame with the smallest estimated movement of the imaging sensor 111 in each frame can be used as the processing object.

[0147] Figure 4B An example is shown where the read process 210a, executed at the time of arrow B, begins before a predetermined time range T. In this case, the image data to be processed was naturally captured before the predetermined time range T and does not meet the reference R. Therefore, the read device 100 stops the read process 210a at the time of arrow B and restarts the read process 210b with the image data captured in the latest frame 201c as the processing object.

[0148] In this scenario, although read processing 210a is wasted, the time spent waiting for read processing 210a, which might fail, to finish is saved, and read processing 210b, which has a relatively high probability of success, can begin earlier. Therefore, it can be said that the time until the read result can be output can be shortened by the saved waiting time.

[0149] Here, even in Figure 4A In the aforementioned case, a new read process 210b may need to begin at the timing of arrow B, without determining the reference R. Even in this case, the probability of a successful read can be expected in the restarted read process 210b. Figure 4B The situation is the same. However, in this case, from Figure 4A and Figure 4B The comparison shows that the start timing of the new read processing 210b is faster than... Figure 4A The situation is delayed. This is because the time for the read processing 210, which was performed within the predetermined time range T, was wasted.

[0150] Conversely, it can be said that by judging the benchmark R, the ongoing read process 210 can continue to be executed if the benchmark R is satisfied, which can further shorten the time until the read result can be output compared to the case where a new read process 210b must be started at the timing of arrow B.

[0151] Furthermore, even in Figure 4A and Figure 4B In any case, reading and processing image data captured under a defined target condition using 210b may not be successful. This is because there is a possibility that the image's brightness and contrast are not suitable for decoding. In such cases, [the process may be different]. Figure 3 The situation described above is the same, requiring a retry. However, since the start time of the read process 210 after a retry can be advanced by advancing the start time of the read process 210, the time until the read result can be output can be shortened even if a retry is required.

[0152] Furthermore, in the example described here, once the target has been determined, the target determination process 220 is not executed, and therefore a new read process 210 is not started midway through the read process 210. However, as will be explained later in the variant examples, this is not necessary.

[0153] Next, a flowchart will be used to describe in more detail how the reading device 100 is used to achieve its purpose. Figure 2 Explanation of functions and usage Figures 3 to 4B The processing described herein is the processing performed in accordance with the actions described. The processing described here is the processing of an embodiment of the optical information reading method of this disclosure.

[0154] first, Figure 5 The flowchart illustrates the process executed by CPU121 when a read start trigger is detected.

[0155] In this process, CPU 121 first instructs optics 110 to image under pre-registered default imaging conditions (S11). Then, optics 110 continuously performs imaging operations according to the imaging conditions set during each frame until an instruction to stop imaging is given. The imaging conditions can be changed midway. The default imaging conditions can always be the same, or they can be automatically changed according to user settings or environmental conditions detected by any sensor.

[0156] Next, CPU121 starts up. Figure 12 The read routine shown is (S12). Figure 12 The read routine is related to Figures 3 to 4B The read process 210 shown here, along with its retry-related processing, will be described in detail later.

[0157] Then, CPU 121 waits until the imaging sensor 111 completes the imaging of the next frame (S13), and when it does, executes... Figure 9 and Figure 10 The target determination process 220 (S14) is shown. The specific content of the target determination process 220 will be described later.

[0158] If the CPU121 determines in the target determination process 220 that no target has been determined (S15 "No"), and if the execution of the reading routine is continuing (S16 "Yes"), then it returns to step S13 and repeats the process. That is, the target determination process 220 is executed each time an image of one frame is completed.

[0159] When the reading routine in step S16 finishes processing, CPU 121 instructs optics 110 to stop imaging (S21) and terminates the process. This route is followed when the target is not determined before a successful read or a predetermined number of retries to determine if a read has failed, and only at the very end does the process begin as described above. Figure 4B The new read processing 210b is shown.

[0160] On the other hand, if the target is determined in step S15, CPU 121 confirms which frame's image data of the processing object in the reading routine is the data from (S17). Then, if the image data of a frame within the period (predetermined time range T) counted in the most recent target determination process 220 is not the processing object ("No" in S18), then restarting... Figure 12 The read routine (S19) is then executed. This initiates a new read process 210. The currently executing read routine can be stopped. Alternatively, it can be... Figure 12 In step S88, the retrieval count referenced is handed over from the executing read routine to the restarted read routine. This path corresponds to... Figure 4B The situation.

[0161] If the answer in step S18 is "Yes", then step S19 is skipped, and the read routine continues execution as is. This path corresponds to Figure 4A The situation.

[0162] In any case, the CPU 121 waits until the reading routine ends while monitoring its execution (S20). When the reading routine ends, it instructs the optical unit 110 to stop imaging (S21) and terminates the process.

[0163] Through the above processing, the output can be shortened until it is ready for use. Figure 4A and Figure 4B The time for reading the results is described. Steps S15 to S19 are the processing of the read control process, corresponding to the function of the read control unit 146.

[0164] Next, use Figures 6A to 8B Briefly describe the estimation of the amount of movement of the imaging sensor 111 and the determination of whether the target is identified in the target determination process 220.

[0165] first, Figure 6A and Figure 6B Examples of images 20a and 20b taken in two consecutive frames are shown. Image 20a is an image from the previous frame, and image 20b is an image from the following frame. Each image includes code symbols 21 as optical information of the target. Reference numerals 22a and 22b indicate the positions of imaginary reference points used to estimate the distance traveled in each of images 20a and 20b.

[0166] When the imaging sensor 111 moves between the imaging timing of one frame and the imaging timing of the next frame (relative to the code symbol 21), the position of the code symbol 21 in the images 20a and 20b captured by these two frames is different. Here, since it is assumed that the operator rarely rotates the imaging sensor 111 (including the optical part 110 of the imaging sensor 111) or the code symbol 21 (the readout target carrying the code symbol 21) near the time point of target determination, it can be said that the amount of movement of the code symbol 21 in the image corresponds to the amount of movement of the imaging sensor 111 if only translational movement is considered.

[0167] Therefore, by detecting the position of the reference point in image 20a in image 20b, and placing their positions as follows: Figure 6C As shown, the amount of movement of the imaging sensor 111 within a frame period between two frames can be estimated.

[0168] The vector from the reference point position 22b in the subsequent frame image 20b to the reference point position 22a in the previous frame image 20a (called the "motion vector") represents an estimate of the direction and magnitude of movement of the imaging sensor 111 between the two frames. However, if the image scale (the distance of each pixel in real space) is unknown, the distance of movement in real space cannot be determined. Although the magnitude of the motion vector is determined in pixels, only the relative magnitude of the movement distance can be estimated. If the image scale can be estimated separately, the movement distance can be estimated.

[0169] Furthermore, near the point in time when the target is identified, the operator is unlikely to move the imaging sensor 111 or the code symbol 21 in a direction perpendicular to the surface appearing in the image, and when determining whether the target is identified, it can be assumed that the relative movement direction between the imaging sensor 111 and the code symbol 21 is only substantially parallel to the direction of the surface appearing in the imaging image.

[0170] Therefore, it is assumed that all points in image 20a move by the same amount in the same direction in image 20b. Thus, regardless of which point in image 20a is used as the reference point, the resulting motion vector is the same. However, since it is necessary to prevent the reference point from deviating from the frame of image 20b due to motion, it is preferable to set the reference point near the center of the image.

[0171] Furthermore, in practical processing, it is difficult to accurately estimate the position of a specific point on image 20a in image 20b. Therefore, a predetermined range near the center of image 20a is used as a template image, and it is sequentially compared with images of the same size at various locations in image 20b to search for the location that is most similar to the template image (with the smallest difference). Then, assuming the template image is moved to the location that can be determined as the most similar, a movement vector is obtained.

[0172] Figure 7A An example of the range used as a template image in image 20a is shown.

[0173] Here, when determining the moving destination, since changes in the black-and-white and color patterns of the image can be detected, the moving destination can be determined more accurately. Therefore, it is preferable to sample many pixels of the optical information portion of the target. However, when using a wide-range image as a template image, sparse sampling of points within that range is necessary to improve processing speed, thereby reducing the determination accuracy. Furthermore, even when the optical information of the target is small and a monochrome background extends around it, the contribution of the optical information portion becomes smaller if a wide-range image is used, thus reducing the determination accuracy.

[0174] On the other hand, while dense sampling is possible when using images with a narrow range, the problem arises when localized brightening or darkening of the image creates entirely white or black areas, leading to increased similarity even at locations different from the actual movement. Furthermore, in images like barcodes that include targets with parallel linear outlines, the problem of increased similarity exists at locations where movement occurs parallel to the outlines, regardless of actual movement.

[0175] Therefore, in this embodiment, as Figure 7A As shown, a wider-range template image 23 and a narrower-range template image 24 are used, and each template image is compared with image 20b. For example, the center of template image 23 can be matched with image 20a, and the number of pixels can be set within half the range of the entire vertical and horizontal images, and template image 24 is similarly set within a quarter of the number of pixels.

[0176] In addition, Figure 7B In the example shown, using a wide-range template image 23, an example of a search range 25 for comparison with the template image 23 in image 20b is illustrated. The search range 25 can be a region where the perimeter of the position of the template image 23 in image 20a is extended by approximately the width of the maximum value of the movement to be obtained as the estimation result. When the search range 25 is taken to be too wide, the computational load increases, and the time required for the target determination process 220 becomes longer; therefore, this can be taken into account when determining the width of the search range 25.

[0177] By cutting the image into the same size as the template image 23 from each position within the search range 25, and sequentially obtaining the differences from the template image, the position with the smallest difference can be determined.

[0178] As described above, by obtaining the motion vector for each frame within a predetermined time range T and concatenating each obtained motion vector, the movement path and range of the imaging sensor 111 within the predetermined time range T can be estimated. Strictly speaking, the image scale can be considered different in each frame; however, considering the direction of movement near the actual point of target determination, it can be assumed that even ignoring the scale difference, an estimation accuracy sufficient for determining whether the target is determined can be obtained. This has been confirmed in experiments conducted by the inventors.

[0179] Figure 8A and Figure 8B An example of a motion path obtained by concatenating the motion vectors of each frame within a predetermined time range T obtained in this way is shown.

[0180] Each arrow in the diagram represents a movement vector, and reference numeral 41 indicates the hypothetical end position of the movement within a predetermined time range T. The movement vectors for each frame are arranged sequentially such that the movement vector 42a of the last frame is arranged so that the leading edge reaches the end position 41, and the movement vector 42b of the previous frame is arranged so that the leading edge reaches the root of movement vector 42a. Thus, the position of the root of the movement vector 42n of the first frame becomes the hypothetical start position 43 of the movement within the predetermined time range T.

[0181] For example, when the movement vectors 42a to 42n arranged in this way all fall within Figure 8A When the movement of the imaging sensor 111 is within the predetermined convergence range 44 centered at the end position 41, it can be determined that the target is determined below the first reference.

[0182] On the other hand, even if the end position 41 and the start position 43 are the same as... Figure 8A The situation is the same as shown, when... Figure 8B When at least a portion of the movement vectors 42a to 42n, as shown, exceeds the convergence range 44, it can be determined that the target is in an uncertain state.

[0183] When the target is identified, even if the imaging sensor 111 moves slightly due to the operator's hand movement, it is considered that the imaging sensor 111 has only moved near a specific point, and from this point of view, the imaging sensor 111 is considered to fall within the convergence range 44. Even if the amount of movement per frame is slightly larger, if the movement is only near a specific point, it can be interpreted as the target being identified. Therefore, it can be considered that using the convergence range 44 as a reference can more accurately detect the identification of the target compared to using only the amount of movement as a reference.

[0184] Furthermore, even if the target is identified, the image blur may increase if the amount of movement per frame is large, potentially causing the reading process 210 to fail. Therefore, in this embodiment, even if the amount of movement per frame (the average size of the movement vector) exceeds a predetermined threshold, the target is determined to be unidentified. However, setting this threshold is not mandatory.

[0185] Next, Figure 9 and Figure 10 A flowchart is shown for the target determination process 220 used to perform the target determination as described above. Additionally, Figure 11 It shows Figure 9 The flowchart for the movement estimation process in the processing.

[0186] The target determination process 220 is the process of the estimation process, which corresponds to the function of the target determination unit 145.

[0187] exist Figure 9 In the target determination process 220, CPU 121 first acquires image data captured in the latest frame and the previous frame (S31). Then, it cuts out a template image of a first wide range from the image data of the previous frame (S32) and uses the template image to perform... Figure 11 The motion estimation process (S33) is performed. The template image is shown in the reference image. Figure 7A As explained.

[0188] exist Figure 11 In the motion estimation process, CPU 121 first sets the range of the region in the latest frame image corresponding to the template image by expanding it vertically and horizontally by p1 pixels as the first search range (S61). Then, images of the same size as the template image within the first search range at vertical and horizontal positions d1 pixels respectively are used as comparison images, and SSDA (Sequential Similarity Detection Algorithm) is performed on each comparison image (S62).

[0189] In SSDA, SAD (Sum of Absolute Difference) = RSAD is obtained for each position according to mathematical formula 1. At the same time, if SAD exceeds a certain threshold during the addition of Σ, the calculation stops.

[0190]

Mathematical Formula 1

[0191] Furthermore, when SSDA has a high processing load and takes too much time to compute, computation can be performed only on pixels sampled at appropriate intervals in the template image and the contrast image, such as every other pixel or every two pixels.

[0192] In the SSDA step S62, the minimum SAD within a single search range can be obtained, indicating the location of the contrast image with the smallest difference from the template image. This location can serve as a candidate for the template image's moving destination. Furthermore, when it is known that the SAD is not minimum, the calculation can be interrupted midway through the Σ addition, thus suppressing the overall computational load. In addition, SAD can be used as an indicator of the degree of difference between two images, but other indicators can also be used.

[0193] Next, CPU121 sets the range of vertical and horizontal expansion by p2 pixels at the position of the comparison image with the minimum SAD obtained by SSDA as the secondary search range (S63). Where p2 < p1. Then, images with the same size as the template images at positions d2 pixels vertically and horizontally within the secondary search range are used as comparison images, and SSDA is performed on each comparison image (S64). Where d2 < d1.

[0194] The processing in steps S63 and S64 more accurately searches the vicinity of the mobile destination candidates obtained in steps S61 and S62.

[0195] CPU 121 estimates that the position with the minimum SAD obtained in SSDA in step S64 is the moving destination of the template image in the latest frame, and generates a vector representing the movement from that position to the position of the template image as a movement vector (S65). In addition, for the comparison image with the position of minimum SAD, ZNCC (Zero-mean Normalized Cross-Correlation) = RZNCC is calculated, and its value is stored as similarity (S66), and returned to the original processing.

[0196] ZNCC can be obtained from mathematical formula 2 and can be used as an indicator of the similarity between two images. However, other indicators can also be used instead. In cases of low similarity, the moving destination obtained through SSDA can be considered unreliable.

[0197]

Mathematical Formula 2

[0198] Then, CPU 121 selects the larger of the similarity values ​​obtained through the motion estimation process in the first and second ranges as the processing object (S36), and determines whether the similarity obtained for the processing object is above a predetermined threshold (S37). This threshold can be determined based on the degree of similarity required for the SSDA results to be reliable.

[0199] If the result in step S37 is "Yes", then the CPU 121 stores the movement vector obtained for the processing object as the movement vector corresponding to the latest frame (S38). If the result is "No", then the movement vector obtained this time is not used, and it is stored as if there is no movement vector corresponding to the latest frame (S39).

[0200] In any case, the CPU 121 then determines whether the processing for the predetermined number of frames has been completed (S40). That is, it determines whether the target determination processing 220, which involves a sufficient number of frames to determine whether the target has been determined, has been executed. The predetermined number of frames corresponds to... Figure 4A and Figure 4B The predetermined time range T is shown. Although in Figure 4A and Figure 4B Six frames are shown, but this is not the only one.

[0201] If the answer in step S40 is "Yes", then the process continues to... Figure 10 Step S41.

[0202] Then, CPU121 sequentially determines: whether a motion vector has been stored for a predetermined number of the most recent frames (above a predetermined percentage), that is, whether the similarity exceeds a threshold (S41) in step S37, whether the average size of the motion vectors stored for the most recent predetermined number of frames is below a threshold (S42), and the trajectory connecting the motion vectors stored for the most recent predetermined number of frames (motion range: refer to...). Figure 8A , Figure 8B Whether it falls within the predetermined convergence range 44 (S43).

[0203] If all of these steps are "yes", the CPU 121 determines that the target for reading the optical information of the target has been identified (S44). Even if one step is "no", it is determined that the target has not been identified (S45). Even if the step S40 is "no", since sufficient information to identify the target has not been obtained, it is determined that the target has not been identified (S45). After step S44 or S45, the process returns to the initial state.

[0204] Furthermore, the determination in step S41 is set because if the number of reliable movement vectors is too small, the determination of the movement range in step S43 cannot be properly performed. The predetermined proportion can be, for example, 25%.

[0205] Regarding the judgment in step S42, for example, even if the movement range as a whole falls within the predetermined convergence range 44, it is difficult to determine the target if the movement in each frame is too large, and the target is considered to be an unsuitable state for reading. Therefore, the judgment in step S42 is provided.

[0206] The judgment in step S43 is to use Figure 8A and Figure 8B The judgment is explained. However, when connecting motion vectors to obtain an estimate of the movement range, motion vectors not used in step S39 can be ignored during connection. For example, if the motion vector of frame N is not used, the beginning of the motion vector of frame N-1 can be connected to the root of the motion vector of frame N+1.

[0207] Through the above processing, the reading device 100 can estimate the movement of the imaging sensor 111 and, based on the result, determine whether a target for reading optical information has been identified. Furthermore, when performing the determination considering the movement path in step S43, at least two movement vectors are required. This is because if there is only one, it is no different from simply considering the distance or magnitude of the movement. Therefore, to determine that a target has been identified, at least two target determination processes 220 need to be performed, and at least three frames of image data are used for this purpose.

[0208] Next, Figure 12 Indicates passage Figure 5 The flowchart shows the process of starting the read routine.

[0209] Reading routines and Figure 5 The processing is executed in parallel, and steps S81 to S85 are using... Figure 3 The read process 210 described herein, after step S86, involves handling retrying. Additionally, the read routine handles the read process, in which CPU 121 acts as the read unit.

[0210] In the reading routine, CPU 121 first acquires the image data of the image currently captured in the latest frame, as the processing object (S81). Then, CPU 121 sequentially performs object analysis processing 211, imaging adjustment processing 212, filtering processing 213, and target extraction / decoding processing 214 on the image data of the processing object (S82-S85). These processes utilize... Figure 3 The processing described below, image adjustment processing 212, will be described in detail later.

[0211] Following the above, CPU 121 determines whether the optical information reading was successful through target extraction / decoding processing 214 (S86). If successful, it outputs the data obtained through the reading as the reading result (S87) and ends the processing. If the process fails in step S86, it returns to step S81 and repeats the process until the number of retries exceeds a predetermined value ("No" in S88). When the predetermined value is exceeded ("Yes" in S88), it outputs a reading error (S89) and ends the processing.

[0212] Through the above, the reading device 100 performs its function. Figure 3 The action described.

[0213] Next, refer to Figures 13A to 14 The basic idea of ​​imaging adjustment processing 212 is explained.

[0214] Imaging adjustment processing 212 is the process of adjusting the imaging conditions of the optical unit 110 based on the content of the image data and the imaging conditions used for the imaging, as described above. More specifically, it adjusts the cumulative amount of light provided to the imaging sensor 111 and the magnification (gain) of the imaging sensor 111 during imaging.

[0215] Furthermore, the frequency distribution of pixel values ​​in a specific region (called the "dimming range") of an image acquired under certain imaging conditions is obtained, and a brightness index value (called the "brightness index value") of the image is obtained as an adjustment reference based on this frequency distribution. Then, the accumulated light intensity and magnification are adjusted so that, for an image acquired through a subsequent imaging session, the brightness index value obtained is similarly a predetermined target brightness index value; that is, the brightness of the image acquired through the next imaging session is a predetermined target level determined by the target brightness index value. Furthermore, the brightness index value and target brightness index value described below are not numbers that directly represent the brightness of the image itself, but can represent the brightness level of the image.

[0216] Figure 13A and Figure 13B An example of the dimming range determined in the imaging adjustment process 212 is shown.

[0217] Figure 13A An example of a relatively wide dimming range 51 determined in a state where the target is not determined (not determined as a target in the target determination process 220) is shown. Figure 13B The example shown is a relatively narrow dimming range 52 determined under the condition of a defined target. These dimming ranges 51, 52 are reference positions for obtaining a range of pixel values ​​used as a reference for adjusting imaging conditions.

[0218] Here, in the imaging adjustment process 212, the adjustment is based on the image within the dimming range rather than the entire image because the imaging conditions are adjusted based on the state of the image near the target's optical information, ensuring that the optical information appears in the image in a way that is easy to read. Therefore, ideally, the dimming range can be exactly the same as the area containing the optical information.

[0219] However, determining the location of optical information in an image becomes increasingly difficult when imaging conditions need to be adjusted. Therefore, in a state where the target of optical information is unknown, it is expected that the optical information exists somewhere internally, such as... Figure 13A As shown, a relatively wide range in image 50a is set as the dimming range 51. If the aiming light 53 can be detected, the periphery of the image can be determined with the aiming light 53 as the center, or the image can be determined with the central position of image 50a as the center. Other suitable positions can also be used as references.

[0220] On the other hand, such as Figure 13AAs shown in image 50a, for example, when the barcode, which serves as optical information, is carried by a non-luminous body, and there is a strong light source such as a window with incident light around it, the characteristics of the image, such as the brightness of the surrounding area, may differ greatly. In this case, if a wide range is set as the dimming range, the imaging conditions may be adjusted based on the parts whose characteristics differ greatly from those of the optical information. Figure 13A In the example, although part of the optical information is dark, adjustments are made to darken the image because the surrounding area is bright.

[0221] Even when the target is not determined, the imaging conditions are not adjusted based on the entire image, but the dimming range 51 is determined on a portion of the image 50a to mitigate the drawback to some extent.

[0222] On the other hand, given that the target of the optical information has been determined, assuming the operator aligns the aiming light, illuminated by the LD113, with the location of the optical information to be read, it can be expected that optical information exists around the aiming light. Therefore, as... Figure 13B As shown, it can be considered that by setting the dimming range 52 in a narrower range (at least narrower than the dimming range 51) around and near the position of the aiming light 53 in the image 50b, adjustments can be made that contribute to the successful reading of optical information.

[0223] Considering the standard operating conditions of the reading device 100 and the standard carrying mode of optical information, the size of the dimming range 52 can be determined such that, when the target is identified, it can be expected that an image of the background outside the carrier surrounding the optical information to be read will not be captured at a non-negligible rate. Multiple candidates can be prepared and switched according to the setting of the reading mode.

[0224] Without using aiming light 53 or when aiming light 53 cannot be detected, assuming the operator aligns the area near the center of the imaging range with the location of the optical information, a similar effect can be expected by determining a narrower range near the center of image 50b. However, the dimming range 52 can also be determined based on another suitable location in the image, for example, assuming the operator aligns it with the optical information.

[0225] By determining the narrow dimming range 52 as described above, even when the characteristics such as the brightness of the optical information differ significantly from those of the surrounding image, the imaging conditions can be adjusted based on the state of the image near the optical information, so that the optical information is displayed in the image in an easily readable manner.

[0226] The above-mentioned adjustment of the cumulative light intensity and magnification of the image based on the dimming area can be performed as an example as follows.

[0227] First, sample several pixels evenly from the dimming area, sum the pixel values, and obtain the frequency distribution. For example, consider sampling 400 points, including 20 vertical points × 20 horizontal points.

[0228] Figure 14 An example of frequency distribution is shown. Reference numeral 60 indicates a curve representing the relative frequency distribution. The aforementioned brightness index values ​​can be obtained from this frequency distribution.

[0229] For example, the inventors' experiments have shown that when using a wider dimming range 51, and where a brighter pixel corresponds to a larger pixel value, setting the pixel value at an appropriate quantile near the upper limit of the cumulative relative frequency to the brightness index value D is effective. c Furthermore, at 1024 grayscale, a relatively good adjustment can be achieved by setting the target brightness index value to around 600. (The brightness index value D...) c Setting the quantile to near the upper limit rather than the upper limit is to exclude the portion of white jumps caused by positive reflection.

[0230] Moreover, assuming D b It is the black level of imaging sensor 111, I c It is to obtain the brightness index value D c The cumulative amount of light in the imaging, g c If the magnification k of the imaging sensor 111 is a proportionality constant determined by the surrounding environment during imaging, then the following relationship holds.

[0231] D c -D b =k×I c ×g c (1) Furthermore, assuming that in order to achieve the target brightness index value D T The cumulative light intensity and magnification were set to I, respectively. n g n Similarly, the following relationship can be established.

[0232] D T -D b =k×I n ×g n (2) The following relationship is derived from equations (1) and (2) above.

[0233] I n ×g n = (D) T-D b ) / (D c -D b )×I c ×g c (3) Therefore, when adjusting imaging conditions, it is possible to base it on D. c D T D b I c、 g c The value of I is obtained according to equation (3). n and g n The value is set in the optical section 110.

[0234] Furthermore, in the case of imaging in a bright environment without illumination, the cumulative light intensity I c and I n The exposure time of the imaging sensor 111 can be defined as the accumulated light amount I when shooting in a dark environment with illumination. c and I n It can be defined by the cumulative amount of light emitted (the illumination time when the light amount is constant). Therefore, when adjusting imaging conditions, at least one of the exposure time and the illumination time can be adjusted.

[0235] In addition, I is obtained from equation (3). n ×g n The target value, I that satisfies the target value n and g n There are countless combinations of values ​​for I. Among them, as long as the specific I is chosen appropriately... n and g n The value can be determined by the given information. As a basic concept, if the magnification g of the imaging sensor 111... n If the value is too large, the noise in the image will increase, and if the exposure or illumination time is prolonged, the image will become blurry. Therefore, it will not cause I n and g n Instead of one of them becoming very large, the two can be adjusted to achieve a good balance.

[0236] On the other hand, the inventors' experiments show that, when using a narrower dimming range 52, the brightness index value D is determined by the inter-class threshold when pixels are classified into two categories—black pixels (small pixel value, dark pixels, category 1) and white pixels (large pixel value, bright pixels, category 2)—based on the pixel values ​​of each sampled pixel. c This allows for better adjustments. At this point, the inventor's experiments showed that by adjusting the brightness index value D... cThe value set to represent a pixel value that is brighter than the threshold (larger in this example), and especially a pixel value that is brighter than the threshold (larger in this example) near the threshold, can be adjusted particularly well.

[0237] For example, discriminant analysis can be used to classify them into two categories, as shown below.

[0238] First, if the value of the threshold n is determined to be a certain value, then as follows Figure 14 As shown, for each category, the number of pixels belonging to that category, as well as the mean and variance of the pixel values ​​belonging to that category, can be obtained. The mean and variance of the pixel values ​​for all pixels can also be obtained. Then, based on these values, the intra-class variance σ, as shown in Equation 3, can be obtained. w 2 Within-class variance is a value obtained by taking a weighted average of the variance of pixel values ​​in each class, considering the number of pixels belonging to each class. The within-class variance decreases when pixel values ​​are clustered in the partitioned classes.

[0239]

Mathematical Expression 3

[0240]

Mathematical Expression 4

[0241]

Mathematical Expression 5

[0242] When using a narrower dimming range of 52, the brightness index value D cPreferably, it represents a pixel value that is brighter than a threshold n. Furthermore, a brightness index value D is more preferred. c It is not a value far from the threshold n, but rather a value near the threshold n as in the example above.

[0243] Here, the vicinity of the threshold n is set as the brightness index value D. c The goal is to adjust the brightness of the lowest luminance portion of the white area to the target brightness. That is, to adjust the white areas deeply embedded in the darkest areas to the target brightness index value D. T The brightness (pixel value) is represented.

[0244] For example, when the object to be read is a barcode, the brightness index value D can be determined based on the area proportions of the thin bars defined by the barcode standard. c The degree to which it approaches the threshold n.

[0245] The pixels that image the white bars in a barcode are roughly classified as white pixels. However, compared to thick white bars, thin white bars are more easily obscured by the black bars on either side, resulting in smaller pixel values ​​(dark values). Therefore, it can be assumed that within the white pixel class, the pixels that image the thin white bars also cluster on the side with smaller pixel values ​​(the side closer to the threshold n).

[0246] Therefore, when the area ratio of the thin to thick white bar is 30:70, a narrow dimming range 52 can also be used to achieve the target, and when it is assumed that the barcode exists in the entire area within the dimming range 52, the brightness index value D is used. c Placing it in a position where the number of pixels is no more than 30% lower than the number of white pixels, the pixel value of the thin white bar can be set to the brightness index value D. c .

[0247] Additionally, for example, in the Code 128 standard, the character code "d" is represented by black-white-black-white-black-white bars of varying thicknesses in a 1:4:1:2:2:1 ratio. There are three types of white bars sandwiched between the black bars, with a width ratio of 4:2:1. The area of ​​the thinnest white bar is 1 / (4+2+1) = 14.2% of the white portion. Therefore, it is assumed that the pixels of the thinnest white bar are concentrated in the lower 14.2% of the white pixel class in terms of pixel count. This is achieved by using the brightness index value D... c Setting the pixel value to a value within this range will set the pixel value of the thinnest white bar to the brightness index value D. c .

[0248] Although the correspondence between pixel count and pixel value varies depending on the captured image, based on the image of the expected readout target image imaged under various conditions, as mentioned above, the range of pixel values ​​for the thinnest white bar can be estimated, and the brightness index value D can be predetermined.c How many pixels higher than the threshold n should the brightness index D be to achieve this? c It falls within that range.

[0249] As an example, in the case of reading barcodes, the inventors' experiments showed that if the pixel value is approximately 5% larger than the maximum pixel value than the calculated threshold n, then optimized imaging conditions can be adjusted. Furthermore, for example, the pixel values ​​can be divided into approximately 20 levels, and the level value one level higher than the threshold n can be used as the brightness index value D. c .

[0250] In addition, each time brightness is adjusted, pixel values ​​included in a lower predetermined ratio can be obtained based on the distribution of pixel values ​​in the white pixel class.

[0251] Similarly, when reading QR codes or performing OCR, the brightness index value D can be determined based on the area ratio of the most damaged white portion among the white parts appearing in the code symbol or character set to be read. c It should be set to a pixel value that is how much higher than the threshold n.

[0252] However, when the percentage of the most damaged white area is very small, the luminance index value D is determined based on this percentage. c This isn't always useful. However, by appropriately setting the obtained threshold n itself, or a value near the threshold n (e.g., a pixel value approximately 5% larger than the maximum pixel value), to the brightness index value D... c And as described later, gradually increase the target brightness index value D. T Then you can search for the appropriate brightness.

[0253] Even when using the brightness index value D obtained as described above c In the same case as above, I can also be obtained according to equation (3). n ×g n The target value. Additionally, the target brightness index value D... T The same value as in the case of wide dimming range 51 (where the target is not determined) can be used. In the case of narrow dimming range 52 using discriminant analysis (where the target is determined), a pixel value close to the upper limit is used as the brightness index value D. c Compared to the case with a wide dimming range of 51, the brightness index value D c The value tends to decrease; therefore, it is considered that if the same value is used as the target brightness index value D... T The adjusted image will then be brighter than the image obtained with a wide dimming range of 51. This is because the brightness index value D... c The difference in calculation methods leads to the above-mentioned brightness index value D. cThe magnitude relationship between them may not apply to every image, but it can be assumed that as long as the image is one from which optical information can be read, the brightness index value D... c The size relationship between them is almost certainly true.

[0254] With a narrow dimming range of 52, imaging conditions can be adjusted by focusing on the image near the optical information. Therefore, by making such adjustments, only the parts of the optical information represented by black (parts with low light reflectivity) remain low pixel values, while other parts, including the background and the parts represented by white (parts with high light reflectivity), are high pixel values. Thus, it is expected that the contrast of the optical information can be improved.

[0255] The luminance index value D is determined by focusing on the intra-class variance and the threshold values ​​when classifying pixels into dark and bright categories. c Adjustments are made based on this value to prevent excessive increases in pixel values ​​for the black areas of the optical information. This avoids situations where black areas become indistinguishable from white areas due to image brightening. Consequently, imaging conditions can be precisely adjusted to obtain an image with suitable brightness for reading.

[0256] In particular, when the background has a slightly low light reflectivity, or when the white parts tend to be damaged due to the printing of code symbols, etc., by obtaining such a bright image, it is expected that the black parts, from which optical information can be extracted from the image with high precision.

[0257] Furthermore, the intra-class variance described here is an example of an evaluation function that represents the degree of variance of pixel values ​​within each class. Taking a weighted average in the evaluation function is not mandatory; the variance of pixel values ​​belonging to each class can be reflected in the evaluation function in different forms. Additionally, it is not necessary to include the brightness index value D. c Set to a value representing the pixel value that is brighter than the inter-class threshold. Brightness index value D c Preferably located near the threshold between classes, but users can set the pixel value to be brighter or darker than the threshold.

[0258] Furthermore, in the event that the target extraction / decoding process 214 fails, even if the same target brightness index value D as in the case of wide dimming range 51 is used... T To adjust imaging conditions, a higher target brightness index value D can also be used. T Make adjustments and try again.

[0259] In this reading device 100, as shown in Tables 1 and 2, multiple stages of target brightness index values ​​D are prepared in each reading mode. TWhen using a narrow dimming range of 52 (with a defined target), first use the lowest level (level 0) target brightness index value D. T To adjust imaging conditions for target extraction / decoding processing 214. Additionally, in the event of failure—that is, failure to read optical information even when the target is identified—the target brightness index value D, which is sequentially increased in level (target level), is used. T Retry. Target brightness index value D T The higher the level, the higher the brightness level of the target image. The reading mode can be set by the operator or automatically set by the reading device 100 according to a certain reference. Table 1 is used for reading code symbols, and Table 2 is used for OCR (Optical Character Recognition).

[0260] Table 1 Table 2 When the target extraction / decoding process 214 fails even at the maximum level, taking into account the possibility that the image becomes too bright, the target extraction / decoding process 214 is returned to the lowest level for retry.

[0261] By performing this action, optical information can be successfully read with fewer retries, and the time required to output the reading results can be shortened.

[0262] Furthermore, as described above, by using a wide dimming range 51 and a narrow dimming range 52, especially when the target is determined, the imaging conditions can be appropriately adjusted when resolving the captured image and reading the optical information contained in the image, regardless of the environment in which the information to be read is located.

[0263] When the target is identified, a larger target brightness index value D is used than the value used when reading fails in object extraction / decoding process 214. T Readjusting the imaging conditions and retrying can also help improve the results.

[0264] When a target is identified, it is assumed that the optical information of the target is likely to be included within the dimming range. Therefore, by changing the target level of the image brightness after reaching this state, the image brightness can be adjusted while reliably reflecting the contrast of the optical information, and an image with brightness suitable for reading at any target level can be obtained. At this time, if the image is too bright, the contrast information is lost, leading to misreading. Therefore, it is preferable to start the object extraction / decoding process 214 from a less bright image after the target is identified.

[0265] Furthermore, if the target brightness level of the image is changed before the target is identified, the image may become too bright, causing halos and making it difficult to determine whether the target has been identified. From this perspective, it is helpful to avoid making the image too bright when the target is uncertain.

[0266] When the target is determined, the above effect is amplified by changing the dimming range to a narrow dimming range 52, but it does not need to be performed simultaneously.

[0267] Furthermore, in the reading device 100, the brightness index value D obtained by any of the above methods is used. c In the case of I n ×g n When determining specific imaging conditions based on the target value, an upper limit for the exposure time is determined without illumination. This upper limit can be determined based on the amount of movement of the imaging sensor 111 per frame obtained in the target determination process 220. Specifically, it can be determined as follows.

[0268] First, the amount of movement of the imaging sensor 111 in each frame can be determined based on the magnitude of the motion vector in each frame. In this case, the total movement can be calculated. Figure 9 In step S40, the data used as a reference is a predetermined number of frames, or data from a number of frames that are different from this number can be aggregated. Alternatively, the average value of the aggregated range of data can be used, or the maximum value, median value, most recent value, etc. The amount of movement obtained in this way is defined as x[pixel].

[0269] Here, we assume that the length of a frame is t. f The exposure time is t. exp When, the amount of movement p during the exposure time. x [pixel] can be represented as follows.

[0270] p x =t exp / t f × x (4) On the other hand, if blur (jitter) p[pixel] is the amount of blur (jitter) of the image in the image that is allowed to read optical information, then p must satisfy the following formula.

[0271] p > p x =t exp / t f ×x (5) When it is deformed p / x×t f >t exp (6) It can be seen that the upper limit of the allowable exposure time is determined by p / x×t. f Sure.

[0272] For example, when blur (jitter) is allowed p = 1 [pixel], and the length of a frame is t f When the distance is 10 [ms], the upper limit of the allowable exposure time corresponding to the movement x [pixel] of the imaging sensor 111 in each frame can be determined as shown in Table 3 below. Of course, the upper limit of the exposure time does not have to be such a discrete value, but a continuous value obtained by substituting the value of the movement into the left side of equation (6). When the movement is 10 pixels or more, the upper limit of the allowable exposure time can be predetermined.

[0273] Table 3 When the cumulative light amount I used for the next imaging is determined n and magnification g n By ensuring that the exposure time does not exceed the upper limit corresponding to the movement amount x, imaging conditions can be appropriately adjusted to prevent situations where optical information cannot be read due to blurring even if the brightness is suitable.

[0274] That is, especially when the movement of the imaging sensor 111 is small, the exposure time can be selected in a wide range. In particular, when reading targets at a distance in dark environments, it is sometimes difficult to capture a bright image suitable for reading with an exposure time of around 1000 μs. If a longer exposure time can be set, it will greatly contribute to improving the reading success rate.

[0275] The above-mentioned upper limit for exposure time also applies to situations where the target of the optical information has been determined or not yet determined.

[0276] Furthermore, the allowable blur (jitter) p depends on the size of the elements constituting the optical information in the image, the complexity of the optical information, the image contrast, noise, etc. This value can be preset under the assumption of standard operating conditions of the reading device 100.

[0277] For example, considering that the smallest element of the code symbol of the target being read (a bar in a barcode, a dot in a QR code, etc.) is contained in one pixel, the allowable blur (jitter) p can be preset to 0.5 [pixels]. Alternatively, individual values ​​can be prepared based on a combination of the distance to the target and what the target is. When the super-resolution is less than 1 pixel / element, it may be advisable to make the allowable blur (jitter) p less than 0.5 [pixels].

[0278] Alternatively, the illumination time can be considered similarly when the lighting is on. In this case, even if there is a period of exposure without illumination, the impact of the exposure on the image during this period is relatively small. Furthermore, the exposure time is usually set to a value close to the illumination time. Therefore, the upper limit of the illumination time can also be determined in the same way as described above.

[0279] Next, Figure 15 A flowchart of the imaging adjustment process 212 described above is shown. As described above, this process... Figure 12 It is executed in S83 and is the processing of the imaging adjustment process. In this process, CPU121 is used as the imaging adjustment unit.

[0280] In the imaging adjustment process 212, the CPU 121 first... Figure 9 and Figure 10 In the target determination process 220, it is determined whether the state is determined to be a target-determined state (S101).

[0281] Once the target is identified, the CPU 121 detects the position of the aiming light 53 in the image of the object being processed (S102), and sets a dimming range 52 that is narrower than the range set in step S107, centered on the position of the aiming light 53 (S103). Additionally, the target brightness index value D is determined based on the set reading mode. T The level is increased sequentially starting from level 0, and then returns to level 0 after the maximum level (see S104, Table 1 and Table 2).

[0282] The position of the aiming light 53 can be detected by appropriately employing known detection techniques. For example, the techniques of Patent Documents 6 to 8 can be used. The processing in step S102 is the aiming light detection step, in which the CPU 121 is used as the aiming light detection unit. In addition, the processing in step S104 is the target adjustment step, in which the CPU 121 is used as the target adjustment unit.

[0283] Next, CPU 121 applies the aforementioned discriminant analysis method to the image of the dimming range 52 set in step S103 to obtain the pixel value of the threshold n, which serves as the boundary between the black pixel class and the white pixel class (S105). Then, the pixel value of the threshold n + α (α > 0) is calculated as the brightness index value D used for this adjustment. c (S106).

[0284] On the other hand, if no target is determined in step S101, CPU 121 sets a wider dimming range 51 (S107) than the range set in step S103, centered on the center of the image of the object being processed. Additionally, the target brightness index value D is... TSet to the value of level 0 corresponding to the set read mode (S108).

[0285] Next, CPU121 calculates the frequency distribution of pixel values ​​in the image within the dimming range 51 set in step S108, and determines the pixel values ​​at the predetermined quantile points as the brightness index value D for this adjustment. c (S109).

[0286] After step S106 or S109, CPU 121 obtains the magnitude of the movement vector obtained in the most recent target determination process (S110). As described above, an appropriate aggregation method, such as average, maximum, etc., can be used.

[0287] Then, without illumination during imaging (S111 "No"), CPU 121 sets an upper limit for the exposure time based on the magnitude of the movement vector obtained in step S110 (S112). For example, the above equation (6) can be used for this setting. Next, CPU 121 adjusts the magnification and exposure time of the imaging sensor 111 so that the brightness index value becomes the target brightness index value D in the next imaging. T The exposure time is set to the upper limit and then set to the optical section 110 (S113), and then the process returns to the initial processing.

[0288] On the other hand, when imaging is performed with illumination (S111 "Yes"), CPU121 sets an upper limit for the illumination time based on the magnitude of the movement vector obtained in step S110 (S114). Equation (6) above can also be used for this setting. Next, CPU121 adjusts the magnification of the imaging sensor 111, the exposure time, and the illumination time of the pulse LED 114 so that the brightness index value becomes the target brightness index value D in the next imaging. T And meet the upper limit of the illumination time, set it to the optical section 110 (S115), and then return to the initial processing.

[0289] Through the above processing, the reading device 100 can be adjusted for use. Figure 13A , Figure 13B and Figure 14 The imaging conditions described.

[0290] In this adjustment, the target brightness index value D T It is set to a level of 0 as the initial value when the target is not determined, and is set to a gradually higher level when the reading fails and the imaging adjustment process 212 is repeated when the target is determined.

[0291] Furthermore, when imaging with the illumination on, the upper limit of the exposure time can be set simultaneously with or instead of the illumination's illumination time. Even when the illumination is on, if the light does not reach the reading target 101 due to its excessive distance, or if the amount or duration of illumination is limited separately to suppress glare, a brighter image can be captured by adjusting the exposure time. When making such adjustments, it is preferable to set an upper limit for the exposure time to prevent blurring.

[0292] Figures 16A to 16D , Figures 17A to 17D It shows the execution Figure 15 The image shown is an example of the image to be processed in each reading of the image adjustment process 210, where the image adjustment process 212 is performed while the reading process 210 is retried multiple times.

[0293] Figure 16A This shows that after the goal was determined, in Figure 5 This is an example of the image of the object being processed in the second read process 210 executed in the read routine restarted in step S19. In the initial read process 210, the image of the object being processed is an image imaged under imaging conditions adjusted before the target was determined, and it is a retry situation after a read failure in the initial read process 210.

[0294] In this case, in the imaging adjustment process 212 within the initial readout process 210, steps S102 to S106 determine the brightness index value and the target brightness index value and adjust the imaging conditions. Initially, the target brightness index value at level 0 is used; therefore, Figure 16A The image shown is the processing object in the second readout process 210, and is an image taken under imaging conditions adjusted using a target brightness index value of level 0.

[0295] exist Figure 16A In the example, an attempt is made to read a QR code; only the area near the code symbol is shown in the image. As can be seen from the image, the code symbol being read is in a slightly damaged printing condition. Figure 16A In this state, the image is quite dark, and the distribution of black and white elements in the code symbols is unclear.

[0296] Figure 16B What is shown is Figure 16A An example of the image being processed in the third readout process 210. In the imaging adjustment process 212 of the second readout process 210, an image is formed under the imaging conditions adjusted using the target brightness index value of level 1. As can be seen from the figure, overall... Figure 16AIt's brighter, the background is almost white, and the white elements of the code symbols have greater contrast compared to the black elements, but the white elements are still slightly damaged, making it unlikely that reading will succeed.

[0297] Figure 16C Is Figure 16B An example of the image to be processed in the fourth readout process 210. In the imaging adjustment process 212 of the third readout process 210, an image is formed under the imaging conditions adjusted using the target brightness index value of level 2. Figure 16D The image shown is Figure 16C The image is magnified. As can be seen from the image... Figure 16C The image as a whole is larger than Figure 16B Brighter, as Figure 16D As shown, the outline of the white element is relatively clear. In this state, a successful read can be expected, and even in the actual experiment of capturing this image, the fourth read process 210 was successful.

[0298] Figures 17A to 17D The image shows the corresponding action when attempting to read a QR code printed on a dark-colored substrate. Figures 16A to 16D The image.

[0299] in this case, Figure 17A The image was taken by adjusting the target luminance index value to level 0, making it almost impossible to distinguish the black elements of the code symbols from the background color. However, the contrast increases as the level of the target luminance index value is increased, such as... Figure 17C and Figure 17D As shown, in the image acquired under the imaging conditions adjusted using the target brightness index value of level 2, black and white elements can be distinguished at a level sufficient for decoding. Even in the experiment of actually capturing this image, in Figure 17C and Figure 17D The image shown was successfully read in the fourth reading process 210, which is the object of processing.

[0300] As described above, by using Figures 13A to 15 The imaging adjustment process 212 described herein can adjust the imaging conditions so that even optical information that is difficult to read due to print damage or contrast problems can be read to a certain extent.

[0301] This adjustment is possible because, compared to adjusting imaging conditions based on the characteristics of a wide area of ​​the image, by detecting the state of the target that determines the optical information, and adjusting the imaging conditions based on the characteristics of the image near the optical information to be read in the state of the target to obtain a bright image, imaging conditions with a significant increase in brightness can be set.

[0302] When such conditions are set, if the magnification of the imaging sensor 111 is set to a low value due to dislike of noise, the exposure time (or illumination time) may become too long and may lead to read failure due to blur. However, since the upper limit of the exposure time is set separately based on the amount of movement of the imaging sensor 111, read failure due to blur can also be prevented.

[0303] Next, in Figure 18A and Figure 18B China corresponds to Figure 4A and Figure 4B The execution timing of the read process of the comparative example of this disclosure is shown in the form of [reference numeral]. In the description of the comparative example, the same reference numerals as those used for the read device 100 will be used to describe the parts that are the same as or correspond to the read device 100 of the above embodiment.

[0304] The only difference between the comparative example described here and the above implementation is that the target determination process 220 is not executed, and therefore the restart of the read process 210 triggered by target determination is also not executed.

[0305] Even in this case, if using Figure 4A and Figure 4B The described reading device 100 (basically) takes an image captured in a frame after a timing indicated by the stationary arrow A as the object of processing and performs reading processing 210, which can be expected in conjunction with... Figure 4A and Figure 4B The same conditions apply to the successful reading.

[0306] For example, such as Figure 18A As shown, when the readout process 210c after the imaging of frame 201e following the timing of arrow A ends with a readout failure, the readout process 210d, which takes the image captured by frame 201e as the processing object, can immediately begin. Then, in this readout process 210d, it is expected that... Figure 4A The read operation in case 210b is as successful as the read operation in case A. In this case, the time required to obtain the read result from the timing of arrow A can also be expected to be similar. Figure 4A The situation is similar to that of the other party.

[0307] On the other hand, such as Figure 18BAs shown, when the read process 210c ends with a read failure result after the imaging of frame 201d at the timing included by arrow A, the read process 210d begins with the image captured by frame 201d at that timing as the processing target. In this case, even if the imaging of frame 201e immediately following the timing of arrow A is completed, the next read process 210e cannot begin until the read process 210d ends. Furthermore, even if frame 201d is used as the processing target, since the read device 100 has not yet stopped, it is unlikely that the read will be successful.

[0308] As a result, after the read process 210d ends, read process 210e begins. Read process 210e takes the image captured by the latest frame 201f at that time point as the processing object, and expects to achieve the same results as in read process 210e. Figure 4A The reading process was successful to the same extent as in case 210b.

[0309] In this case, the time required from the timing of arrow A to obtaining the read result is considered to be longer than... Figure 4A The time required for reading 210d is approximately the same as the time required for processing 210d. When the processing load for reading 210d is relatively large and each reading 210d requires a corresponding amount of time, this time is assumed to be longer than a predetermined time range T, where T is... Figure 4B situation and Figure 4A The time required between different situations.

[0310] Here, as a comparative example, the above-described implementation method, and a first variation of the above-described implementation method, for the case where the target is determined... Figure 4A and Figure 4B The timing of arrow B must restart the reading process for the three cases of 210b, and the average time required from the timing of arrow A to obtaining the reading result is estimated.

[0311] At this point, assume the following (a) to (d).

[0312] (a) At the timing of arrow A, the stage to which the read processing 210 is executed is random.

[0313] (b) If the image captured in a frame after the timing of arrow A is used as the processing object for reading process 210, then the reading is successful; if the image captured in a previous frame is used as the processing object for reading process 210, then the reading fails.

[0314] (c) The time required for read processing 210 when read fails is f, and the time required for read processing 210 when read succeeds is s. Usually, in the case of read failure, the entire range of the image is searched and decoding is attempted before being judged as a failure. Therefore, it takes more time than in the case of read success, s < f.

[0315] (d) The length of the predetermined time range T (which is approximately the same as the time from the timing of arrow A to the determination of the target in the target determination process 220) is a.

[0316] First, in the comparative example, in Figure 18A In this case, the required time is the shortest s (the time for successful read processing alone is 210d). To be precise, this adds one frame period, but for simplicity, we will ignore it here. Figure 4B The same applies to this situation. Figure 18B In this case, the required time is the longest f+s (the sum of read failure processing 210d and read success processing 210e). Thus, the average required time T1 becomes (f+2s) / 2.

[0317] Next, in the first variation, the required time is always related to... Figure 4B Same. The required time is directly the average required time, and the average required time T2 is a + s (the sum of the predetermined time range T and the successful read processing 210b).

[0318] Here, since T2 - T1 = f / 2 - a, it can be assumed that if the target determination process 220 determines the target in less than half the time of f, then even if the reading process 210b always restarts at the timing of arrow B, the reading time required can be shortened compared to the case of the comparative example.

[0319] Next, in the above implementation, the following does not occur with probability a / f: Figure 4A The restart shown is not a restart with a probability of 1 - a / f, but rather occurs as shown in the example. Figure 4B The restart shown.

[0320] Without a reboot, Figure 4A The shortest time required is s, and the longest time required is a+s if the reading and processing of 210b begins before the timing of arrow B (almost the same as...). Figure 4B (The situation is the same). Thus, without a restart, the average time required is a / 2+s.

[0321] The average time required in the case of a restart is a+s, the same as in the first variant.

[0322] Thus, the average time T3 required in the above implementation is T3=(a / f)(a / 2+s)+(1-a / f)(a+s) =a + s - a 2 / 2f.

[0323] Here, since T3 - T1 = (f - a) 2 / 2f, therefore, according to the above implementation, if the target determination process 220 determines the target in less than f time, it is considered that the reading time can be shortened compared to the comparative example. This condition is more lenient than that of the first variant example. In addition, it can be seen that the larger f is, the more time the reading process 210 takes, and thus the target can be determined in a short time (a relatively small number of frames), and the greater the effect of shortening the required time.

[0324] Furthermore, if a exceeds f, it is assumed that the read process 210 ends once during the period from the timing of arrow A to the point where the target can be determined, and at the timing of arrow B, the read process 210, which takes the image captured after the timing of arrow A, is executed as the processing object. In this way, it is not necessary to restart the read process 210, and the operation is basically the same as that in the comparative example.

[0325] Therefore, for example, even if the read processing 210 becomes f < a in the light processing, there is no inconvenience compared to the comparative example processing, except for the additional light load generated in the target determination processing 220. When it is known through the selection of the read mode, etc., that the read processing 210 is a light processing and that f < a is expected, the target determination processing 220 may not be executed.

[0326] [Variation Example] Although the description of the embodiments has ended above, the specific structure of the device, the specific steps of the processing, the values ​​of various parameters, the types of optical information to be read, the time required for each processing step, etc., are not limited to those described in the embodiments in this disclosure.

[0327] Among the functions of the reading device 100 in the above embodiment, the functions of restarting the reading process 210 based on the result of the target determination process 220, changing the width of the dimming range or changing the method for obtaining the brightness index value or the target brightness index value based on whether the target is determined, increasing the target level of image brightness adjustment when reading fails in the state where the target is determined, and determining the upper limit of the exposure time or illumination time based on the movement of the imaging sensor 111 can be executed individually or in any combination. Furthermore, the object analysis process 211 and the filtering process 213 in the reading process 210 are not necessary.

[0328] Furthermore, in the above embodiment, an example was described where the image captured in the most recent frame was used as the processing object when the read process 210 restarts. However, this is not necessary, and other images can also be used. Figure 4B Images captured in any frame within a predetermined time range T following arrow A are used as the processing object. Although it is not preferred due to the delayed read-out process 210, images captured in frames after the predetermined time range T can also be used.

[0329] Furthermore, in the above embodiment, once the target has been determined, the target determination process 220 is not executed thereafter. However, after the target has been determined, the operator can move the reading device 100 significantly away from the target and then determine the target again. Considering this situation, the target determination process 220 can continue even after the target has been determined.

[0330] Figure 19 This shows the relationship with [other factors] in this case. Figure 5 The corresponding processing flowchart. Figure 19 processing and Figure 5 The differences in processing are as follows.

[0331] First, instead of step S15, the processing of step SA is performed to determine whether the state of an undetermined target has changed to a determined target state. This is to perform the restart-related processing of steps S17 to S19 at the time of this change. Furthermore, if step S19 is performed a second time or thereafter, the retries counted in step S88 of the reading routine can use the previous count value.

[0332] Furthermore, the fact that after "yes" is entered in step S18 or step S19 ends, the process proceeds to step S16 instead of step S20 is also consistent with... Figure 5 different.

[0333] In the above variations, once the target is determined, it may change to a state where the target is undetermined. In this case, Figure 15 In the imaging adjustment process, in step S104, the target brightness index value D T After the level is raised to above 1, step S108 can be executed. At this time, the target brightness index value D... T The system can temporarily return to level 0 at this moment, and when step S104 is executed, the target brightness index value D... T You can start again from level 0.

[0334] Alternatively, as another variation, it can be considered that if no target is determined at a time point equivalent to a predetermined time range T after the start of the read routine, the read routine (read processing 210) must be restarted.

[0335] Figure 20 This shows the relationship with [other factors] in this case. Figure 5 The corresponding processing flowchart. Figure 20 processing and Figure 5 The differences in processing are as follows.

[0336] First, if no target is determined, and the process proceeds from step S15 to S16 and it is determined that the read routine is still executing, in step SB, it is determined whether a predetermined time range T has elapsed since the most recent read routine. This time can be slightly shorter than T. Then, if the time has elapsed, the read routine is restarted in step SC, and the process returns to step S13 and repeats. If the time has not elapsed in step SB, the process directly returns to step S13 and repeats.

[0337] In execution Figure 20 In the case of the processing, at the time point when the target is determined, the reading process 210 must occur within a time period equivalent to a predetermined time range T from its start. Therefore, at that time point, the image data of the frames within the total period (predetermined time range T) of the most recent target determination process 220 should become the processing object (the judgment criterion for step SB is determined taking into account the length of the frame to ensure its validity). Therefore, it is not necessary to restart the reading routine in step S19, and thus steps S17 to S19 do not need to be executed. However, for the sake of caution, they may also be executed.

[0338] In the above process, steps SB and SC correspond to the first read control process, and step S15 corresponds to the second read control process, and respectively correspond to the functions of the first read control unit and the second read control unit.

[0339] In the above variation, it is not necessary to restart the read processing 210 at the time point when the target is determined, and when the target is determined, it is executed with probability 1. Figure 4A The operation shown.

[0340] Therefore, in this variation, when the average time T4 required from the timing of arrow A to obtaining the reading result is estimated in the same manner as in the cases of T1 to T3 described above, T4 = a / 2 + s.

[0341] In this case, since T3-T4 = a(f-a) / 2f, if the target determination process 220 can determine the target in less than f time (if f>a), it can be considered that the reading time can be further shortened than in the above implementation.

[0342] However, in this variation, the read process 210 is restarted without waiting for the read process 210 to finish before the target is determined. Therefore, except for the special case where the read is successful within a predetermined time range T, the read will not succeed before the target is determined.

[0343] In many cases, it is unlikely that a successful read will be made before the target is determined. Therefore, this is not a major inconvenience in many situations, but it is something to be aware of when using this variation.

[0344] Furthermore, the judgment criterion in step SB can be the imaging timing of the image to be processed in the executing read routine. That is, if a time corresponding to a predetermined time range T has elapsed since the imaging timing, the read routine can be restarted in step SC. Even in this way, at the time point of target determination, image data of frames within the period totaled by the most recent target determination process 220 always become the processing object of the read process 210.

[0345] When imaging timing is used as the criterion, the image data processed by the restarted readout routine does not necessarily have to be the image data of the latest frame. When using image data captured before the latest frame, the time from the start of the readout routine to the next step SB being "yes" and the readout routine restarting is shorter. However, when using image data captured at a time point tracing back to a predetermined time range T from the restart time point, the same effect of shortening the readout time can be achieved as in the case of the latest frame.

[0346] Alternatively, as another variation, a different method than the one described above can be used to obtain the luminance index value D. c The pixels are classified.

[0347] For example, under the assumption that the pixel values ​​of pixels imaging the black parts of code symbols or characters and pixels imaging the white (or background) parts both follow a normal distribution, classification can be performed by using statistical methods to obtain a threshold that minimizes the average false recognition rate (the probability of classifying a pixel as a bright pixel even though it has a dark part, or vice versa) when all pixels are classified into dark pixel class and bright pixel class using a threshold.

[0348] Specifically, this classification can be performed by obtaining a threshold n that minimizes the value of J in Equation 6 below.

[0349]

Mathematical Expression 6

[0350] Even in the same manner as in the above-described embodiment, the luminance index value D is obtained based on the threshold n obtained by using this method. c This also achieves roughly the same effect on adjusting imaging conditions as in the above-described implementation. For various threshold candidates, the variance of the pixel values ​​of pixels to be classified into each category is determined based on the threshold, and the categories are classified based on the determined variance, thereby obtaining the desired effect on determining the brightness index value D. c A meaningful threshold n.

[0351] As in the above embodiments, it is useful to perform classification that minimizes the dispersion of pixel values ​​in each category, and as in this variation, it is also useful to perform classification that minimizes the average false recognition rate. Alternatively, other benchmarks can be used. The specific algorithm is not important as long as the classification is performed such that pixels imaged from black areas are classified as the darkest possible pixel class, and pixels imaged from white areas or the background are classified as the brightest possible pixel class. The classification accuracy also does not need to be strict. To perform such classification, it is useful to perform the classification at least based on the distribution of pixels to be classified into each category.

[0352] As another variation, the functions of the reading device 100 in each of the above embodiments can be distributed among multiple devices, and for example, Figure 2 Some of the functions shown are provided to the data processing device connected to the destination.

[0353] Alternatively, the reading device 100 can be a handheld device used by an operator, or it can be a fixed device that is primarily aligned with the imaging sensor 111 by moving the reading target 101. When identifying a target, the above-described embodiments can be applied by moving either the reading device 100 or the reading target 101, or both. Movement of the imaging sensor 111 can be considered as relative movement with respect to the reading target 101 and the optical information carried on the reading target 101.

[0354] Furthermore, when determining whether a target has been identified in the target determination process 220, it is not necessary to consider the movement range or trajectory of the imaging sensor 111. This can also be omitted. Figure 10 Step S43 in the process is mainly based on the magnitude of the movement amount in step S42. Even when the judgment is based on this benchmark, it is possible to obtain the result by executing... Figure 5 The processing steps S17 to S19 can shorten the required time. However, if step S43 is also performed, it is possible to accurately determine whether the target has been determined.

[0355] Furthermore, although the above embodiments describe an example where the reading device 100 reads code symbols or characters, this disclosure is also applicable to cases where facial recognition is performed to identify faces. In this case, an image obtained by capturing a face is taken, and a process of comparing the image with a facial pattern is performed, rather than a decoding process. Even in this case, the functions of restarting the reading process 210 based on the result of the target determination process 220, changing the width of the dimming range or changing the calculation method of the brightness index value or the target brightness index value based on whether the target is determined, increasing the target level of the image brightness adjustment when reading fails in the state of target determination, and determining the upper limit of the exposure time or illumination time based on the amount of movement of the imaging sensor 111, exhibit substantially the same effects as in the above embodiments.

[0356] Furthermore, the implementation of the program disclosed herein is a program for enabling one or more computers to cooperate in controlling the required hardware to achieve the function of the reading device 100 in the above embodiments or to execute the processes described in the above embodiments.

[0357] Such programs can be stored from the outset in ROM or other non-volatile storage media (flash memory, EEPROM, etc.) included in the computer. They can also be provided by recording on any non-volatile recording medium such as a memory card, CD, DVD, or Blu-ray disc. Alternatively, they can be downloaded from an external device connected to a network and installed on the computer for execution.

[0358] Furthermore, the configurations of the above-described embodiments and variations can be arbitrarily combined, as long as they do not contradict each other, and only a portion of them can be extracted for implementation.

Claims

1. An optical information reading method, comprising: The imaging process involves the imaging unit periodically capturing images. The reading step involves parsing the image captured by the imaging step and reading the optical information contained within that image. The estimation step estimates the amount of movement of the imaging unit within a certain time range, based on the images captured by the imaging step within that time range. The imaging adjustment step adjusts the imaging conditions of the imaging unit based on the pixel values ​​of the pixels in the image captured by the imaging step, so that the brightness of the image obtained through subsequent imaging reaches a predetermined target level. In the target adjustment step, if the optical information reading fails in the reading step when the estimated movement amount in the estimation step is below a predetermined first reference, the target level in the imaging adjustment step is changed to a higher level.

2. The optical information reading method according to claim 1, wherein, The imaging adjustment step comprises the following steps: calculating the brightness index value of the image based on the pixel values ​​of the pixels in the image captured by the imaging step, and adjusting the imaging conditions of the imaging unit so that the brightness index value of the image obtained through subsequent imaging reaches the target level.

3. The optical information reading method according to claim 2, wherein, The imaging adjustment step adjusts at least one of the exposure time and illumination time in the imaging conditions.

4. The optical information reading method according to claim 2, wherein, When the amount of movement estimated by at least the estimation step is below the first benchmark, the brightness index value is determined based on a threshold that classifies the pixels sampled in the image captured by the imaging step into a first category of dark pixels and a second category of bright pixels based on the variance of the pixel values ​​of pixels in each category.

5. The optical information reading method according to claim 4, wherein, The classification is performed in a manner that minimizes the variance of the pixel values ​​of the pixels in each category.

6. The optical information reading method according to claim 2, wherein, When the amount of movement estimated by the estimation step is below the first reference, the index value of the brightness is calculated by the first step; when the amount of movement estimated by the estimation step exceeds the first reference, the index value of the brightness is calculated by the second step, which is different from the first step.

7. The optical information reading method according to claim 6, wherein, For an image whose optical information can be read through the reading step, the brightness index value obtained through the first step is less than the brightness index value obtained through the second step for the same image.

8. The optical information reading method according to claim 1, wherein, The target adjustment step includes the following steps: when it is determined that the movement estimated by the estimation step is not below a predetermined first benchmark, the target level is set to a predetermined initial value.

9. The optical information reading method according to claim 1, wherein, The target adjustment step includes the following steps: when the optical information reading fails in the reading step when the target level is at a predetermined upper limit value, the target level is returned to a predetermined initial value.

10. The optical information reading method according to claim 1, in, Includes: an illumination step, illuminating a targeting light, the targeting light serving as a reference for pointing the imaging unit towards the optical information of the target; and The aiming light detection step detects the position of the aiming light in the image captured by the imaging step. The imaging adjustment step determines whether the estimated movement amount in the estimation step is below a predetermined first reference. When it is determined to be below the first reference, the imaging conditions of the imaging unit are adjusted based on the pixel values ​​of pixels within a predetermined range near the position of the aiming light detected in the image captured by the imaging step.

11. The optical information reading method according to claim 1, in, Includes: an illumination step, illuminating a targeting light, the targeting light serving as a reference for pointing the imaging unit towards the optical information of the target; and The aiming light detection step detects the position of the aiming light in the image captured by the imaging step. The imaging adjustment step is a step of adjusting the imaging conditions of the imaging unit based on the pixel values ​​of the pixels around the position of the aiming light in the image captured by the imaging step. Furthermore, when it is determined that the amount of movement estimated by the estimation step is below the first reference, compared with the determination that the amount of movement estimated by the estimation step is not below the first reference, the imaging conditions of the imaging unit are adjusted based on the pixel values ​​of the pixels in a narrower range around the position of the aiming light.

12. The optical information reading method according to claim 1, wherein, The imaging adjustment step is a step of adjusting the imaging conditions of the imaging unit based on the pixel values ​​of pixels at predetermined reference positions in the image captured by the imaging step. Furthermore, when it is determined that the amount of movement estimated by the estimation step is below the first reference, the imaging conditions of the imaging unit are adjusted based on the pixel values ​​of pixels within a narrower range of the image, compared to when it is determined that the amount of movement estimated by the estimation step is not below the first reference.

13. An optical information reading device, comprising: Imaging section; An imaging control unit that causes the imaging unit to periodically capture images; The reading unit analyzes the image captured by the imaging unit and reads the optical information contained in the image; The estimation unit estimates the amount of movement of the imaging unit within a certain time range, based on images captured by the imaging unit within that time range. The imaging adjustment unit adjusts the imaging conditions of the imaging unit based on the pixel values ​​of the pixels in the image captured by the imaging unit, so that the brightness of the image obtained by subsequent imaging reaches a predetermined target level. as well as When the optical information reading in the reading unit fails to be read when the estimated amount of movement by the estimation unit is below a predetermined first reference, the target adjustment unit changes the target level used in the imaging adjustment unit to a higher level.

14. The optical information reading device according to claim 13, wherein, The imaging adjustment unit calculates the brightness index value of the image based on the pixel value of the pixel in the image captured by the imaging unit, and adjusts the imaging conditions of the imaging unit so that the brightness index value of the image obtained through subsequent imaging reaches the target level.

15. The optical information reading device according to claim 14, wherein, The imaging adjustment step involves adjusting at least one of the exposure time and illumination time in the imaging conditions.

16. The optical information reading device according to claim 14, wherein, When the amount of movement estimated by at least the estimation unit is below the first benchmark, the brightness index value is determined based on a threshold value when the pixels sampled in the image captured by the imaging unit are classified into a first category of dark pixels and a second category of bright pixels based on the variance of the pixel values ​​of pixels in each category.

17. The optical information reading device according to claim 16, wherein, The classification is performed in a manner that minimizes the variance of the pixel values ​​of the pixels in each category.

18. The optical information reading device according to claim 14, wherein, When the amount of movement estimated by the estimation unit is below the first reference, the imaging adjustment unit calculates the brightness index value through a first step; when the amount of movement estimated by the estimation unit exceeds the first reference, the imaging adjustment unit calculates the brightness index value through a second step different from the first step.

19. The optical information reading device according to claim 18, wherein, For an image whose optical information can be read by the reading unit, the brightness index value obtained by the first step is less than the brightness index value obtained by the second step for the same image.

20. The optical information reading device according to claim 13, wherein, When it is determined that the movement estimated by the estimation unit is not below a predetermined first benchmark, the target adjustment unit sets the target level to a predetermined initial value.

21. The optical information reading device according to claim 13, wherein, When the optical information reading fails in the reading unit when the target level is at a predetermined upper limit value, the target adjustment unit returns the target level to a predetermined initial value.

22. The optical information reading device according to claim 13, in, Includes: an illumination unit, an illumination aiming light, the aiming light serving as a reference for directing the imaging unit to read optical information about a target; and The aiming light detection unit detects the position of the aiming light in the image captured by the imaging unit. The imaging adjustment unit determines whether the amount of movement estimated by the estimation unit is below a predetermined first reference. When it is determined to be below the first reference, it adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels within a predetermined range near the position of the aiming light detected in the image captured by the imaging unit.

23. The optical information reading device according to claim 13, in, Includes: an illumination unit, an illumination aiming light, the aiming light serving as a reference for directing the imaging unit to read optical information about a target; as well as The aiming light detection unit detects the position of the aiming light in the image captured by the imaging unit. The imaging adjustment unit adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels around the position of the aiming light in the image captured by the imaging unit. Furthermore, when it is determined that the amount of movement estimated by the estimation unit is below the first reference, compared to when it is determined that the amount of movement estimated by the estimation unit is not below the first reference, the imaging conditions of the imaging unit are adjusted based on the pixel values ​​of pixels within a narrower range around the position of the aiming light.

24. The optical information reading device according to claim 13, wherein, The imaging adjustment unit adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels at predetermined reference positions in the image captured by the imaging unit. Furthermore, when it is determined that the amount of movement estimated by the estimation unit is below the first reference, the imaging conditions of the imaging unit are adjusted based on the pixel values ​​of pixels within a narrower range of the image, compared to when it is determined that the amount of movement estimated by the estimation unit is not below the first reference.

25. A program for causing a processor controlling the imaging unit to execute the optical information reading method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Ac constant voltage unit

    JP1978081928A

  • Preparation of lithium aluminate powder

    JP1985065719A

  • Bar code reader device

    JP1993324898A