Optical information reading method, optical information reading device, and program

By implementing periodic image capture and adjusting imaging conditions based on pixel values, the method enhances the efficiency and accuracy of optical information reading, addressing alignment and environmental challenges.

JP2026116087AActive Publication Date: 2026-07-09OPTOELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
OPTOELECTRONICS CO LTD
Filing Date
2025-01-17
Publication Date
2026-07-09

Smart Images

  • Figure 2026116087000001_ABST
    Figure 2026116087000001_ABST
Patent Text Reader

Abstract

When analyzing captured images and reading the optical information contained within them, the imaging conditions can be appropriately adjusted regardless of the environment in which the information to be read is located. [Solution] When periodically capturing an image while irradiating the imaging unit with reference AIM light to direct the imaging unit towards the optical information to be read, and analyzing the image to read the optical information contained in the image, the amount of movement of the imaging unit in a certain time range is estimated based on the image captured in that time range, and the imaging adjustment process 212 adjusts the imaging conditions based on the pixel values ​​of pixels in the captured image. If it is determined that the target of imaging has been set based on the estimated amount of movement (Yes in S101), the imaging conditions are adjusted based on the pixel values ​​of pixels in the captured image within a predetermined range near the position of the AIM light (S102~S106, S113).
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

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

[0002] Conventionally, optical information reading devices have been known that capture an image of an object to be read using an imaging unit such as a camera, and then read optical information such as code symbols and characters contained in the obtained image. Such optical information reading devices typically begin imaging when a reading start trigger is given, and then perform various processing steps on the obtained image data for information reading. However, if the operator fails to properly align the equipment and the captured image does not contain the necessary optical information, or if the operator moves the equipment and the captured image is blurred, it may be impossible to read the information or misread it.

[0003] As a reading control technology that takes such situations into consideration, Patent Document 1 discloses an optical information reading device that outputs a decoding result by a decoding unit when the number of times the amount of change in a numerical value relating to a specific part of the region occupied by optical information in an captured image falls below a predetermined value is greater than or equal to a predetermined number of times. Patent Document 2 discloses a barcode reader device that automatically decodes a barcode only when it stops in the correct position.

[0004] Patent Document 3 discloses an optical information reading device that does not perform decoding processing on image data of images acquired between the time an acquisition instruction is given and the time a waiting period has elapsed. Patent Document 4 discloses an optical information reading device that compares the total number of both light and dark patterns constituting the light and dark pattern sequence in a binarized signal acquired within a predetermined period between two or more consecutive predetermined periods, and performs decoding if the result satisfies predetermined stability conditions.

[0005] Furthermore, as prior art from a different perspective, Patent Document 5 discloses an optical information reading device that changes the control conditions for reading by the reading device when it is determined that the reading of the information code by the reading device has failed and that the optical information reading device has remained within a predetermined range for a predetermined time. [Prior art documents] [Patent Documents]

[0006] [Patent Document 1] Patent No. 6638614 [Patent Document 2] Japanese Patent Application Publication No. 5-324898 [Patent Document 3] Patent No. 3918713 [Patent Document 4] Patent No. 3944997 [Patent Document 5] Patent No. 6065719 [Patent Document 6] Patent No. 5381928 [Patent Document 7] Patent No. 4175223 [Patent Document 8] Patent No. 3632578 [Overview of the project] [Problems that the invention aims to solve]

[0007] The technologies described in Patent Documents 1 to 4 generally involve decoding when the reading device determines that it can expect to receive input such as a decodeable image. However, there is room for improvement in the criteria for this determination.

[0008] Furthermore, when various objects such as paper packaging, device LCD screens, and metal surfaces are anticipated as reading targets, it may take some time from image capture to reading because analysis processing to determine what the reading target is and filtering processing based on the analysis results are performed prior to reading the code symbols and characters. Considering such cases, for example, if the optical information reading device only starts decoding after it determines that it can expect to receive input such as an image that can read code symbols or characters, the time it takes to obtain the decoding result will be long.

[0009] This invention was made in view of these circumstances, and aims to shorten the time from successfully capturing an image from which optical information to be read can be read to outputting the reading result when analyzing an captured image and reading the optical information contained therein. [Means for solving the problem]

[0010] The first aspect of this invention provides the following optical information reading method, which aims to shorten the time from successfully capturing an image from which optical information to be read can be read to outputting the reading result when analyzing an captured image and reading the optical information contained in the image. This optical information reading method comprises an imaging procedure in which an image is periodically captured by an imaging unit; a reading procedure in which the image captured in the imaging procedure is analyzed and the optical information contained in the image is read; and an estimation procedure in which the amount of movement of the imaging unit in a certain time range is estimated based on the image captured in the imaging procedure in a certain time range. Furthermore, a reading control procedure is provided to determine whether the amount of movement estimated in the estimation procedure is less than or equal to a predetermined first criterion. If it is determined that the amount of movement is less than or equal to the first criterion, and the image being analyzed in the reading procedure was captured within a certain time range, the reading procedure is continued to decode the optical information. If the image being analyzed in the reading procedure was captured before the certain time range, a new reading procedure is performed to analyze an image captured in the imaging procedure within or after the certain time range and read the optical information contained in that image.

[0011] In such an optical information reading method, the estimation of the amount of movement of the imaging unit in the estimation procedure may include the estimation of the movement range of the imaging unit in a given time range based on three or more images captured in the imaging procedure within that time range. Furthermore, the first criterion may be that the movement range estimated in the estimation procedure falls within a predetermined convergence range. Alternatively, or in addition to the above, the estimation of the amount of movement of the imaging unit in the estimation procedure may include the estimation of the average amount of movement of the imaging unit per frame in a certain time range, based on three or more images captured in the imaging procedure within that time range. Furthermore, the first criterion may be that the average amount of movement estimated in the estimation procedure is less than or equal to a predetermined threshold.

[0012] Furthermore, each of the above optical information reading methods may include an irradiation procedure for irradiating a reference AIM light to direct the imaging unit towards the optical information to be read, and an AIM light detection procedure for detecting the position of the AIM light in the image captured in the imaging procedure. In addition, it may include an imaging adjustment procedure for adjusting the imaging conditions of the imaging unit based on the pixel values ​​of the pixels in the image captured in the imaging procedure. Furthermore, the above imaging adjustment procedure is a procedure in which, if it is determined that the amount of movement estimated in the above estimation procedure is less than or equal to the first criterion, 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 detected AIM light in the image captured in the above imaging procedure.

[0013] Alternatively, the above imaging adjustment procedure is a procedure to adjust the imaging conditions of the imaging unit based on the pixel values ​​of pixels around the position of the AIM light in the image captured in the above imaging procedure, and when it is determined that the amount of movement estimated in the above estimation procedure is less than or equal to the first criterion, the procedure adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range around the position of the AIM light compared to when it is determined that the amount of movement estimated in the above estimation procedure is not less than or equal to the first criterion. Alternatively, the system may include an imaging adjustment procedure that 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 procedure, wherein the imaging adjustment procedure adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range of the image compared to the case where the amount of movement estimated by the estimation procedure is determined to be less than or equal to the first reference.

[0014] Furthermore, each of the above optical information reading methods may include an imaging adjustment procedure for adjusting the imaging conditions of the imaging unit, which includes at least one of the items of exposure time and illumination time. In addition, the estimation of the amount of movement of the imaging unit in the estimation procedure may include the estimation of the amount of movement of the imaging unit per frame based on the images captured in the imaging procedure over all or part of a certain time range. The upper limit of the value of at least one of the items set in the imaging adjustment procedure may be determined based on the estimated amount of movement of the imaging unit per frame. Furthermore, the system includes a procedure for obtaining an acceptable amount of image blur when reading the optical information, and the upper limit of the value of at least one of the items set in the imaging adjustment procedure is determined based on the estimated amount of movement of the imaging unit per frame and the acquired amount of blur.

[0015] Furthermore, this invention also provides an optical information reading method comprising: an imaging procedure for periodically capturing images with an imaging unit; an estimation procedure for estimating the movement range of the imaging unit within a certain time range based on three or more images captured by the imaging procedure within that time range; and a reading procedure for analyzing images captured by the imaging procedure within or after the time range and reading the optical information contained in those images, when it is determined that the movement range estimated by the estimation procedure falls within a predetermined convergence range.

[0016] Furthermore, in order to output the reading results in a short time, it is important to adjust the imaging conditions to obtain an image with appropriate brightness so that the reading does not fail due to poor image quality. This adjustment can be made based on the image obtained from the most recent imaging, so that an image with conditions that are considered more likely to result in a successful reading is obtained.

[0017] However, depending on the environment in which optical information is read, the brightness of the area containing the optical information to be read may differ significantly from the surrounding area. For example, consider a case where the information to be read is printed on paper, but there is a window behind the paper from which bright light shines in. In this case, if both the paper and the window are within the imaging range, the window area is expected to be captured as extremely bright and large, while the area of ​​the information to be read is expected to be in shadow and captured as dark.

[0018] In such cases, even if imaging conditions are adjusted based on the overall brightness of the image, it is unlikely that an image suitable for reading information will be obtained. However, if the information to be read is not at the appropriate brightness, it is not easy to determine where the information to be read is located even after analyzing the image, and it is also difficult to adjust imaging conditions based on the brightness near the information to be read. A second aspect of this invention, in view of these circumstances, provides the following optical information reading method, which aims to enable appropriate adjustment of imaging conditions regardless of the environment in which the information to be read is located, when analyzing an image and reading the optical information contained in the image.

[0019] This optical information reading method comprises an imaging procedure in which an image is periodically captured by an imaging unit; a reading procedure in which the image captured in the imaging procedure is analyzed and the optical information contained in the image is read; and an estimation procedure in which the amount of movement of the imaging unit in a certain time range is estimated based on the image captured in the imaging procedure in a certain time range. Furthermore, it is preferable to include an irradiation procedure for irradiating the imaging unit with reference AIM light to direct the imaging unit towards the optical information to be read; an AIM light detection procedure for detecting the position of the AIM light in the image captured in the imaging procedure; and an imaging adjustment procedure for adjusting the imaging conditions of the imaging unit based on the pixel values ​​of the pixels in the image captured in the imaging procedure. Furthermore, the above imaging adjustment procedure may be a procedure in which, if it is determined that the amount of movement estimated in the above estimation procedure is less than or equal to a predetermined first standard, 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 detected AIM light in the image captured in the above imaging procedure.

[0020] Alternatively, the above imaging adjustment procedure is a procedure to adjust the imaging conditions of the imaging unit based on the pixel values ​​of pixels around the position of the AIM light in the image captured in the above imaging procedure, and if it is determined that the amount of movement estimated in the above estimation procedure is less than or equal to a predetermined first standard, the procedure may adjust the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range around the position of the AIM light compared to the case where it is determined that the amount of movement estimated in the above estimation procedure is not less than or equal to the first standard.

[0021] Alternatively, in addition to the above imaging procedure, reading procedure, and estimation procedure, the system may also include an imaging adjustment procedure that 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 procedure, wherein the imaging adjustment procedure adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range of the image compared to when the amount of movement estimated by the estimation procedure is determined to be less than or equal to a predetermined first standard.

[0022] Furthermore, regarding the adjustment of image brightness, even if reading fails under certain conditions, it is not easy to distinguish whether the failure is due to incorrect brightness, image blur, or the absence of optical information for the object to be read within the imaging range. Therefore, adjusting the imaging conditions after a reading failure does not guarantee a successful reading. For example, if, just because one of the typical causes of readout failure is that the image is too dark, then always increasing the exposure time or illumination time to obtain a brighter image when a readout fails, then in an already bright environment, the captured image may suffer from halation, which could actually hinder readout.

[0023] A third aspect of this invention, in view of these circumstances, provides the following optical information reading method, which aims to enable the appropriate adjustment of imaging conditions with a small number of trials, regardless of the environment in which the information to be read is located, when analyzing an image and reading the optical information contained therein.

[0024] This optical information reading method comprises an imaging procedure in which an image is periodically captured by an imaging unit; a reading procedure in which the image captured in the imaging procedure is analyzed and the optical information contained in the image is read; and an estimation procedure in which the amount of movement of the imaging unit in a certain time range is estimated based on the image captured in the imaging procedure in a certain time range. Furthermore, it is preferable to include an imaging adjustment procedure that adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels in the image captured in the above imaging procedure so that the brightness of the image obtained in subsequent imaging reaches a predetermined target level, and a target adjustment procedure that changes the target level in the imaging adjustment procedure to a higher level if the reading of optical information in the reading procedure fails while the amount of movement estimated in the estimation procedure is less than or equal to a predetermined first standard.

[0025] In such an optical information reading method, the above imaging adjustment procedure is a procedure that calculates an index value of the brightness of the image based on the pixel values ​​of the pixels in the image captured in the above imaging procedure, and adjusts the imaging conditions of the imaging unit so that the index value of the brightness of the image obtained in subsequent imaging reaches the above target level. Furthermore, the above imaging adjustment procedure should preferably be a procedure for adjusting at least one of the above imaging conditions: exposure time and illumination time.

[0026] Furthermore, if the amount of movement estimated by the above estimation procedure is less than or equal to the first criterion, the brightness index value may be determined based on thresholds when pixels sampled from the image captured by the above imaging procedure are classified into a first class of dark pixels and a second class of bright pixels based on the variance of pixel values ​​within each class. Furthermore, the above classification may be performed in such a way that the degree of dispersion of pixel values ​​within each of the above classes is minimized.

[0027] Furthermore, if the amount of movement estimated by the above estimation procedure is less than or equal to the first criterion, the brightness index value may be calculated using the first procedure. If the amount of movement estimated by the above estimation procedure exceeds the first criterion, the brightness index value may be calculated using a second procedure different from the first procedure. In this case, for an image from which optical information can be read using the above reading procedure, the brightness index value obtained in the first step should be smaller than the brightness index value obtained in the second step for the same image.

[0028] Furthermore, in each of the optical information reading methods described above, the target adjustment procedure may include a step to set the target level to a predetermined initial value if it is determined that the amount of movement estimated in the estimation procedure is not less than or equal to a predetermined first criterion. Furthermore, in each of the optical information reading methods described above, the target adjustment procedure may be a procedure to return the target level to a predetermined initial value if the optical information reading in the reading procedure fails while the target level is at a predetermined upper limit.

[0029] Furthermore, each of the above optical information reading methods may include an irradiation procedure for irradiating an aima light that serves as a reference for directing the imaging unit towards the optical information to be read, and an aima light detection procedure for detecting the position of the aima light in the image captured in the imaging procedure. The imaging adjustment procedure may also include a procedure for determining whether the amount of movement estimated in the estimation procedure is less than or equal to a predetermined first standard, and if it is determined to be less than or equal to the first standard, adjusting the imaging conditions of the imaging unit based on the pixel values ​​of pixels within a predetermined range near the position of the detected aima light in the image captured in the imaging procedure.

[0030] Alternatively, the above imaging adjustment procedure may be a procedure to adjust the imaging conditions of the imaging unit based on the pixel values ​​of pixels around the position of the AIM light in the image captured in the above imaging procedure, and if it is determined that the amount of movement estimated in the above estimation procedure is less than or equal to the first criterion, the procedure may adjust the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range around the position of the AIM light compared to the case where it is determined that the amount of movement estimated in the above estimation procedure is not less than or equal to the first criterion.

[0031] Alternatively, instead of providing the above irradiation procedure and the above AIM light detection procedure, the above imaging adjustment procedure may be a procedure that adjusts the imaging conditions of the imaging unit based on the pixel value of a pixel at a predetermined reference position in the image captured in the above imaging procedure, and when it is determined that the amount of movement estimated in the above estimation procedure is less than or equal to the first criterion, the procedure adjusts the imaging conditions of the imaging unit based on the pixel value of a narrower range of pixels in the image compared to when it is determined that the amount of movement estimated in the above estimation procedure is not less than or equal to the first criterion.

[0032] Furthermore, regarding adjusting image brightness, simply making the image brighter is not sufficient if the image is too dark and the reading fails. If the image is too bright, and even parts of the optical information being read, such as black objects with low light reflectivity, are captured brightly, sufficient contrast cannot be obtained, and the reading will fail, just as if the image were too dark. A fourth aspect of this invention, in view of these circumstances, provides the following optical information reading method, which aims to enable accurate adjustment of imaging conditions to obtain an image with brightness suitable for reading when analyzing an image and reading the optical information contained therein.

[0033] This optical information reading method comprises an imaging procedure in which an image is periodically captured by an imaging unit, and a reading procedure in which the image captured in the imaging procedure is analyzed and the optical information contained in the image is read. Furthermore, the system includes an imaging adjustment procedure that calculates an index value of brightness of an image based on the pixel values ​​of pixels in the image captured in the above imaging procedure, and adjusts the imaging conditions of the imaging unit so that the index value of brightness of images obtained in subsequent imaging reaches a predetermined target level. The index value of brightness is determined based on thresholds when pixels sampled from the image captured in the above imaging procedure are classified into a first class of dark pixels and a second class of bright pixels based on the variance of pixel values ​​within each class.

[0034] Furthermore, the above classification may be performed in such a way that the degree of dispersion of pixel values ​​within each of the above classes is minimized. Alternatively, in such an optical information reading method, the classification may be performed in such a way that the intra-class variance, which is the weighted average of the variance of pixel values ​​within each class, taking into account the number of pixels belonging to each class, is minimized. Furthermore, in each of the optical information reading methods described above, the brightness index value may be a value that indicates a pixel value brighter than the threshold. Alternatively, the brightness index value may be a value that is near the threshold and indicates a pixel value brighter than the threshold. Furthermore, in each of the optical information reading methods described above, the imaging adjustment procedure should be a procedure for adjusting at least one of the imaging conditions, namely the exposure time and the illumination time.

[0035] Furthermore, in order to output the reading results in a short time, it is important to adjust the imaging conditions to obtain images with as little blur as possible, so that readings do not fail due to image defects. To do this simply, one should set a shorter exposure time. However, there are cases where a longer exposure time is necessary, such as when the surroundings are dark and it is necessary to secure a large amount of exposure light, but trying to achieve this solely by increasing the gain of the photodetector results in a large amount of noise. A fifth aspect of this invention, in view of these circumstances, provides the following optical information reading method, which aims to enable appropriate adjustment of imaging conditions while providing a wide range of exposure time options when analyzing an image and reading the optical information contained therein.

[0036] This optical information reading method comprises an imaging procedure in which an image is periodically captured by an imaging unit; a reading procedure in which the image captured in the imaging procedure is analyzed and the optical information contained in the image is read; and an estimation procedure in which the amount of movement of the imaging unit per frame is estimated based on the image captured in the imaging procedure over a certain time range. Furthermore, it is preferable to include an imaging adjustment procedure for adjusting the imaging conditions of the imaging unit, which includes at least one of the items of exposure time and illumination time. The upper limit of the value of at least one of the items set in the imaging adjustment procedure is preferably determined based on the estimated amount of movement of the imaging unit per frame.

[0037] Such an optical information reading method may include a procedure for obtaining an acceptable amount of image blur when reading the optical information, and the upper limit of the value of at least one of the items set in the imaging adjustment procedure may be determined based on the estimated amount of movement of the imaging unit per frame and the acquired amount of blur.

[0038] A sixth aspect of this invention provides the following optical information reading method, which aims to shorten the time from successfully capturing an image from which optical information to be read can be read to outputting the reading result when analyzing an captured image and reading the optical information contained in the image. This optical information reading method comprises an imaging procedure in which an image is periodically captured by an imaging unit; a reading procedure in which the image captured in the imaging procedure is analyzed and the optical information contained in the image is read; and an estimation procedure in which the amount of movement of the imaging unit in a certain time range is estimated based on the image captured in the imaging procedure in a certain time range.

[0039] Furthermore, it is preferable to include a first reading control procedure which, when a certain time range has elapsed since the image being analyzed in the above reading procedure was captured, a new reading procedure is executed which analyzes an image captured in the above imaging procedure after the image being analyzed and reads the optical information contained in that image; and a second reading control procedure which determines whether the amount of movement estimated in the above estimation procedure is less than or equal to a predetermined first standard, and if it is determined to be less than or equal to the first standard, the first reading control procedure is not executed. Alternatively, the system may include a first reading control procedure which, when a certain time range has elapsed from the start of the above reading procedure, executes the above reading procedure again, which involves analyzing the most recent image captured in the above imaging procedure and reading the optical information contained in the image; and a second reading control procedure which determines whether the amount of movement estimated in the above estimation procedure is less than or equal to a predetermined first standard, and if it is determined to be less than or equal to the first standard, it refrains from executing the first reading control procedure.

[0040] Furthermore, each aspect of this invention described above can be implemented in any manner, such as by means of the methods described above, or by means of an apparatus, system, program, recording medium on which the program is recorded, etc. [Effects of the Invention]

[0041] According to the configuration of the present invention, when analyzing an captured image and reading the optical information contained therein, the time from successfully capturing an image from which the optical information to be read can be read to outputting the reading result can be shortened. [Brief explanation of the drawing]

[0042] [Figure 1]Figure 1 is a block diagram showing the hardware configuration of a reading device 100, which is one embodiment of the optical information reading device of the present invention. [Figure 2] Figure 2 is a functional block diagram showing the configuration of the functions of the reading device 100 shown in Figure 1. [Figure 3] Figure 3 schematically shows the basic execution timing of the reading process for reading optical information performed by the reading device 100 shown in Figure 1, starting from the time of detection of the reading start trigger. [Figure 4] Figures 4A and 4B schematically illustrate different examples of the timing of the reading process performed by the reading device 100 to read optical information, starting from a certain time after the detection of the reading start trigger. [Figure 5] Figure 5 is a flowchart of the process executed by the CPU 121 of the reading device 100 when a reading start trigger is detected. [Figure 6] Figures 6A and 6B show examples of images captured in two consecutive frames. Figure 6C is a diagram illustrating the estimation of the displacement of the imaging sensor 111 based on the positions of feature points in those images. [Figure 7] Figure 7A shows an example of the range used as a template image in an image captured in a given frame. Figure 7B shows an example of the search range compared with the template image in an image of the next frame. [Figure 8] Figures 8A and 8B show examples of movement paths obtained by connecting the movement vectors of each frame within a predetermined time range T, respectively. [Figure 9] Figure 9 is a flowchart of the target determination process 220 executed by the CPU 121 of the reading device 100. [Figure 10] Figure 10 is a flowchart that continues from Figure 9. [Figure 11] Figure 11 is a flowchart of the movement estimation process during the processing shown in Figure 9. [Figure 12] Figure 12 is a flowchart of the reading routine that is activated by the process shown in Figure 5. [Figure 13] Figures 13A and 13B show examples of different dimming ranges defined in the imaging adjustment process 212, respectively. [Figure 14] Figure 14 shows an example of the frequency distribution of pixels within the dimming range, along with a diagram illustrating the classification into black and white pixel classes using discriminant analysis. [Figure 15] Figure 15 is a flowchart of the imaging adjustment process 212 during processing as shown in Figure 12. [Figure 16] Figures 16A to 16C show examples of images processed by each read operation 210 when the read operation 210 is retried multiple times while the image adjustment operation 212 is being performed. Figure 16D is an enlarged view of the image in Figure 16C. [Figure 17] Figures 17A to 17D correspond to Figures 16A to 16D, respectively, and show other examples of images to be processed. [Figure 18] Figures 18A and 18B correspond to Figures 4A and 4B, respectively, and show examples of different execution timings for the reading process in comparative examples of this invention. [Figure 19] Figure 19 is a flowchart of the process corresponding to Figure 5, which is executed by the CPU 121 of the reading device 100 when a reading start trigger is detected in a modified example of this invention. [Figure 20] Figure 20 is a flowchart of the process that the CPU 121 of the reading device 100 executes when a reading start trigger is detected in another modified example of this invention, corresponding to the process shown in Figure 5. [Modes for carrying out the invention]

[0043] Embodiments of this invention will be described with reference to the drawings. Figure 1 is a block diagram showing the hardware configuration of a reading device 100, which is one embodiment of the optical information reading device of the present invention. The reading device 100 shown in Figure 1 is a device for optically reading optical information such as code symbols 102a and strings of characters 102b on the object to be read 101, which are represented by parts with different light reflectivity than the surrounding area. The object to be read 101 may be a recording medium such as paper that statically carries code symbols 102a and strings 102b, or it may be a display that dynamically displays them.

[0044] As shown in Figure 1, the reading device 100 comprises an optical unit 110, a control unit 120, an operation unit 131, a notification unit 132, and a display unit 133. Of these, the optical unit 110 is an imaging unit that includes an imaging sensor 111, a lens 112, an LD (laser diode) 113, and a pulse LED (light-emitting diode) 114, and is used to optically capture an image of the object to be read 101.

[0045] The imaging sensor 111 is a light-receiving element for capturing images of an object to be captured, such as the object to be read 101, and can be configured, for example, as a CMOS (complementary metal-oxide-semiconductor) image sensor. The imaging sensor 111 can also generate image data indicating the grayscale value of each pixel based on the charge accumulated in each pixel of the image sensor through imaging, and output this to the control unit 120. In this imaging sensor 111, the pixels are arranged two-dimensionally.

[0046] The lens 112 is an optical system for forming an image of reflected light from the object to be imaged onto the image sensor 111. LD113 is an illumination unit that emits an AIM light (marker light) indicating the central position of the imaging range by the imaging sensor 111 onto the target to be read, so that the operator can use it as a reference for directing the optical unit 110 (particularly the imaging range by the imaging sensor 111) towards the optical information on the target to be read 101. The procedure for emitting this AIM light is the illumination procedure. The shape of the AIM light can be arbitrary, such as circular, rectangular, or cross-shaped. The AIM light may also indicate an appropriate target position or target range other than the central position. The pulsed LED 114 is a light-emitting unit that projects illumination light onto the object to be imaged.

[0047] Next, the control unit 120 includes a CPU 121, a ROM 122 that stores data such as programs executed by the CPU 121 and various tables, a RAM 123 that the CPU 121 uses as a work area when executing various processes, and a communication I / F 124 for communicating with external devices.

[0048] The CPU 121 is a processor that, by executing programs stored in the ROM 122 with the RAM 123 as a working area, controls the operation of the entire reading device 100, including the optical unit 110, the operation unit 131, the notification unit 132, and the display unit 133, thereby realizing various functions, including those described later using Figure 2. These functions may include reading, displaying, outputting to the outside or storing optical information contained in the image data of the image captured by the imaging sensor 111, estimating the movement status of the imaging sensor 111, controlling the processing related to reading the optical information based on the results of the estimation, and adjusting the imaging conditions in the optical unit 110. Communication I / F124 is an interface for communicating with various external devices, such as data processing devices that utilize the identification result of string 102b.

[0049] The operation unit 131 consists of buttons, triggers, and other means for receiving operator input. The notification unit 132 is a notification means for providing various notifications to the operator. Specific notification methods include, but are not limited to, displaying messages or data on a display, lighting or flashing lights, and outputting sound through a speaker. The display unit 133 is a display means for displaying the content of optical information read by the reading device 100, information regarding the operating status of the reading device 100, etc., and can be configured using a liquid crystal display or the like. The notification unit 132 and the display unit 133 may share common hardware.

[0050] If the reading device 100 is operated automatically by control from an external device or autonomous control, the operation unit 131, notification unit 132, and display unit 133 do not need to be provided. The reading device 100 described above can be configured, for example, as a handheld or stationary code symbol reader with character reading capabilities, but is not limited to these. A general-purpose computer, such as a smartphone or personal computer, may be used as all or part of the hardware.

[0051] Characteristic features of the reading device 100 described above include the method for estimating the movement status of the imaging sensor 111, the method for controlling the processing related to reading optical information based on the results of the estimation, and the method for adjusting the imaging conditions in the optical unit 110. These points will be explained next. First, we will explain the functions related to the reading of optical information provided by the reading device 100. Figure 2 is a functional block diagram showing the configuration of that function.

[0052] As shown in Figure 2, 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 of these units are realized by the CPU 121 executing software to control each part of the reading device 100, including the optical unit 110, but some or all of these functions may be realized by a dedicated control circuit.

[0053] The imaging unit 141 shown in Figure 2 controls the optical unit 110 to perform imaging periodically, acquires image data obtained from imaging in each frame (imaging cycle period), and passes it to the image acquisition unit 142. In other words, the imaging unit 141 also functions as an imaging control unit that executes imaging control procedures. The imaging conditions are determined by the imaging condition setting unit 147. The image acquisition unit 142 has a function to store the image data acquired by the imaging unit 141 so that it can be referenced by the information reading unit 143, the target determination unit 145, and the imaging condition setting unit 147.

[0054] The information reading unit 143 is a reading unit that acquires image data from the image acquisition unit 142, performs processing such as object extraction and decoding, and has the function of reading the optical information in the image data. The actual processing performed will differ depending on the type of optical information to be read and the environment in which that optical information exists.

[0055] In other words, for example, if the optical information is assumed to be characters, the information reading unit 143 may perform character recognition processing. Furthermore, if the optical information is expected to be difficult to read due to blurring or background patterns, or if the background is expected to vary, such as on paper, a metal surface, or a display, it may be possible to perform image analysis processing to identify what the imaged object is, or filter processing to process the image in a way that facilitates decoding, etc., prior to object extraction, decoding, etc.

[0056] The actual processing steps and their order can be selected according to the operator's instructions or according to settings automatically made based on certain conditions. The imaging condition setting unit 147 may also be linked to the processing performed by the information reading unit 143.

[0057] The output unit 144 uses the communication interface 124 and notification unit 132 to output the reading results, such as character strings obtained by the information reading unit 143, to an external device such as a data processing device that processes the data, and also has a function to notify the operator of the success of the reading. The method of notifying the operator can be any method, such as a buzzer or vibration, and notification is not required if it is not necessary. The output unit 144 may also have a function to display the reading results on the display unit 133.

[0058] The target determination unit 145 includes an estimation function that estimates the amount of movement of the imaging sensor 111 within a specific time range by acquiring image data for each frame from the image acquisition unit 142 and analyzing it in chronological order. The estimated amount of movement may include the amount of movement per frame and the amount of movement within the range of multiple frames. Furthermore, the estimated amount of movement may include the amount of movement as a scalar quantity that does not consider the intermediate trajectory, which can be expressed as translational movement or rotational movement, and the range of movement that does consider the intermediate trajectory. Furthermore, if the entire optical unit 110 is a rigid body, the amount of movement of the optical unit 110 may be recognized as the same as the amount of movement of the imaging sensor 111. Similarly, if the entire reading device 100 is a rigid body, the amount of movement of the reading device 100 may be recognized as the same as the amount of movement of the imaging sensor 111.

[0059] The reading control unit 146 has a function to restart the processing performed by the information reading unit 143 as needed if the estimated amount of movement estimated by the target determination unit 145 is below a predetermined standard (first standard). The conditions for restarting will be described later using Figures 4A and 4B. The imaging condition setting unit 147 includes the function of an imaging adjustment unit that adjusts the imaging conditions of the imaging unit 141 based on the content of the image data obtained by imaging and the imaging conditions used for imaging, and supplies these conditions to the imaging unit 141. The imaging conditions to be adjusted may include, for example, the exposure time and gain of the imaging sensor 111. It may also include the illumination intensity and lighting time of the pulse LED 114. The exposure time limit setting unit 148 has a function to set the upper limit of the exposure time set by the imaging condition setting unit 147. Alternatively, or in addition to this, the exposure time limit setting unit 148 may also have a function to set the intensity and lighting time limits of the illumination by the pulse LED 114.

[0060] Next, using Figure 3, the basic execution timing of the reading process performed by the reading device 100 to read optical information will be explained. Figure 3 schematically shows the execution timing of this reading process from the time of detection of the reading start trigger. Note that the processing performed by the target determination unit 145 is omitted in Figure 3.

[0061] In Figure 3, the horizontal axis represents the passage of time, and each of the rectangles arranged in the upper row represents the imaging time for one frame. When the reading device 100 detects a reading start trigger that instructs the start of reading optical information, such as operator input or reception of an external command, the imaging unit 141 starts imaging. Once one frame of imaging is completed, the image data obtained from the imaging is stored in the image acquisition unit 142.

[0062] Furthermore, when the reading device 100 detects that image data captured in a new frame 201 has been stored in the image acquisition unit 142 while the reading process 210 is not in progress, it starts a reading process 210 to analyze the image data and read the optical information contained within it. In this embodiment, the reading process 210 includes, in this order, a target analysis process 211, an imaging adjustment process 212, a filtering process 213, and an object extraction / decoding process 214. Of these, the imaging adjustment process 212 corresponds to the function of the imaging condition setting unit 147, and the others correspond to the function of the information reading unit 143.

[0063] The object analysis process 211 is a process that performs image analysis to identify what the imaged object is. The imaging adjustment process 212 adjusts the imaging conditions of the optical unit 110 based on the content of the image data and the imaging conditions used for imaging. If it is necessary to change the imaging conditions, the necessary settings are made to the optical unit 110 during this imaging adjustment process 212, and imaging is performed from the next frame according to the changed settings. However, the image captured according to the changed settings becomes the target of the reading process 210 only when the reading process 210 is next started.

[0064] The filtering process 213 is a process that modifies image data in accordance with the identification results in the target analysis process 211 to increase the success rate of the object extraction and decoding process 214. Artificial intelligence (AI) can also be used in the target analysis process 211, and the AI ​​can be used to determine the algorithm and parameters of the filtering process 213. The execution order of the imaging adjustment process 212 and the filtering process 213 is arbitrary.

[0065] The object extraction and decoding process 214 extracts objects that indicate information to be read, such as code symbols and characters, from the image data after the filtering process 213, and then performs decoding and character recognition to obtain the information to be read. The object extraction and decoding process 214 does not need to be separated into an object extraction process and a decoding process. For example, an AI model may be pre-trained to recognize what an image of a specific size (e.g., 100 x 100 pixels) is, and then the image is input to the trained model to determine what optical information is contained in the image.

[0066] If the reading device 100 successfully reads the information through the object extraction and decoding process 214, it outputs the reading result. On the other hand, if the reading fails, it retries the reading process 210. In this case, the image data of the latest frame 201a (a code with an alphabet is used to refer to a specific frame 201) whose imaging has been completed at the time of the retry is used for processing. The reading device 100 then repeats the reading process 210 in the same manner until a predetermined number of retries is reached or the information is successfully read. When the predetermined number of retries is reached, the reading failure is notified to the operator and the reading process 210 is stopped.

[0067] Next, using Figures 4A and 4B, we will explain the execution control of the reading process 210, which is one of the features of this embodiment, taking into consideration the processing performed by the target determination unit 145. Figures 4A and 4B schematically show different examples of the timing of the reading process performed by the reading device 100 to read optical information, starting from a certain time after the detection of the reading start trigger.

[0068] Although not shown in Figure 3, the reading device 100 executes a target determination process 220 to estimate the movement of the imaging sensor 111 at the timing indicated by the dashed line after each frame of imaging is completed. This process corresponds to the function of the target determination unit 145. Details of the process will be described later using Figure 9, etc., but in this embodiment, the target determination process 220 includes a process to estimate the amount of movement of the imaging sensor 111 in a certain time range based on images captured in that time range, and a process to estimate the amount of movement of the imaging sensor 111 per frame. The target determination process 220 can be executed in an extremely short time of about 1 ms (milliseconds) compared to the imaging frame 201 and the reading process 210. The target determination process 220 may be executed in parallel with the reading process 210 in the CPU 121, or it may be executed by interrupting the reading process 210.

[0069] Here, regarding the usage of the reading device 100, at the time the operator initiates a reading start operation on the reading device 100 and a reading start trigger is given, the imaging range of the imaging sensor 111 is not yet directly aligned with the optical information of the object to be read. Subsequently, the operator moves the reading device 100 to align it directly with the optical information of the object to be read, and then stops the reading device 100.

[0070] This stationary state typically represents a state in which the operator subjectively believes the reading device 100 can read the optical information of the target object from its current positional relationship. Furthermore, the positional relationship between the actual imaging range and the optical information is often considered suitable for reading. In other words, this stationary state represents a state in which the reading device 100 has set its sights on the optical information of the target object. However, if the operator is manually manipulating the reading device 100, the reading device 100 is not completely stationary.

[0071] In this usage scenario, as explained in Figure 3, the reader 100 will come to a (near) standstill at some point while it is repeatedly performing the reading process 210. In Figures 4A and 4B, this timing is indicated by arrow A. Then, in the target determination process 220, which is performed in response to imaging several frames later, the estimated result of the movement range of the imaging sensor 111 in the most recent predetermined time range T (a period of a predetermined number of frames) falls within a predetermined convergence range. That is, the amount of movement determined as the movement range becomes less than or equal to a predetermined standard. When this condition is met, the reading device 100 determines that the reading device 100 has (almost) stopped and that the target has been set on the optical information. In Figures 4A and 4B, this timing is indicated by arrow B. At the timing of arrow B, it is likely that the reading process 210 is in progress, but the specific stage within the reading process 210 varies depending on the case. It may have just started the target analysis process 211, or it may be nearing the end of the object extraction and decoding process 214.

[0072] Here, if the target of the reading process 210, which is currently running at the timing of arrow B, is image data captured in a frame at least after the timing of arrow A, then the image has been captured with the target fixed. Therefore, it is unlikely that the object extraction and decoding process 214 will fail due to the image being significantly blurred or the optical information of the object to be read not being within the capture range. Consequently, it can be expected that continuing the reading process 210 will result in a relatively high probability of successful reading.

[0073] However, it is not easy to accurately determine the timing of arrow A. On the other hand, it is thought that the first time the estimated movement range result in the target determination process 220 falls within a predetermined convergence range is the time when the predetermined time range T starts near the timing of arrow A. Therefore, in this embodiment, the target of the target determination process 220 performed at the timing of arrow B is determined by whether the image data captured within the predetermined time range T is the target of processing (referred to as "criterion R"), and if criterion R is satisfied, the reading process 210 that is being executed at the timing of arrow B is continued as is.

[0074] Figure 4A shows an example where a reading process 210a (a code with an alphabet is used to refer to a specific reading process 210) within a predetermined time range T has finished, and at the timing indicated by arrow B, the next reading process 210b is being executed, which targets image data captured in frame 201b within the predetermined time range T. In this case, the reading device 100 continues with reading process 210b.

[0075] On the other hand, if the object being processed by the reading process 210, which is being executed at the timing of arrow B, is image data captured in a frame prior to the timing of arrow A, then the image was captured without a clear target. This makes it highly likely that the object extraction and decoding process 214 will fail due to the image being significantly blurred or the optical information of the object to be read not being within the capture range. Therefore, continuing the reading process 210 would result in a reading failure, wasting processing time.

[0076] In this case, the reading device 100 stops the reading process 210 that is currently running at the timing indicated by arrow B and starts a new reading process 210. That is, using the above-mentioned criterion R, the reading process 210 is started anew if the criterion R is not met. 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 commonality of processing with the repetition of the reading process 210 as assumed in Figure 3, it is preferable to process the image data of the latest frame. Alternatively, it is also possible to process the image data captured in the frame in which the estimated amount of movement of the imaging sensor 111 per frame was smallest.

[0077] Figure 4B shows an example where the reading process 210a, which is being executed at the timing of arrow B, is started before the 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 satisfy the criterion R. Therefore, the reading device 100 stops the reading process 210a at the timing of arrow B and starts a new reading process 210b with the image data captured in the latest frame 201c as the target of processing. In this case, reading process 210a is wasted, but the waiting time for reading process 210a, which will likely end in failure, is eliminated, allowing reading process 210b, which has a relatively high probability of success, to start earlier. Therefore, it can be said that the time until the reading result can be output is shortened by the amount of waiting time that has been eliminated.

[0078] Here, it is also possible to consider starting a new reading process 210b at the timing of arrow B, even in a case like Figure 4A, without making a judgment on the reference R. In this case as well, the newly started reading process 210b can be expected to have the same probability of success as in the case of Figure 4B. However, if this is done, as can be seen from the comparison between Figure 4A and Figure 4B, the start timing of the new reading process 210b will be later than in the case of Figure 4A. This is because the time of the reading process 210 performed within the predetermined time range T will be wasted. Conversely, by making a judgment based on criterion R and continuing the ongoing reading process 210 if criterion R is met, the time until the reading result can be output can be further reduced compared to the case where a new reading process 210b is always started at the timing of arrow B.

[0079] In both cases shown in Figure 4A and Figure 4B, the reading process 210b, which uses image data captured with a fixed target, is not guaranteed to succeed. This is because the brightness and contrast of the image may not be suitable for decoding, etc. In this case, a retry is necessary, similar to the case explained in Figure 3. However, by starting the reading process 210b earlier, the start time of the reading process 210 after the retry can also be started by the same amount. Therefore, even if a retry is necessary, the time until the reading result can be output can still be shortened by the amount of waiting time saved. Furthermore, in the example described here, the target determination process 220 is not performed after it has been determined that the target has been set, and therefore no new reading process 210 is started in the middle of the reading process 210. However, as will be shown later in the modified example, this is not essential.

[0080] Next, the processes performed by the reading device 100 to realize the functions described using Figure 2 and the operations described using Figures 3 to 4B will be explained in more detail using a flowchart. The processes described here are processes according to an embodiment of the optical information reading method of the present invention.

[0081] First, Figure 5 shows a flowchart of the process that CPU 121 executes when a read start trigger is detected. In this process, the CPU 121 first instructs the optical unit 110 to perform imaging under pre-registered default imaging conditions (S11). After this, the optical unit 110 continues to perform imaging according to the imaging conditions set at that time, one frame period at a time, until it is instructed to stop imaging. The imaging conditions can be changed during the process. The default imaging conditions may always be the same, or they may be set to change automatically according to settings made by the user or the surrounding conditions detected by any sensor.

[0082] Next, CPU 121 starts the read routine shown in Figure 12 (S12). The read routine in Figure 12 consists of the read process 210 shown in Figures 3 to 4B and the retry process for that process. Its specific details will be described later. Subsequently, the CPU 121 waits until the imaging sensor 111 completes capturing the next frame (S13), and once completed, it executes the target determination process 220 shown in Figures 9 and 10 (S14). The specific details of the target determination process 220 will be described later.

[0083] If the CPU 121 determines in the target determination process 220 that the target has not been determined (No in S15), and if the execution of the reading routine is still ongoing (Yes in S16), it returns to step S13 and repeats the process. In other words, the target determination process 220 is executed each time one frame of imaging is completed. If the reading routine has finished processing in step S16, the CPU 121 instructs the optical unit 110 to stop imaging (S21) and terminates the process. This route is followed in cases where the target could not be determined until the reading was successful or after a specified number of retries resulted in a reading failure, and the start of a new reading process 210b as shown in Figure 4B is not initiated until the very end.

[0084] On the other hand, if a target was determined in step S15, the CPU 121 checks which frame the image data to be processed by the reading routine belongs to (S17). If the image data of a frame within the period (predetermined time range T) aggregated in the most recent target determination process 220 is not the target (No. in S18), the reading routine in Figure 12 is restarted (S19). This starts a new reading process 210. The currently running reading routine may be stopped. Alternatively, the retry count referenced in step S88 of Figure 12 may be passed from the currently running reading routine to the restarted reading routine. This route corresponds to the case in Figure 4B.

[0085] If the answer in step S18 is Yes, then step S19 is skipped, and the currently running read routine continues. This route corresponds to the case in Figure 4A. In either case, the CPU 121 then monitors the execution status of the reading routine and waits until the reading routine is completed (S20). Once the reading routine is completed, it instructs the optical unit 110 to stop imaging (S21) and terminates the process. The above processing reduces the time required to output the reading results as explained using Figures 4A and 4B. The processing in steps S15 to S19 is the reading control procedure and corresponds to the function of the reading control unit 146.

[0086] Next, using Figures 6A to 8B, we will explain the general outline of the estimation of the movement amount of the imaging sensor 111 and the determination of whether or not the target has been set, which are performed in the target determination process 220. First, Figures 6A and 6B show examples of images 20a and 20b captured in two consecutive frames, respectively. Image 20a is the image from the previous frame, and image 20b is the image from the subsequent frame. Both images contain the code symbol 21, which is the optical information to be read. The symbols 22a and 22b indicate the positions in each image 20a and 20b of a hypothetical reference point used to estimate the distance traveled.

[0087] If the imaging sensor 111 moves (relative to the code symbol 21) between the imaging timing of one frame and the imaging timing of the next frame, the position of the code symbol 21 in the images 20a and 20b, captured in these two frames, will differ. Here, considering only translational movement, since it is unlikely that the operator rotates the imaging sensor 111 (including the optical unit 110) or the code symbol 21 (the object to be read that carries it) in the vicinity of the point in time when the target is set, 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.

[0088] Therefore, by detecting where the reference point in image 20a has moved to in image 20b and plotting their positions as shown in Figure 6C, it is possible to estimate the amount of movement of the imaging sensor 111 during the period of one frame between the two frames. The vector (called the "movement vector") pointing from the position 22b of the reference point in the later frame's image 20b to the position 22a of the reference point in the previous frame's image 20a indicates an estimate of the direction and magnitude of the movement of the image sensor 111 between these two frames. However, if the image scale (distance in real space per pixel) is unknown, the actual distance moved in real space cannot be determined. The magnitude of the movement vector can be determined on a pixel-by-pixel basis, but this only allows for the estimation of the relative magnitude of the distance moved. If the image scale can be estimated separately, the distance moved can also be estimated.

[0089] Furthermore, it is unlikely that the operator moves the image sensor 111 or the code symbol 21 perpendicular to the plane appearing in the image near the point in time when the target is set. Therefore, when determining whether or not the target is set, it is acceptable to consider that the relative direction of movement between the image sensor 111 and the code symbol 21 is essentially only parallel to the plane appearing in the captured image. Therefore, all points on image 20a are considered to move in the same direction and by the same magnitude in image 20b. Consequently, the resulting movement vector will be the same regardless of which point on image 20a is used as the reference point. However, since it is necessary to ensure that the reference point does not move outside the frame of image 20b due to the movement, it is preferable to take the reference point near the center of the image.

[0090] In actual processing, it is difficult to precisely estimate the location of a specific point on image 20a on image 20b. Therefore, a predetermined area near the center of image 20a is used as a template image, and this is sequentially compared with images of the same size at various positions in image 20b to search for the position that is most similar to the template image (smallest difference). Then, the movement vector is calculated by assuming that the template image has moved to the position that was determined to be the most similar.

[0091] Figure 7A shows an example of the area used as a template image in image 20a. Here, when determining the destination, it is preferable to be able to sample many pixels of the optical information portion of the target to be read, as detecting changes in the diverse black and white patterns of the image allows for more accurate determination. However, if a wide-area image is used as the template image, in order to speed up processing, it is necessary to sample points within that area sparsely, which reduces the accuracy of the determination. Also, if the optical information of the target to be read is small and surrounded by a monochrome background, using a wide-area image reduces the contribution of the optical information portion, which also reduces the accuracy of the determination.

[0092] On the other hand, using images of a narrow range allows for dense sampling, but if the image is locally bright or dark, resulting in areas of solid white or solid black, the similarity may be high even at locations different from the actual movement. Furthermore, in the case of images containing objects with parallel linear contours, such as barcodes, the similarity may be high at locations where the object has moved parallel to those contours, regardless of the actual movement.

[0093] Therefore, in this embodiment, as shown in Figure 7A, a relatively wide template image 23 and a narrower template image 24 are used, and each is compared with image 20b. For example, template image 23 could be centered to coincide with image 20a and have a range of half the number of pixels in both the vertical and horizontal directions, while template image 24 could similarly have a range of one-quarter the number of pixels.

[0094] Furthermore, Figure 7B shows an example of a search range 25 that is compared with the template image 23 in image 20b, using a wide-area template image 23 as an example. The search range 25 should be an area that extends around the position of the template image 23 in image 20a to a width approximately equal to the maximum value of the movement amount to be obtained as an estimation result. If the search range 25 is made too wide, the computational load will increase and the time required for the target determination process 220 will be longer, so the width of the search range 25 should be determined taking this into consideration.

[0095] By cropping images to the same size as the template image 23 from various positions within this search range 25 and sequentially calculating the degree of difference from the template image, the position with the smallest degree of difference can be identified. For each frame within a predetermined time range T, a movement vector is determined as described above, and by connecting these determined movement vectors, the movement path and range of the imaging sensor 111 within the predetermined time range T can be estimated. Strictly speaking, the image scale may differ in each frame, but considering the direction of movement that occurs near the time when the target is actually locked on, it is thought that sufficient estimation accuracy can be obtained to determine whether or not the target has been locked on, even if the difference in scale is ignored. This point has also been confirmed in experiments conducted by the inventors.

[0096] Figures 8A and 8B show examples of movement paths obtained by connecting the movement vectors of each frame within a predetermined time range T, as determined in this way. Each arrow in the figure represents a single movement vector, and the reference numeral 41 indicates a virtual movement end position within a predetermined time range T. The movement vectors of each frame are sequentially positioned such that the tip of the last frame's movement vector 42a is at the movement end position 41, and the movement vector 42b of the previous frame's movement vector 42b is at the base of movement vector 42a, and so on. In this way, the position of the base of the first frame's movement vector 42n becomes the virtual movement start position 43 within the predetermined time range T. For example, if all of the movement vectors 42a to 42n arranged in this manner fall within a predetermined convergence range 44 centered on the movement end position 41, as shown in Figure 8A, it can be determined that the amount of movement of the imaging sensor 111 is less than or equal to the first criterion and that the target has been set.

[0097] On the other hand, even if the end position 41 and the start position 43 are the same as in Figure 8A, if at least a part of the movement vectors 42a to 42n extends beyond the convergence range 44 as shown in Figure 8B, it can be determined that the target is not yet set. When the target is set, even if there is some movement in the imaging sensor 111 due to the operator's hand movements, it is assumed that it will only move in the vicinity of a specific point, and from this perspective, the criterion is that it should stay within the convergence range 44. Even if the amount of movement per frame is somewhat large, if it is moving only in the vicinity of a specific point, it can be interpreted that the target is set, so it is thought that using the convergence range 44 as a criterion allows for more accurate detection of the target being set than using only the amount of movement as a criterion.

[0098] Furthermore, even if the target is set, if the amount of movement per frame is relatively large, the image blur will be significant, which may cause the reading process 210 to fail. Therefore, in this embodiment, if the amount of movement per frame (average of the magnitude of the movement vector) exceeds a predetermined threshold, it is determined that the target is not set. However, setting this criterion is not essential.

[0099] Next, Figures 9 and 10 show flowcharts of the target determination process 220 for performing the target determination described above. Figure 11 also shows a flowchart of the movement amount estimation process during the process shown in Figure 9. The target determination process 220 is the processing of the estimation procedure and corresponds to the function of the target determination unit 145. In the target determination process 220 shown in Figure 9, the CPU 121 first acquires image data captured in the latest frame and the previous frame (S31). Then, it extracts a wide first range template image from the image data of the previous frame (S32), and uses this template image to perform the movement amount estimation process shown in Figure 11 (S33). The template image is as explained using Figure 7A.

[0100] In the movement estimation process shown in Figure 11, the CPU 121 first sets the primary search range as an area that is expanded by p1 pixels in both the vertical and horizontal directions from the region corresponding to the template image in the latest frame of the image (S61). Then, using images of the same size as the template image at each d1 pixel position in both the vertical and horizontal directions within the primary search range as comparison images, the CPU performs SSDA (Sequential Similarity Detection Algorithm) calculation on each comparison image (S62). SSDA is calculated as SAD (Sum of Absolute Difference) = R for each position according to Equation 1. SAD While calculating the summation, the calculation is terminated if SAD exceeds a certain threshold.

[0101]

number

[0102] For the first comparison image, the SAD is calculated without a threshold, and this SAD is used as the threshold for calculating the SAD for the next comparison image. If the threshold is exceeded during the summation, the calculation is stopped and the calculation moves on to the next comparison image. If the SAD can be obtained without exceeding the threshold until the end, that value is used as the next threshold. The position of the comparison image at this point is also stored. This process is repeated for all comparison images at all positions, and the final threshold value and the position of the comparison image at which that threshold was obtained are obtained as the SSDA calculation results. If the SSDA's processing load is too high and the calculation takes too long, the calculation may be performed only on pixels sampled at appropriate intervals within the template image and comparison image, such as every other pixel or every two pixels.

[0103] In the SSDA of step S62, it is possible to determine which position of the comparison image has the smallest SAD within the primary search range, that is, the comparison image with the smallest degree of difference from the template image. This position can be used as a candidate for the destination of the template image. Also, since the calculation can be interrupted during the Σ addition when it is found that the SAD does not become the minimum, the total amount of operations can be suppressed. Note that the SAD can be used as an index of the degree of difference indicating how much difference there is between two images, but it is also possible to use other indices.

[0104] Next, the CPU 121 sets, as the secondary search range, the range obtained by expanding the position of the comparison image where the smallest SAD was obtained in the SSDA in the vertical and horizontal directions by p2 pixels (S63). However, p2 < p1. Then, for each position every d2 pixels in the vertical and horizontal directions within the secondary search range, an image of the same size as the template image is used as the comparison image, and the SSDA operation is performed for each comparison image (S64). However, d2 < d1. The processes of steps S63 and S64 are to more precisely search the periphery of the movement destination candidate obtained in steps S61 and S62.

[0105] The CPU 121 estimates that the position where the smallest SAD was obtained in the SSDA of step S64 is the movement destination of the template image in the image of the latest frame, and generates a vector indicating the movement from this position to the position of the template image as the movement vector (S65). Also, for the comparison image at the position where the smallest SAD was obtained, ZNCC (Zero-mean Normalized Cross-Correlation) = R ZNCC is obtained, and this value is stored as the similarity (S66), and the process returns to the original process.

[0106] The ZNCC can be obtained according to Equation 2 and can be used as an index of the similarity indicating how similar two images are. However, it is also possible to use other indices instead. When the similarity is small, the movement destination obtained by the SSDA is considered to be less reliable.

[0107]

number

[0108] Returning to the explanation of Figure 9, after step S33, the CPU 121 extracts a template image of a second range that is narrower than the first range from the image data of the previous frame (S34), and uses that template image to perform the displacement estimation process of Figure 11 again (S35). Subsequently, the CPU 121 selects the range with the greater similarity obtained in the movement estimation process from the first range and the second range as the processing target (S36), and determines whether the similarity obtained for the processing target is above a predetermined threshold (S37). This threshold can be determined based on what level of similarity is required to make the SSDA results reliable.

[0109] If the answer in step S37 is Yes, the CPU 121 stores the movement vector obtained for the object being processed as the movement vector corresponding to the latest frame (S38). If the answer is No, the movement vector obtained this time is not used, and a message is stored indicating that there is no movement vector corresponding to the latest frame (S39). In either case, the CPU 121 then determines whether processing for a predetermined number of frames has been completed (S40). That is, it determines whether the target determination process 220 has been performed for a sufficient number of frames to determine whether the target is set or not. The predetermined number of frames corresponds to the predetermined time range T shown in Figures 4A and 4B. Although it is shown as 6 frames in Figures 4A and 4B, it is not limited to this.

[0110] If the answer in step S40 is Yes, the process proceeds to step S41 in Figure 10. The CPU 121 then sequentially determines whether it has stored movement vectors for a predetermined proportion or more of the number of immediate neighbor frames, that is, whether it determined in step S37 that the similarity exceeded the threshold (S41), whether the average magnitude of the movement vectors stored for the number of immediate neighbor frames is below the threshold (S42), and whether the trajectory formed by connecting the movement vectors stored for the number of immediate neighbor frames (movement range: see Figures 8A and 8B) falls within a predetermined convergence range 44 (S43).

[0111] If all of these are Yes, the CPU 121 determines that it has targeted the optical information to be read (S44). If even one is No, it determines that it has not targeted (S45). If No is obtained in step S40, it also determines that it has not targeted because it has not obtained enough information to determine that it has targeted (S45). After step S44 or S45, the process returns to the original state.

[0112] The decision in step S41 is included because if the number of reliable movement vectors is too small, the determination of the movement range in step S43 cannot be made appropriately. The predetermined percentage could be, for example, 25%. The decision in step S42 is included because, even if the overall range of movement is within the predetermined convergence range 44, if the movement per frame is too large, it is unlikely that the target is set, and the state is not suitable for reading.

[0113] The decision in step S43 is explained using Figures 8A and 8B. However, when connecting the movement vectors to obtain the estimated movement range, the movement vectors that were not adopted in step S39 may be ignored. For example, if the movement vector of the Nth frame is not adopted, the tip of the movement vector of the N-1th frame can be connected to the root of the movement vector of the N+1th frame.

[0114] Through the above processing, the reading device 100 can estimate the amount of movement of the imaging sensor 111 and, based on the result, determine whether or not the optical information of the object to be read has been targeted. Note that when making a determination that takes the movement path into consideration, as in step S43, at least two movement vectors are required. If only one is used, it is no different from simply considering the distance or magnitude of the movement. Therefore, it is necessary to perform the target determination process 220 at least twice to determine that the target has been targeted, and this requires using image data for at least three frames.

[0115] Next, Figure 12 shows a flowchart of the reading routine that is activated by the process in Figure 5. The reading routine is executed in parallel with the processing shown in Figure 5. Steps S81 to S85 are the reading process 210 explained using Figure 3, and steps S86 onwards are related to the retry process. The reading routine is the processing of the reading procedure, and in this process, the CPU 121 functions as the reading unit.

[0116] In the reading routine, the CPU 121 first acquires the image data of the image captured in the most recent frame at that time and sets it as the target for processing (S81). Then, the CPU 121 sequentially executes the target analysis process 211, the image adjustment process 212, the filtering process 213, and the object extraction / decoding process 214 on the image data to be processed (S82~S85). Each of these processes is explained using Figure 3, and the details of the image adjustment process 212 will be described later.

[0117] After the above, the CPU 121 determines whether the optical information was successfully read by the object extraction and decoding process 214 (S86). If successful, it outputs the data obtained from the read as the read result (S87) and terminates the process. If the process fails in step S86, it returns to step S81 and repeats the process until the number of retries exceeds a specified value (No in S88). Once the specified value is exceeded (Yes in S88), it outputs a read error (S89) and terminates the process. Based on the above, the reading device 100 performs the operation described with reference to Figure 3.

[0118] Next, the basic concept of the imaging adjustment process 212 will be explained with reference to Figures 13A to 14. As described above, the imaging adjustment process 212 adjusts the imaging conditions of the optical unit 110 based on the content of the image data and the imaging conditions used for imaging. More specifically, it adjusts the integrated light amount supplied to the imaging sensor 111 during imaging and the amplification factor (gain) of the imaging sensor 111.

[0119] Furthermore, the frequency distribution of pixel values ​​in a specific region of an image (called the "dimming range") obtained by imaging under certain imaging conditions is determined, and an index value of the image's brightness (called the "luminance index value") to be used as a reference for adjustment is determined from this frequency distribution. Then, the integrated light quantity and amplification ratio are adjusted so that the luminance index value similarly determined for the image obtained in the next imaging is the predetermined target luminance index value, that is, so that the brightness of the image obtained in the next imaging is expected to be at a predetermined target level determined by the target luminance index value. Note that the luminance index value and target luminance index value described below are not numbers that directly represent the brightness of the image itself, but they can represent the level of brightness of the image.

[0120] Figures 13A and 13B show examples of the dimming range defined in the imaging adjustment process 212. Figure 13A shows an example of a relatively wide dimming range 51, which is set when the target is not yet determined (the target determination process 220 has not determined that the target is set). Figure 13B shows an example of a relatively narrow dimming range 52, which is set when the target is set. These dimming ranges 51 and 52 are reference positions that are the ranges from which pixel values ​​used as a basis for adjusting imaging conditions are acquired.

[0121] The reason why the imaging adjustment process 212 is performed based on the image within the dimming range rather than the entire image is to adjust the imaging conditions based on the state of the image near the optical information to be read, so that the optical information appears in the image in a manner that makes it easy to read. Therefore, ideally, the dimming range should be exactly the same as the region where the optical information is located.

[0122] However, the more adjustments to imaging conditions are needed, the more difficult it becomes to pinpoint the location of optical information within the image. Therefore, when the target of optical information is not yet determined, a relatively wide area within image 50a is defined as the dimming range 51, as shown in Figure 13A, based on the expectation that optical information is located somewhere within the image. If an EIM light 53 can be detected, the range may be defined around the EIM light 53, or it may be defined at the center of image 50a. It may also be defined based on any other appropriate position.

[0123] On the other hand, as shown in image 50a of Figure 13A, in cases where, for example, a barcode, which is optical information, is supported on a non-emissive material, and there is a strong light source such as a window that lets in light, the image characteristics, such as brightness, may differ significantly between the optical information and its surroundings. In such cases, if a wide range is used for dimming, there is a possibility that the imaging conditions will be adjusted based on areas that have significantly different characteristics from the optical information. In the example in Figure 13A, the optical information area is dark, but the image may be made even darker because the surroundings are bright. The reason for not adjusting the imaging conditions based on the entire image, even when the target is not yet determined, but rather setting the dimming range 51 on a portion of image 50a, is to mitigate this drawback to some extent.

[0124] On the other hand, if the target is set to optical information, it is assumed that the operator is aligning the aima light emitted by the LD113 with the location of the optical information to be read, and therefore it can be expected that the optical information is located around the aima light. Thus, as shown in Figure 13B, by setting the dimming range 52 to a relatively narrow range (at least narrower than the dimming range 51) around and near the location of the aima light 53 in image 50b, it is considered that adjustments that contribute to the successful reading of optical information can be made.

[0125] The size of the dimming range 52 should be determined considering the typical usage of the reading device 100 and the typical way the optical information is carried, so that, when the target is set, it is expected that the background image other than the carrier surrounding the optical information to be read will not be captured to a negligible extent. Multiple options may be prepared and switched according to the reading mode setting.

[0126] If the EIM light 53 is not used or cannot be detected, it is assumed that the operator aligns the optical information to the vicinity of the center of the imaging range. Therefore, a similar effect can be expected by setting the dimming range 52 to a relatively narrow area near the center of image 50b. However, the dimming range 52 may also be set based on another appropriate position in the image that the operator is expected to align with the optical information. By defining such a narrow dimming range 52, even when the image characteristics such as brightness differ significantly between the optical information and its surroundings, the imaging conditions can be adjusted based on the image state near the optical information so that the optical information appears in the image in a manner that is easy to read.

[0127] The adjustment of the integrated light quantity and amplification factor based on the images of the above dimming range can be performed as follows, for example. First, several pixels are sampled evenly from within the dimming range, and the pixel values ​​are aggregated to determine the frequency distribution. Sampling could be performed using, for example, 400 points in a 20x20 grid.

[0128] An example of this frequency distribution is shown in FIG. 14. The graph of the relative frequency distribution is indicated by reference numeral 60. From this frequency distribution, the above-described luminance index value can be obtained. For example, when using a relatively wide dimming range 51, in the case where brighter pixels have larger pixel values, the pixel value of an appropriate quantile close to the upper limit of the cumulative relative frequency is used as the luminance index value D c And it has been found by the inventors' experiments that relatively good adjustment can be performed by setting the target luminance index value to about 600 in the case of 1024 gradations. The luminance index value D c is set as a quantile close to the upper limit rather than the upper limit in order to exclude the white flare portion due to specular reflection.

[0129] Then, the black level of the imaging sensor 111 is D b , the integrated light amount in the imaging where the luminance index value D c is obtained is I c , the amplification factor of the imaging sensor 111 is g c , and assuming that the proportionality constant determined by the ambient environment at the time of imaging is k, the following relationship is considered to hold. D c -D b =k×I c ×g c ··· (1) Also, in order to realize the target luminance index value D T , assuming that the integrated light amount and the amplification factor to be set are I n , g n respectively, the following relationship is similarly considered to hold. D T -D b =k×I n ×g n ··· (2)

[0130] From these equations (1) and (2), the following relationship can be derived. I n ×g n =(D T -D b ) / (D c -D b )×I c ×g c ··· (3) Therefore, when adjusting the imaging conditions, D c , D T , D b , I c、 g c Based on the value of (3), an appropriate I n and g n The value should be determined and set in the optical unit 110. Note that the cumulative light quantity I c and I n This can be determined by the exposure time of the image sensor 111 when imaging is performed in a bright environment without illumination, and by the integrated light intensity of the illumination (or the illumination duration if the light intensity is constant) when imaging is performed in a dark environment with illumination. Therefore, when adjusting the imaging conditions, it is possible to adjust at least one of the items: exposure time or illumination duration.

[0131] Furthermore, equation (3) yields I n ×g n This is the target value, and I that satisfies this n and g n There are infinitely many combinations of values ​​for I. n and g n You should select the value of g. The basic idea is to select the amplification factor g of the imaging sensor 111. n If the value is increased too much, the noise in the image will increase, and if the exposure time or lighting time is increased, it will cause blurring in the image. Therefore, I n and g n Rather than making one of them extremely large, it's best to adjust both in a balanced way.

[0132] On the other hand, when using a relatively narrow dimming range 52, the luminance index value D is determined based on the threshold between two classes when pixels are classified into black pixels (first class of pixels with small pixel values, dark pixels) and white pixels (second class of pixels with large pixel values, bright pixels) based on the pixel value of each sampled pixel. c The inventors' experiments have shown that relatively good adjustments can be made by defining the luminance index value D. cThe inventors' experiments have shown that particularly good adjustment can be achieved by setting the threshold to a value that indicates a pixel value that is brighter (larger in this example) than the threshold, especially a value that indicates a pixel value that is brighter (larger in this example) than the threshold in the vicinity of the threshold.

[0133] Classification into two classes can be performed, for example, using discriminant analysis as follows: First, if we define a threshold value n, we can determine the number of pixels belonging to each class, as well as the mean and variance of the pixel values ​​of those pixels, as shown in Figure 14. We can also determine the mean and variance of the pixel values ​​for all pixels. Based on these values, we can then determine the intraclass variance σ shown in Equation 3. w 2 This can be calculated. The within-class variance is the weighted average of the variance of pixel values ​​within each class, taking into account the number of pixels belonging to each class. It becomes smaller when pixel values ​​are clustered together within a divided class.

[0134]

number

[0135] On the other hand, the inter-class variance σ b 2 This is defined as shown in equation 4. The inter-class variance is the variance σ calculated for all pixels. t 2 This is the remaining variance that is not represented by the within-class variance.

number

[0136] Then, by calculating the degree of separation defined by equation 5 for various values ​​of n, and finding the threshold n that maximizes this, we can find the threshold n that best classifies the two classes. This is essentially equivalent to finding the threshold n that minimizes the intraclass variance.

number

[0137] Note that Figure 14 shows a frequency distribution that includes a small frequency region near the center of the grayscale values ​​to make the boundaries between assumed classes clearer. However, even with a frequency distribution that does not include such a region, classification by discriminant analysis is still possible. Furthermore, the threshold n calculated here may differ from the threshold used in the binarization process 214 for object extraction and decoding.

[0138] Brightness index value D when using a relatively narrow dimming range of 52 c It is preferable that the value of n is a value that indicates a pixel value brighter than the threshold n. Also, the luminance index value D c It is preferable that the value is not far from the threshold n, but rather close to the threshold n, as in the example above. Here, the vicinity of the threshold n is the luminance index value D. c The intention behind this is to adjust the brightness so that the lowest brightness part of the white area becomes the target brightness. In other words, the white area that is most submerged in black becomes the target brightness index value D T This is to adjust the brightness (pixel value) to match what is indicated.

[0139] Brightness index value D c The criterion for how close the value should be to the threshold n can be determined, for example, by the area percentage containing the thin bars, which is determined by the barcode standard, if the object to be read is a barcode. Pixels that capture the white bars in a barcode are generally considered to belong to the white pixel class. However, thinner white bars tend to be obscured by the black bars on either side, resulting in smaller pixel values ​​(darker values) compared to thicker white bars. Therefore, pixels that capture thin white bars are thought to be concentrated in the lower pixel values ​​(closer to the threshold n) within the white pixel class. Therefore, assuming the area ratio of thin to thick white bars is 30:70, and given that the target can be accurately captured using a particularly narrow dimming range 52, and that barcodes are present throughout the entire dimming range 52, the brightness index value D is located at a position that does not exceed the bottom 30% of the white pixel class in terms of pixel count. c By placing this, the pixel values ​​of the thin white bars are converted to the brightness index value D cIt can be done this way.

[0140] Furthermore, for example, in the code128 standard, the character code "d" is represented by a sequence of black-white-black-white-black-white bars with thicknesses in the ratio 1:4:1:2:2:1. Within this sequence, there are three types of white bars sandwiched between black bars, with a width ratio of 4:2:1. The area of ​​the thinnest white bar accounts for 1 / (4+2+1)=14.2% of the white area. Therefore, pixels capturing the thinnest white bar are likely concentrated in the bottom 14.2% of the white pixel class in terms of pixel count. Brightness index value D c By using the pixel values ​​located within this range, the pixel value of the thinnest white bar is used as the brightness index value D. c It can be done this way.

[0141] The relationship between the number of pixels and the pixel value varies depending on the captured image, but based on images of the expected reading target captured under various conditions, we estimate the range in which the pixel value of the thinnest white bar is distributed, and then within that range, the luminance index value D c The brightness index value D c It is helpful to define how much above the threshold n the pixel value should be. For example, in barcode reading, the inventors' experiments have shown that setting the pixel value to approximately 5% greater than the maximum pixel value than the calculated threshold n allows for favorable imaging condition adjustment. Furthermore, for example, dividing the pixel values ​​into approximately 20 classes and using the class value one level above the class to which the threshold n belongs, the luminance index value D can be used. c It can also be used as such. Alternatively, each time brightness adjustment is performed, pixel values ​​that fall within a predetermined lower ratio may be determined based on the distribution of pixel values ​​within the white pixel class.

[0142] Similarly, when reading 2D codes or performing OCR, the brightness index value D is determined based on the area ratio of the area where the white is most crushed among the white parts appearing in the code symbol or character set to be read, and how far above the threshold n the pixel value is. c It is possible to determine what should be done. However, if the proportion of areas where white is most crushed is extremely small, the luminance index value D may be used based on this ratio. c Defining a threshold value n is not always useful. However, the luminance index value D can be appropriately determined by using the threshold n itself or a value near the threshold n, such as a pixel value that is about 5% larger than the maximum pixel value. c As described later, the target brightness index value D T It is possible to find the appropriate brightness by gradually increasing the setting.

[0143] The luminance index value D was calculated as described above. c Even when using I n ×g n The target value can be determined according to equation (3), as in the case described above. Also, the target luminance index value D T For example, it is possible to use a value similar to that used in the case of a wide dimming range 51 (when the target is not determined). In the case of a narrow dimming range 52 using discriminant analysis (when the target is determined), the pixel value close to the upper limit is the luminance index value D. c Compared to the case with a wide dimming range of 51, the luminance index value D c The value of tends to decrease, so the target luminance index value D T If the same value is used, the image captured after adjustment is expected to be brighter compared to the case with a wide dimming range of 51. Brightness index value D c The above luminance index value D is due to differences in the calculation method. c The relative sizes do not necessarily hold true for all images, but they are considered to hold true for images from which optical information can be read.

[0144] With a narrow dimming range of 52, the imaging conditions can be adjusted by focusing on the image near the optical information. By making such adjustments, only the parts of the optical information represented in black (parts with low light reflectivity) will still have low pixel values, while the other parts, including the background and parts represented in white (parts with high light reflectivity), will all have high pixel values. As a result, it is expected that the contrast of the optical information will be enhanced.

[0145] Focusing on the within-class variance, we classify pixels into dark and bright classes, and then focus on the threshold value when classifying them, which gives us the luminance index D. c By defining a value and adjusting based on this value, it is possible to adjust the pixel values ​​of the black areas in the optical information so that they do not become too high. Therefore, it is possible to avoid making the image too bright, which would cause the black areas to become bright pixels and indistinguishable from the white areas. This allows for precise adjustment of imaging conditions to obtain an image with brightness suitable for reading. In particular, when the background has a relatively low light reflectivity, or when there is some blurring in the printing of code symbols, etc., causing the white areas to be somewhat obscured, obtaining a bright image in this way can be expected to allow for the extraction of the black areas of optical information from the image with high accuracy.

[0146] The within-class variance described here is just one example of an evaluation function that represents the degree of variance of pixel values ​​within each class. It is not mandatory to take a weighted average in the evaluation function; the variance of pixel values ​​belonging to each class may be reflected in the evaluation function in a different way. Also, the luminance index value D c It is not essential to define the value as the pixel value that is brighter than the threshold between classes. Brightness index value D c It is preferable that the pixel value is near the threshold between classes, but the user may be able to set how much brighter or darker the pixel value should be than the threshold.

[0147] Furthermore, the target brightness index value D is similar to that for the case with a wide dimming range of 51. T If the object extraction / decoding process 214 fails even after adjusting the imaging conditions using the above method, a higher target brightness index value D may be used. T It is useful to make adjustments and retry using this method. In this reading device 100, as shown in Tables 1 and 2, multiple target brightness index values ​​D are set for each reading mode. T When using a narrow dimming range of 52 (when the target is determined), first set the target brightness index value D for the lowest level (level 0). TThe imaging conditions are adjusted using this method to perform object extraction and decoding 214. If this fails, that is, if optical information cannot be read while the target is set, the target brightness index value D is increased sequentially. T We are using this to retry. Target brightness index value D T The higher the level, the higher the target image brightness level. The reading mode can be set by the operator, or it can be set automatically by the reading device 100 according to some criteria. Table 1 is for reading code symbols, and Table 2 is for OCR (Optical Character Recognition).

[0148] [Table 1]

[0149] [Table 2]

[0150] If object extraction and decoding process 214 fails even at the maximum level, the system may have made the image too bright, and it will revert to the lowest level and retry. By performing this operation, it is possible to successfully read optical information with fewer retries, and the time required to output the reading results can be reduced.

[0151] Furthermore, as explained above, by using the wide dimming range 51 and the narrow dimming range 52 interchangeably, especially when the target is fixed, the narrow dimming range 52 can be used to appropriately adjust the imaging conditions when analyzing 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. If the target is set, and the object extraction / decoding process 214 fails to read, a larger target luminance index value D is used. T Adjusting the imaging conditions and retrying using this method also contributes to this effect.

[0152] When the aiming is fixed, it is considered that the optical information of the reading target is highly likely to be included within the dimming range. Therefore, by changing the target level of the image brightness after reaching that state, it is possible to adjust the image brightness while surely reflecting the contrast of the optical information, and it is considered that an image with brightness suitable for reading can be obtained at any of the target levels. At this time, if the image is too bright, contrast information will be lost and it will cause misreading. Therefore, after the aiming is fixed, it is preferable to start trying from an image that is not too bright to the object extraction / decoding process 214.

[0153] Also, if the target level of the image brightness is changed before the aiming is fixed, the image may become too bright and cause halation, making it difficult to determine whether the aiming has been fixed. From this perspective as well, it is useful not to make the image too bright when the aiming is not fixed. The above effects become greater by changing the dimming range to the narrow dimming range 52 when the aiming is fixed, but it is not essential to implement this simultaneously.

[0154] In the reading device 100, even when using the luminance index value D obtained by any of the above methods, when determining specific imaging conditions based on the target value of I × g, an upper limit value is set for the exposure time when the illumination is not lit. This upper limit value can be determined based on the movement amount of the imaging sensor 111 per frame obtained in the aiming determination process 220. Specifically, it can be determined as follows. c For the case of using n × g n it is also possible to determine the upper limit value for the exposure time when the illumination is not lit. This upper limit value can be determined based on the movement amount of the imaging sensor 111 per frame obtained in the aiming determination process 220. Specifically, it can be determined as follows.

[0155] First, the amount of movement of the imaging sensor 111 per frame can be obtained from the magnitude of the movement vector of each frame. At this time, data for a predetermined number of frames used as a reference in step S40 of FIG. 9 may be aggregated, or data for a different number of frames may be aggregated. It is also conceivable to use the average value of the data within the aggregation range, or to use the maximum value, median value, most recent value, etc. Let the amount of movement obtained in this way be x [pixel].

[0156] Here, let the length of one frame be t f and the exposure time be t exp . Then, the amount of movement p x [pixel] during the exposure time can be expressed as follows. p x = t exp / t f × x ··· (4) On the other hand, if the allowable amount of image blur in the image for reading optical information is defined as the allowable blur p [pixel], it is required that p satisfies the following equation. p > p x = t exp / t f × x ··· (5) Rearranging this gives p / x × t f > t exp ··· (6) and it can be seen that the upper limit of the allowable exposure time is determined by p / x × t f .

[0157] For example, if the allowable blur p = 1 [pixel] and the length of one frame t f = 10 [ms], the upper limit of the allowable exposure time corresponding to the amount of movement x [pixel] of the imaging sensor 111 per frame can be determined as shown in Table 3 below. Of course, the upper limit of the exposure time may not be such discrete values, but may be continuous values obtained by substituting the numerical value of the amount of movement into the left side of equation (6). It may also be possible to determine the upper limit of the allowable exposure time when the amount of movement is 10 pixels or more.

[0158]

Table 3

[0159] The integrated light quantity I to be used for the next image n and amplification factor g n In determining this, by ensuring that the exposure time does not exceed the upper limit corresponding to this amount of movement x, the imaging conditions can be appropriately adjusted to prevent situations where optical information cannot be read due to blur even if the brightness is appropriate.

[0160] In other words, a wider range of exposure time options is available, especially when the movement of the image sensor 111 is small. In particular, in dark environments where the object to be read is far away, it may be difficult to capture a bright image suitable for reading with an exposure time of around 1000 μs, and being able to set a longer exposure time contributes significantly to increasing the success rate of reading. The above exposure time limits apply equally whether the target optical information is specified or not.

[0161] The acceptable blur p depends on the size of the elements constituting the optical information in the image, the complexity of the optical information, the contrast and noise of the image, etc. This value should be set in advance, assuming the standard operating environment of the reading device 100. For example, considering that the smallest element of the code symbol to be read (such as the bars in a barcode or the dots in a 2D code) fits into one pixel, one could pre-determine the acceptable blur p as 0.5 [pixels]. Individual values ​​can also be prepared depending on the combination of the distance to the object to be read and what the object to be read is. When performing super-resolution below 1 pixel / element, it is also possible to set the acceptable blur p to less than 0.5 [pixels].

[0162] The same considerations apply to the duration of illumination when lights are turned on. In this case, even if there is a period of exposure without the lights on, the effect of that exposure on the image is relatively small. Also, the exposure time is usually close to the illumination time. Therefore, the upper limit of the illumination time can be determined in the same way as above.

[0163] Next, Figure 15 shows a flowchart of the imaging adjustment process 212 described above. This process is executed at S83 in Figure 12, as mentioned above, and is part of the imaging adjustment procedure. In this process, the CPU 121 functions as the imaging adjustment unit. In the imaging adjustment process 212, the CPU 121 first determines whether or not the target has been determined to be set in the target determination process 220 shown in Figures 9 and 10 (S101).

[0164] If the target is set, the CPU 121 detects the position of the aima light 53 in the image to be processed (S102), and sets a dimming range 52 centered on the position of the aima light 53, which is narrower than the one set in step S107 (S103). Also, the target brightness index value D is set according to the set reading mode, starting from level 0 and increasing the levels sequentially, returning to level 0 after reaching the maximum level. T This is determined (see S104, Tables 1 and 2).

[0165] The position of the AIM light 53 can be detected using any known technique as appropriate. For example, the techniques described in Patent Documents 6 to 8 can be used. The process in step S102 is the AIM light detection procedure, in which the CPU 121 functions as an AIM light detection unit. The process in step S104 is the target adjustment procedure, in which the CPU 121 functions as a target adjustment unit.

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

[0167] On the other hand, if the target is not determined in step S101, the CPU 121 sets a wider dimming range 51 centered on the center of the image to be processed than the one set in step S103 (S107). Also, the target brightness index value D T This is set to a level 0 value corresponding to the set reading mode (S108). Next, the CPU 121 determines the frequency distribution of pixel values ​​in the image within the dimming range 51 set in step S108, and uses the pixel values ​​that are the upper predetermined quantiles as the brightness index value D for this adjustment. c This is determined (S109).

[0168] After step S106 or S109, the CPU 121 obtains the magnitude of the movement vector obtained in the most recent target determination process (S110). As mentioned above, an appropriate aggregation method such as the average or maximum value may be used. Then, when imaging is performed without turning on the lights (No. S111), the CPU 121 sets an upper limit for the exposure time based on the magnitude of the movement vector acquired in step S110 (S112). For example, equation (6) above can be used for this setting. Next, the CPU 121 sets the luminance index value for the next imaging to the target luminance index value D T The amplification factor and exposure time of the image sensor 111 are adjusted to meet the upper limit of the exposure time and set in the optical unit 110 (S113), and the process returns to the original state.

[0169] On the other hand, when imaging is performed with the lights on (Yes in S111), the CPU 121 sets an upper limit for the lighting time based on the magnitude of the movement vector acquired in step S110 (S114). For this setting, for example, equation (6) above can be used. Next, the CPU 121 sets the luminance index value for the next imaging to the target luminance index value D T The amplification factor and exposure time of the image sensor 111, as well as the illumination time of the pulse LED 114, are adjusted and set in the optical unit 110 (S115) so as to satisfy the upper limit of the illumination time, and the process returns to the original state.

[0170] Through the above process, the reading device 100 can adjust the imaging conditions as described using Figures 13A, 13B, and 14. In this adjustment, the target luminance index value D T When the target is not yet determined, it is set to the initial value of level 0. If the reading fails when the target is determined and the imaging adjustment process 212 is repeated, it will be set to a gradually higher level.

[0171] Furthermore, when imaging with the lights on, it is also possible to set an upper limit on the exposure time simultaneously with, or instead of, the lighting duration. In cases where the distance to the object to be read 101 is too far to receive light even with the lights on, or where the amount of light or the duration of lighting is separately limited to reduce glare, it may be possible to adjust the exposure time to capture an image with a more desirable brightness, even when the lights are on. When making such adjustments, it is preferable to set an upper limit on the exposure time to prevent blurring.

[0172] Figures 16A to 16D and 17A to 17D show examples of images that are processed by each reading process 210 when the reading process 210 is retried multiple times while the imaging adjustment process 212 shown in Figure 15 is executed. Figure 16A shows an example of an image processed in the second reading process 210, which is executed by the reading routine that was restarted in step S19 of Figure 5 after the target was set. In the first reading process 210, the image to be processed was captured under the imaging conditions adjusted before the target was set, and this is a retry case after the reading failed in the first reading process 210.

[0173] In this case, the imaging adjustment process 212 during the initial reading process 210 adjusts the imaging conditions by determining the luminance index value and target luminance index value in steps S102 to S106. Since the target luminance index value of level 0 is used initially, the image shown in Figure 16A, which is the target of processing in the second reading process 210, is an image captured under imaging conditions adjusted using the target luminance index value of level 0.

[0174] In the example in Figure 16A, an attempt is made to read a 2D code, and the figure only shows the image around the code symbol. As can be seen from the figure, the code symbol being read is printed somewhat blurred, and in the state of Figure 16A, the image is quite dark, making it difficult to discern the distribution of black and white elements within the code symbol. Figure 16B shows an example of an image processed in the third reading process 210, following Figure 16A. This image was captured under imaging conditions adjusted using a target brightness index value of level 1 during the imaging adjustment process 212 in the second reading process 210. As can be seen from the figure, the image is brighter overall than Figure 16A, the background is almost white, and the white elements of the code symbols have greater contrast with the black elements, but the white elements are still somewhat crushed, making successful reading difficult.

[0175] Figure 16C shows an example of an image processed in the fourth reading process 210, following Figure 16B. This image was captured under imaging conditions adjusted using a target brightness index value of level 2 during the imaging adjustment process 212 in the third reading process 210. Figure 16D is an enlarged view of the image in Figure 16C. As can be seen from the figures, the image in Figure 16C is brighter overall than that in Figure 16B, and as can be seen from Figure 16D, the outlines of the white elements are relatively clear. In this state, successful reading can be expected, and in the experiment in which this image was actually captured, the reading was successful in this fourth reading process 210.

[0176] Figures 17A to 17D show images corresponding to Figures 16A to 16D when attempting to read a 2D code printed on a dark-colored carrier. In this case, in the image of Figure 17A, which was captured after adjustment using a target brightness index value of level 0, it is almost impossible to distinguish between the black element of the code symbol and the background color. However, as the level of the target brightness index value is increased, the contrast increases, and as shown in Figures 17C and 17D, in the images captured under imaging conditions adjusted using a target brightness index value of level 2, it is possible to distinguish between the black element and the white element at a level where decoding is sufficiently possible. In the experiment in which this image was actually captured, the reading was successful on the fourth reading process 210, which processed the images shown in Figures 17C and 17D.

[0177] As described above, by performing the imaging adjustment process 212 explained using Figures 13A to 15, the imaging conditions can be adjusted so that optical information that is difficult to read due to printing distortion or contrast problems can be read to some extent. This type of adjustment is possible because it detects when the optical information has been targeted, and then, based on the characteristics of the image near the optical information to be read, adjusts the imaging conditions to obtain a brighter image. This allows for setting imaging conditions that significantly increase brightness compared to adjusting imaging conditions based on the characteristics of a wide area of ​​the image.

[0178] When setting these conditions, if the amplification factor of the image sensor 111 is set to a low value to avoid noise, the exposure time (or illumination time) becomes too long, which can cause reading failures due to blur. However, since the upper limit of the exposure time is set separately based on the amount of movement of the image sensor 111, reading failures due to blur can also be prevented.

[0179] Next, Figures 18A and 18B show the execution timing of the reading process in a comparative example of this invention, in a format corresponding to Figures 4A and 4B. In the description of the comparative example, parts that are common to or correspond to the reading device 100 of the above-described embodiment will be described using the same reference numerals as the reading device 100.

[0180] The comparative example described here differs from the embodiment described above only in that it does not perform the target determination process 220, and therefore does not restart the reading process 210 triggered by the determination of the target. Even in this case, if the reading process 210 is executed on images captured in frames after the timing indicated by arrow A, when the reading device 100 described using Figures 4A and 4B is (almost) stationary, it can be expected that the reading will be successful to the same extent as in the cases of Figures 4A and 4B.

[0181] For example, as shown in Figure 18A, if a read operation 210c ends with a read failure immediately after capturing frame 201e, which is immediately following the timing of arrow A, then a read operation 210d targeting the image captured in frame 201e can be started immediately. In this read operation 210d, a read success rate similar to that of read operation 210b in Figure 4A can be expected. In this case, the time required from the timing of arrow A to obtaining the read result can also be expected to be similar to that in Figure 4A.

[0182] On the other hand, as shown in Figure 18B, if a reading process 210c ends with a reading failure immediately after capturing frame 201d, which includes the timing of arrow A, then a reading process 210d targeting the image captured in frame 201d will start at that timing. In this case, even if the capture of frame 201b immediately following the timing of arrow A is completed, the next reading process 210e cannot start until reading process 210d is finished. Furthermore, even if frame 201d is targeted for processing, the reading device 100 is not yet stationary, so a successful reading cannot be expected. Ultimately, after the completion of reading process 210d, reading process 210e is started, targeting the image captured in the most recent frame 201f. It is then expected that reading will be as successful in reading process 210e as in reading process 210b shown in Figure 4A.

[0183] In this case, it is considered that the time required from the timing of arrow A until the reading result is obtained is approximately longer by the time required for the reading process 210d than in the case of FIG. 4A. This time is assumed to be longer than a predetermined time range T, which is the difference in required time between the case of FIG. 4B and the case of FIG. 4A, in a case where the processing load of the reading process 210d is relatively large and a certain amount of time is required for one reading process 210d.

[0184] Here, regarding three cases of this comparative example, the above-described embodiment, and the case where the reading process 210b is always newly started at the timing of arrow B in FIGS. 4A and 4B determined to have a fixed target, the average required time from the timing of arrow A until the reading result is obtained is estimated.

[0185] At this time, the following (a) to (d) are assumed. (a) At the timing of arrow A, it is random how far the ongoing reading process 210 has progressed. (b) Reading is successful if the reading process 210 is executed for an image captured in a frame after the timing of arrow A, and reading fails if the reading process 210 is executed for an image captured in a frame before that. (c) Let the required time for the reading process 210 in case of reading failure be f, and the required time for the reading process 210 in case of reading success be s. Generally, in case of reading failure, the entire range of the image is searched and decoding etc. are attempted and then it is determined as failure, so it takes more time than in case of reading success, and s < f. (d) Let the length of the predetermined time range T (substantially the same as the time from the timing of arrow A until it can be determined that the target is determined in the target determination process 220) be a.

[0186] First, in the comparative example, the shortest required time is s in the case of Figure 18A (only the time of the successful read process 210d). More precisely, a frame period is added to this, but we will ignore it here for the sake of simplicity. The same applies to the case of Figure 4B. In the case of Figure 18B, the longest required time is f+s (the sum of the unsuccessful read process 210d and the successful read process 210e). In that case, the average required time T1 is (f+2s) / 2.

[0187] Next, in the first modified example, the required time is always the same as in Figure 4B. This required time is the average required time, and the average required time T2 is a + s (the sum of the predetermined time range T and the read process 210b for successful reading). Here, since T2-T1=f / 2-a, if the target determination process 220 can determine that the target has been set in less than half the time of f, then even if the reading process 210b is always started anew at the timing of arrow B, it is considered that the time required for reading can be shortened compared to the case of the comparative example.

[0188] Next, in the embodiment described above, a restart does not occur with probability a / f as shown in Figure 4A, and a restart occurs with probability 1-a / f as shown in Figure 4B. In cases where no restart occurs, the shortest time is s in the case shown in Figure 4A, and the longest time is a+s in the case where the reading process 210b starts just before the timing of arrow B (almost the same as the case in Figure 4B). In that case, the average time required in cases where no restart occurs is a / 2+s. The average time required in cases where a restart occurs is a+s, the same as in the first modified example.

[0189] In that case, the average required time T3 in the above-described embodiment is T3 = (a / f)(a / 2+s) + (1-a / f)(a+s) =a+sa 2 / 2f That is the case.

[0190] Here, T3 - T1 = (fa) 2Since it is 1 / 2f, according to the above-described embodiment, if it can be determined that the target has been determined by the target determination process 220 in a time shorter than f, it is considered that the required time for reading can be shortened compared to the case of the comparative example. This condition is looser than in the case of the first modification. Also, it can be seen that the greater the value of f, that is, the longer the reading process 210 takes, and further, the shorter the time (with a smaller number of frames) it takes to determine that the target has been determined, the greater the effect of shortening the required time.

[0191] Also, if a were to exceed f, the reading process 210 would have ended once by the time it is determined that the target has been determined from the timing of arrow A, and at the timing of arrow B, it is considered that the reading process 210 for processing the image captured after the timing of arrow A is in progress. Then, restarting the reading process 210 is unnecessary, and it will operate substantially the same as the comparative example.

[0192] Therefore, for example, even when the reading process 210 is a light process and f < a, no inconvenience occurs compared to the case of performing the process of the comparative example, except for the additional light load on the target determination process 220. When it is known that the reading process 210 is a light process due to the selection of the reading mode or the like and it is expected that f < a, the target determination process 220 may not be performed.

[0193] 〔Modification〕 The description of the embodiment ends here. However, in this invention, the specific configuration of the device, the specific procedure of the process, the values of various parameters, the type of optical information to be read, the required time for each process, etc. are not limited to those described in the embodiment. Of the functions of the reading device 100 in the above-described embodiment, the function of restarting the reading process 210 according to the result of the target determination process 220, the function of changing the width of the dimming range or changing the method of determining the brightness index value and target brightness index value based on whether or not the target is set, the function of raising the target level of image brightness adjustment when reading fails when the target is set, and the function of setting the upper limit of the exposure time and illumination time according to the amount of movement of the image sensor 111 can each be performed individually or in any combination. Furthermore, the target analysis process 211 and the filter process 213 in the reading process 210 are not mandatory.

[0194] Furthermore, in the embodiments described above, an example was explained in which the image captured in the most recent frame is used as the processing target when restarting the reading process 210. However, this is not mandatory, and the image captured in any frame within the predetermined time range T, after arrow A in Figure 4B, may be used as the processing target. It is also possible to use an image captured in a frame after the predetermined time range T, although this is not preferred because it delays the start of the reading process 210.

[0195] Furthermore, in the embodiment described above, once it was determined that the target had been set, the target determination process 220 was not performed thereafter. However, it is possible that after the target has been set, the operator may move the reading device 100 significantly, causing the target to be missed, and then the target may be set again. Taking this into consideration, the target determination process 220 may be continued even after the target has been set.

[0196] Figure 19 shows a flowchart of the process corresponding to Figure 5 when this is done. The difference between the process in Figure 19 and the process in Figure 5 is as follows. First, instead of step S15, the process in step SA is performed to determine whether the state has changed from an undefined target to a defined target. This is because the restart-related processing in steps S17 to S19 is performed at the timing of this change. Note that when step S19 is executed for the second time or later, the number of retries counted in step S88 of the reading routine may be carried over from the value counted in the past. Another difference from Figure 5 is that after answering Yes in step S18 or completing step S19, the program proceeds to step S16 instead of step S20.

[0197] In the above transformations, it is possible that the target may change from being fixed to not being fixed after it has been set. In this case, in the imaging adjustment process shown in Figure 15, the target brightness index value D is set in step S104. T Step S108 may also be executed after the level rises to 1 or higher. Target luminance index value D T At this point, it is best to return to level 0 and then start again from level 0 when performing step S104.

[0198] Another possible variation is to restart the reading routine (reading process 210) if the target has not been determined after a predetermined time range T has elapsed since the start of the reading routine. Figure 20 shows a flowchart of the process corresponding to Figure 5 when this is done. The difference between the process in Figure 20 and the process in Figure 5 is as follows.

[0199] First, if the target has not been determined and the process proceeds from step S15 to S16, and it is determined that the read routine is still running, step SB determines whether a predetermined time range T has elapsed since the start of the most recent read routine. This time may be slightly shorter than T. If the time has elapsed, step SC restarts the read routine, and then the process returns to step S13 to repeat. If the time has not elapsed in step SB, the process returns directly to step S13 to repeat.

[0200] When executing the process of FIG. 20, at the point when the target is determined, since the reading process 210 must be within the time corresponding to the predetermined time range T from the start, at this point, the image data of the frames within the period (predetermined time range T) aggregated by the most recent target determination process 220 must be the processing target (the determination criteria of step SB are determined so that this holds considering the frame length as well). Therefore, it is considered that there is no case where restarting the reading routine in step S19 is necessary, so steps S17 to S19 are not necessary to execute. However, it may be executed just in case. In the above process, the processes of step SB and step SC correspond to the first reading control procedure, and step S15 corresponds to the second reading control procedure, respectively corresponding to the functions of the first reading control unit and the second reading control unit.

[0201] In the above variation, it is not necessary to restart the reading process 210 at the point when the target is determined. When the target is determined, with a probability of 1, the operation as shown in FIG. 4A will be performed. Therefore, when estimating the average T4 of the required time from the timing of arrow A to obtaining the reading result in this variation in the same way as in the cases of T1 to T3 described above, T4 = a / 2 + s That is. Then, since T3 - T4 = a(f - a) / 2f, if it can be determined that the target is determined by the target determination process 220 within the time less than f (if f > a), it is considered that the required time for reading can be further shortened compared to the case of the above-described embodiment.

[0202] However, in this variation, before the target is determined, the reading process 210 is restarted without waiting for its end. For this reason, except for special cases where reading is successful within the predetermined time range T, reading will not be successful before the target is determined. Since it is not very likely that reading is successful before the target is determined in many cases, there are also many cases where this point does not cause a major inconvenience. However, when adopting this variation, attention needs to be paid to this point.

[0203] Furthermore, the decision criterion in step SB may be the image acquisition timing of the image being processed in the currently executing read routine. That is, if a time corresponding to a predetermined time range T has elapsed since this acquisition timing, the read routine may be restarted in step SC. Even in this case, once the target is determined, the image data of frames within the period aggregated in the most recent target determination process 220 will always be the target of processing in the read process 210.

[0204] When using the timing of image acquisition as the criterion, the image data processed by the restarted read routine does not need to be from the latest frame. Using image data acquired before the latest frame shortens the time from the start of the read routine until step SB becomes Yes and the read routine restarts. However, using image data acquired within a predetermined time range T from the restart point will have the same effect on reducing the reading time as using the latest frame.

[0205] Another variation is the luminance index value D. c It is also conceivable that the pixel classification for obtaining the result could be performed using a method different from that of the embodiment described above. For example, assuming that the distribution of pixel values ​​for pixels capturing the black parts of code symbols or characters and pixels capturing the white (or background) parts both follow a normal distribution, classification may be performed by using statistical methods to find the threshold that minimizes the average misclassification rate (the probability that a pixel capturing the black part is classified into the bright pixel class, or vice versa) when all pixels are classified into black pixel class and white pixel class by a single threshold. Specifically, this classification can be performed by finding the threshold n that minimizes the value of J in the following equation 6.

[0206]

number

[0207] Based on the threshold n obtained using this method, the luminance index value D is obtained in the same manner as in the embodiment described above. c Even when seeking this, the same effect as in the above-described embodiment can be obtained regarding the adjustment of imaging conditions. For various threshold candidates, the variance of the pixel values ​​of pixels classified into each class according to the threshold is determined, and the class classification is performed based on the determined variance, thereby determining the luminance index value D c A meaningful threshold n can be obtained to find the value.

[0208] As in the embodiment described above, it is useful to classify the pixels in each class in such a way that the degree of variance of pixel values ​​is minimized, and it is also useful to classify them in such a way that the average misclassification rate is minimized, as in this modified example. Other criteria can also be used. The specific algorithm is not important as long as pixels capturing black areas are classified into the class of the darkest pixels, and pixels capturing white areas or the background are classified into the class of the brightest pixels. The accuracy of the classification does not need to be strict. To perform such a classification, it is useful to classify based on the variance of pixels classified into each class.

[0209] As yet another variation, it is not prohibited to distribute the functions of the reading device 100 in each of the embodiments described above across multiple devices, and to configure the data processing device to which the functions shown in Figure 2, for example, are connected. Furthermore, the reading device 100 may be a handheld device used by an operator, or a stationary device that primarily moves the object to be read 101 to align it with the imaging range of the imaging sensor 111. The above-described embodiment is applicable whether either the reading device 100 or the object to be read 101 is moved, or both are moved, when aiming. The movement of the imaging sensor 111 can be considered as a relative movement with respect to the object to be read 101 and the optical information carried thereon.

[0210] Furthermore, in determining whether the target has been set in the target determination process 220, it is not essential to consider the movement range or movement trajectory of the imaging sensor 111. It is also possible to omit step S43 in Figure 10 and make the determination mainly based on the magnitude of the movement in step S42. Even when making the determination based on this criterion, the effect of reducing the required time by performing the processes in steps S17 to S19 in Figure 5 can be obtained. However, performing step S43 as well allows for a more accurate determination of whether the target has been set.

[0211] Furthermore, although the above-described embodiment explained an example in which the target of reading by the reading device 100 is a code symbol or character, the present invention is also applicable to face recognition, which identifies faces. In this case, an image of a person's face is captured, and instead of decoding, the image is compared with a face pattern. Even in this case, the functions of restarting the reading process 210 according to the result of the target determination process 220, changing the width of the dimming range or changing the method of determining the brightness index value or target brightness index value based on whether the target is set or not, raising the target level of brightness adjustment for the image when reading fails while the target is set, and setting the upper limit of the exposure time or illumination time according to the amount of movement of the imaging sensor 111 are effective in roughly the same way as in the above-described embodiment.

[0212] Furthermore, an embodiment of the program of this invention is a program that causes one computer, or multiple computers working together, to control the required hardware, to realize the functions of the reading device 100 in the above-described embodiment, or to execute the processing described in the above-described embodiment.

[0213] Such programs may be stored from the outset in the computer's built-in ROM or other non-volatile storage media (flash memory, EEPROM, etc.). They can also be provided by recording them on any non-volatile storage medium such as memory cards, CDs, DVDs, or Blu-ray discs. Furthermore, they can be downloaded from an external device connected to a network, installed on a computer, and executed.

[0214] Furthermore, it goes without saying that the embodiments and modified configurations described above can be combined in any way as long as they do not contradict each other, and that only parts of them can be used for implementation. [Explanation of Symbols]

[0215] 20a, 20b…Image, 21…Code symbol, 22a, 22b…Reference point, 23, 24…Template image, 25…Search range, 41…Movement end position, 42a~42n…Movement vector, 43…Movement start position, 44…Convergence range, 50a, 50b…Image, 51, 52…Dimming range, 53…AIM light, 60…Graph of relative frequency distribution, 100…Reading device, 101…Target to read, 102a…Code symbol, 102b…String, 110…Optical unit, 111…Imaging sensor, 112…Lens, 113…LD 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 Process, 211...Target Analysis Process, 212...Imaging Adjustment Process, 213...Filtering Process, 214...Object Extraction / Decoding Process, 220...Target Determination Process

Claims

1. The imaging procedure involves periodically capturing images using the imaging unit, A reading procedure which involves analyzing the image captured in the aforementioned imaging procedure and reading the optical information contained within the image, An estimation procedure for estimating the amount of movement of the imaging unit during a certain time range based on images captured by the imaging procedure during that time range, An optical information reading method comprising: a reading control procedure which determines whether the amount of movement estimated in the estimation procedure is less than or equal to a predetermined first standard; if it is determined to be less than or equal to the first standard, if the image being analyzed in the reading procedure is an image taken within a certain time range, the reading procedure is continued to decode the optical information; if the image being analyzed in the reading procedure is an image taken before the certain time range, a reading control procedure which is newly executed to analyze an image taken in the imaging procedure within or after the certain time range and read the optical information contained in the image.

2. An optical information reading method according to claim 1, The estimation of the amount of movement of the imaging unit in the estimation procedure includes estimating the range of movement of the imaging unit in a given time range based on three or more images captured in the imaging procedure within that time range. The optical information reading method is characterized in that the first criterion is that the movement range estimated in the estimation procedure falls within a predetermined convergence range.

3. An optical information reading method according to claim 1, The estimation of the amount of movement of the imaging unit in the estimation procedure includes estimating the average amount of movement of the imaging unit per frame in a certain time range, based on three or more images captured in the imaging procedure within a certain time range. The optical information reading method is characterized in that the first criterion is that the average displacement amount estimated in the estimation procedure is less than or equal to a predetermined threshold.

4. An optical information reading method according to claim 2, The estimation of the amount of movement of the imaging unit in the estimation procedure further includes estimating the average amount of movement of the imaging unit per frame in a certain time range, based on three or more images captured in the imaging procedure within a certain time range. The first criterion is that the movement range estimated in the estimation procedure falls within a predetermined convergence range, and the average movement amount estimated in the estimation procedure is less than or equal to a predetermined threshold, characterized in that the optical information reading method.

5. An optical information reading method according to claim 1, An irradiation procedure for irradiating the imaging unit with reference AIM light to direct the imaging unit towards the optical information to be read, A procedure for detecting the position of the AIM light in the image captured in the above imaging procedure, The system includes an imaging adjustment procedure for adjusting the imaging conditions of the imaging unit based on the pixel values ​​of pixels in the image captured in the imaging procedure described above. The optical information reading method is characterized in that, if the amount of movement estimated in the estimation procedure is determined to be less than or equal to the first criterion, 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 detected AIM light in the image captured in the imaging procedure.

6. An optical information reading method according to claim 1, An irradiation procedure for irradiating the imaging unit with reference AIM light to direct the imaging unit towards the optical information to be read, A procedure for detecting the position of the AIM light in the image captured in the above imaging procedure, The system includes an imaging adjustment procedure for adjusting the imaging conditions of the imaging unit based on the pixel values ​​of pixels around the position of the AIM light in the image captured in the imaging procedure, The optical information reading method is characterized in that the imaging adjustment procedure is a procedure to adjust the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range around the position of the AIM light, compared to the case where the amount of movement estimated in the estimation procedure is determined to be less than or equal to the first standard, when it is determined that the amount of movement estimated in the estimation procedure is not less than or equal to the first standard.

7. An optical information reading method according to claim 1, The system includes an imaging adjustment procedure for adjusting the imaging conditions of the imaging unit based on the pixel value of a pixel at a predetermined reference position in the image captured in the imaging procedure described above. The optical information reading method is characterized in that the imaging adjustment procedure is a procedure to adjust the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range of the image compared to the case where the amount of movement estimated in the estimation procedure is determined to be less than or equal to the first standard, when it is determined that the amount of movement estimated in the estimation procedure is not less than or equal to the first standard.

8. An optical information reading method according to claim 1, The system includes an imaging adjustment procedure for adjusting the imaging conditions of the imaging unit, which includes at least one of the following items: exposure time and illumination time. The estimation of the amount of movement of the imaging unit in the estimation procedure includes estimating the amount of movement of the imaging unit per frame based on images captured in the imaging procedure over all or part of a certain time range. An optical information reading method characterized in that the upper limit of the value of at least one of the items set in the imaging adjustment procedure is determined based on the estimated amount of movement of the imaging unit per frame.

9. An optical information reading method according to claim 8, The procedure includes obtaining an acceptable amount of image blur when reading the aforementioned optical information, An optical information reading method characterized in that the upper limit of the value of at least one of the items set in the imaging adjustment procedure is determined based on the estimated amount of movement of the imaging unit per frame and the acquired amount of blur.

10. An optical information reading method according to claim 5, The imaging conditions to be adjusted in the imaging adjustment procedure include at least one of the following items: exposure time and illumination time. The estimation of the amount of movement of the imaging unit in the estimation procedure includes estimating the amount of movement of the imaging unit per frame based on images captured in the imaging procedure over all or part of a certain time range. An optical information reading method characterized in that the upper limit of the value of at least one of the items set in the imaging adjustment procedure is determined based on the estimated amount of movement of the imaging unit per frame.

11. An optical information reading method according to claim 7, The imaging conditions to be adjusted in the imaging adjustment procedure include at least one of the following items: exposure time and illumination time. The estimation of the amount of movement of the imaging unit in the estimation procedure includes estimating the amount of movement of the imaging unit per frame based on images captured in the imaging procedure over all or part of a certain time range. An optical information reading method characterized in that the upper limit of the value of at least one of the items set in the imaging adjustment procedure is determined based on the estimated amount of movement of the imaging unit per frame.

12. The imaging procedure involves periodically capturing images using the imaging unit, An estimation procedure for estimating the movement range of the imaging unit in a given time range based on three or more images captured by the imaging procedure within a given time range, An optical information reading method characterized by comprising: a reading procedure, which, when it is determined that the movement range estimated in the estimation procedure falls within a predetermined convergence range, analyzes an image captured in the imaging procedure within or after the time range and reads the optical information contained in the image.

13. Imaging unit, An imaging control unit that periodically causes the imaging unit to capture images, A reading unit analyzes the image captured by the imaging unit and reads the optical information contained in the image, An estimation unit that estimates the amount of movement of the imaging unit during a certain time range based on images captured by the imaging unit during that time range, An optical information reading device comprising: a reading control unit that determines whether the amount of movement estimated by the estimation unit is less than or equal to a predetermined first standard, and if it is determined to be less than or equal to the first standard, if the image being analyzed by the reading unit is an image taken within a certain time range, the reading control unit continues the analysis to decode the optical information, and if the image being analyzed by the reading unit is an image taken before the certain time range, the reading control unit newly performs an operation to analyze an image taken by the imaging unit within or after the certain time range and read the optical information contained in the image.

14. An optical information reading device according to claim 13, The estimation of the amount of movement of the imaging unit in the estimation unit includes estimating the range of movement of the imaging unit in a certain time range based on three or more images captured by the imaging unit in a certain time range. The optical information reading device is characterized in that the first criterion is that the movement range estimated by the estimation unit falls within a predetermined convergence range.

15. An optical information reading device according to claim 13, The estimation of the amount of movement of the imaging unit in the estimation unit includes estimating the average amount of movement of the imaging unit per frame in a certain time range, based on three or more images captured by the imaging unit in a certain time range. The optical information reading device is characterized in that the first criterion is that the average amount of movement estimated by the estimation unit is less than or equal to a predetermined threshold.

16. An optical information reading device according to claim 14, The estimation of the amount of movement of the imaging unit in the estimation unit further includes estimating the average amount of movement of the imaging unit per frame in a certain time range, based on three or more images captured by the imaging unit in a certain time range. The optical information reading device is characterized in that the first criterion is that the movement range estimated by the estimation unit falls within a predetermined convergence range, and the average movement amount estimated by the estimation unit is less than or equal to a predetermined threshold.

17. An optical information reading device according to claim 13, An illumination unit that emits reference AIM light to direct the imaging unit towards the optical information to be read, The imaging unit detects the position of the EMA light in the image captured by the imaging unit, The system includes an imaging adjustment unit that adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels in the image captured by the imaging unit, The optical information reading device is characterized in that, when the imaging adjustment unit determines that the amount of movement estimated by the estimation unit is less than or equal to the first standard, 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 detected AIM light in the image captured by the imaging unit.

18. An optical information reading device according to claim 13, An illumination unit that emits reference AIM light to direct the imaging unit towards the optical information to be read, The imaging unit detects the position of the EMA light in the image captured by the imaging unit, The system includes an imaging adjustment unit that adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels around the position of the AIM light in the image captured by the imaging unit, The optical information reading device is characterized in that, when the imaging adjustment unit determines that the amount of movement estimated by the estimation unit is less than or equal to the first standard, it adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range around the position of the AIM light compared to when the estimation unit determines that the amount of movement estimated by the estimation unit is not less than or equal to the first standard.

19. An optical information reading device according to claim 13, The imaging adjustment unit adjusts the imaging conditions of the imaging unit based on the pixel value of a pixel at a predetermined reference position in the image captured by the imaging unit. The optical information reading device is characterized in that, when the imaging adjustment unit determines that the amount of movement estimated by the estimation unit is less than or equal to a first standard, it adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range of the image compared to when the estimation unit determines that the amount of movement estimated by the estimation unit is not less than or equal to the first standard.

20. An optical information reading device according to claim 13, The system includes an imaging adjustment unit that adjusts the imaging conditions of the imaging unit, including at least one of the items of exposure time and illumination time. The estimation of the amount of movement of the imaging unit in the estimation unit includes estimating the amount of movement of the imaging unit per frame based on images captured by the imaging unit in all or part of a certain time range. An optical information reading device characterized in that the upper limit of the value of at least one of the items set by the imaging adjustment unit is determined based on the estimated amount of movement of the imaging unit per frame.

21. An optical information reading device according to claim 20, When reading the aforementioned optical information, an acceptable amount of image blur is obtained. An optical information reading device characterized in that the upper limit of the value of at least one of the items set by the imaging adjustment unit is determined based on the estimated amount of movement of the imaging unit per frame and the acquired amount of blur.

22. An optical information reading device according to claim 17, The imaging conditions adjusted by the imaging adjustment unit include at least one of the following items: exposure time and illumination time. The estimation of the amount of movement of the imaging unit in the estimation unit includes estimating the amount of movement of the imaging unit per frame based on images captured by the imaging unit in all or part of a certain time range. An optical information reading device characterized in that the upper limit of the value of at least one of the items set by the imaging adjustment unit is determined based on the estimated amount of movement of the imaging unit per frame.

23. An optical information reading device according to claim 19, The imaging conditions adjusted by the imaging adjustment unit include at least one of the following items: exposure time and illumination time. The estimation of the amount of movement of the imaging unit in the estimation unit includes estimating the amount of movement of the imaging unit per frame based on images captured by the imaging unit in all or part of a certain time range. An optical information reading device characterized in that the upper limit of the value of at least one of the items set by the imaging adjustment unit is determined based on the estimated amount of movement of the imaging unit per frame.

24. Imaging unit, An imaging control unit that periodically causes the imaging unit to capture images, An estimation unit estimates the movement range of the imaging unit during a certain time period based on three or more images captured by the imaging unit during that time period. An optical information reading device characterized by comprising: a reading unit that, when the estimation unit determines that the estimated range of movement falls within a predetermined convergence range, analyzes an image captured by the imaging unit within or after the time range and reads the optical information contained in the image.

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

26. The imaging procedure involves periodically capturing images using the imaging unit, A reading procedure which involves analyzing the image captured in the aforementioned imaging procedure and reading the optical information contained within the image, An estimation procedure for estimating the amount of movement of the imaging unit during a certain time range based on images captured by the imaging procedure during that time range, An irradiation procedure for irradiating the imaging unit with reference AIM light to direct the imaging unit towards the optical information to be read, A procedure for detecting the position of AIM light in the image captured by the above imaging procedure, The system includes an imaging adjustment procedure for adjusting the imaging conditions of the imaging unit based on the pixel values ​​of pixels in the image captured in the imaging procedure described above. The optical information reading method is characterized in that, if the amount of movement estimated in the estimation procedure is determined to be less than or equal to a predetermined first standard, 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 detected AIM light in the image captured in the imaging procedure.

27. The imaging procedure involves periodically capturing images using the imaging unit, A reading procedure which involves analyzing the image captured in the aforementioned imaging procedure and reading the optical information contained within the image, An estimation procedure for estimating the amount of movement of the imaging unit during a certain time range based on images captured by the imaging procedure during that time range, An irradiation procedure for irradiating the imaging unit with reference AIM light to direct the imaging unit towards the optical information to be read, A procedure for detecting the position of the AIM light in the image captured in the above imaging procedure, The system includes an imaging adjustment procedure for adjusting the imaging conditions of the imaging unit based on the pixel values ​​of pixels around the position of the AIM light in the image captured in the imaging procedure, The optical information reading method is characterized in that the imaging adjustment procedure is a procedure to adjust the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range around the position of the AIM light, compared to the case where the amount of movement estimated in the estimation procedure is determined to be less than or equal to a predetermined first standard, when it is determined that the amount of movement estimated in the estimation procedure is not less than or equal to the first standard.

28. The imaging procedure involves periodically capturing images using the imaging unit, A reading procedure which involves analyzing the image captured in the aforementioned imaging procedure and reading the optical information contained within the image, An estimation procedure for estimating the amount of movement of the imaging unit during a certain time range based on images captured by the imaging procedure during that time range, The system includes an imaging adjustment procedure for adjusting the imaging conditions of the imaging unit based on the pixel value of a pixel at a predetermined reference position in the image captured in the imaging procedure described above. The optical information reading method is characterized in that the imaging adjustment procedure is a procedure to adjust the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range of the image, compared to the case where the amount of movement estimated in the estimation procedure is determined to be less than or equal to a predetermined first standard, when it is determined that the amount of movement estimated in the estimation procedure is not less than or equal to the first standard.

29. Imaging unit, An imaging control unit that periodically causes the imaging unit to capture images, A reading unit analyzes the image captured by the imaging unit and reads the optical information contained in the image, An estimation unit that estimates the amount of movement of the imaging unit during a certain time range based on images captured by the imaging unit during that time range, An illumination unit that emits reference AIM light to direct the imaging unit towards the optical information to be read, The imaging unit detects the position of the EMA light in the image captured by the imaging unit, The system includes an imaging adjustment unit that adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels in the image captured by the imaging unit, The optical information reading device is characterized in that, when the imaging adjustment unit determines that the amount of movement estimated by the estimation unit is less than or equal to a predetermined first standard, 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 detected AIM light in the image captured by the imaging unit.

30. Imaging unit, An imaging control unit that periodically causes the imaging unit to capture images, A reading unit analyzes the image captured by the imaging unit and reads the optical information contained in the image, An estimation unit that estimates the amount of movement of the imaging unit during a certain time range based on images captured by the imaging unit during that time range, An illumination unit that emits reference AIM light to direct the imaging unit towards the optical information to be read, The imaging unit detects the position of the EMA light in the image captured by the imaging unit, The system includes an imaging adjustment unit that adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels around the position of the AIM light in the image captured by the imaging unit, The optical information reading device is characterized in that, when the imaging adjustment unit determines that the amount of movement estimated by the estimation unit is less than or equal to a predetermined first standard, it adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range around the position of the AIM light compared to when the estimation unit determines that the amount of movement estimated by the estimation unit is not less than or equal to the first standard.

31. Imaging unit, An imaging control unit that periodically causes the imaging unit to capture images, A reading unit analyzes the image captured by the imaging unit and reads the optical information contained in the image, An estimation unit that estimates the amount of movement of the imaging unit during a certain time range based on images captured by the imaging unit during that time range, The imaging adjustment unit adjusts the imaging conditions of the imaging unit based on the pixel value of a pixel at a predetermined reference position in the image captured by the imaging unit. The optical information reading device is characterized in that, when the imaging adjustment unit determines that the amount of movement estimated by the estimation unit is less than or equal to a predetermined first standard, it adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range of the image compared to when the estimation unit determines that the amount of movement estimated by the estimation unit is not less than or equal to the first standard.

32. A program for causing a processor controlling the imaging unit to execute the optical information reading method described in any one of claims 26 to 28.

33. The imaging procedure involves periodically capturing images using the imaging unit, A reading procedure which involves analyzing the image captured in the aforementioned imaging procedure and reading the optical information contained within the image, An estimation procedure for estimating the amount of movement of the imaging unit during a certain time range based on images captured by the imaging procedure during that time range, An imaging adjustment procedure that adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels in the image captured in the imaging procedure, so that the brightness of the image obtained in subsequent imaging reaches a predetermined target level. An optical information reading method characterized by comprising a target adjustment procedure for changing the target level in the imaging adjustment procedure to a higher level if the reading of optical information in the reading procedure fails while the amount of movement estimated in the estimation procedure is less than or equal to a predetermined first standard.

34. An optical information reading method according to claim 33, The optical information reading method is characterized in that the imaging adjustment procedure is a procedure to calculate an index value of the brightness of an image based on the pixel values ​​of pixels in the image captured in the imaging procedure, and to adjust the imaging conditions of the imaging unit so that the index value of the brightness of the image obtained in subsequent imaging becomes the target level.

35. An optical information reading method according to claim 34, The optical information reading method is characterized in that the imaging adjustment procedure is a procedure for adjusting at least one of the imaging conditions, namely the exposure time and the illumination time.

36. An optical information reading method according to claim 34, An optical information reading method characterized in that, if the amount of movement estimated in the estimation procedure is less than or equal to the first criterion, the brightness index value is determined based on thresholds when pixels sampled from the image captured in the imaging procedure are classified into a first class of dark pixels and a second class of bright pixels based on the variance of pixel values ​​of pixels within each class.

37. An optical information reading method according to claim 36, An optical information reading method characterized by performing the classification such that the degree of dispersion of pixel values ​​within each class is minimized.

38. An optical information reading method according to claim 34, An optical information reading method characterized in that, if the amount of movement estimated in the estimation procedure is less than or equal to the first standard, the brightness index value is calculated by the first procedure, and if the amount of movement estimated in the estimation procedure exceeds the first standard, the brightness index value is calculated by a second procedure different from the first procedure.

39. An optical information reading method according to claim 38, An optical information reading method characterized in that the brightness index value obtained in the first step for an image from which optical information can be read using the aforementioned reading procedure is smaller than the brightness index value obtained in the second step for the same image.

40. An optical information reading method according to claim 33, The optical information reading method is characterized in that the target adjustment procedure includes a step of setting the target level to a predetermined initial value when it is determined that the amount of movement estimated in the estimation procedure is not less than or equal to a predetermined first standard.

41. An optical information reading method according to claim 33, The optical information reading method is characterized in that the target adjustment procedure is a procedure to return the target level to a predetermined initial value when the reading of optical information in the reading procedure fails while the target level is at a predetermined upper limit.

42. An optical information reading method according to claim 33, An irradiation procedure for irradiating the imaging unit with reference AIM light to direct the imaging unit towards the optical information to be read, The system includes an AIM light detection procedure for detecting the position of the AIM light in the image captured in the above imaging procedure, The optical information reading method is characterized in that the imaging adjustment procedure determines whether the amount of movement estimated in the estimation procedure is less than or equal to a predetermined first standard, and if it is determined to be less than or equal to the first standard, adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels within a predetermined range near the position of the detected AIM light in the image captured in the imaging procedure.

43. An optical information reading method according to claim 33, An irradiation procedure for irradiating the imaging unit with reference AIM light to direct the imaging unit towards the optical information to be read, The system includes an AIM light detection procedure for detecting the position of the AIM light in the image captured in the above imaging procedure, The imaging adjustment procedure is a procedure for adjusting the imaging conditions of the imaging unit based on the pixel values ​​of pixels around the position of the AIM light in the image captured in the imaging procedure, and is characterized in that, when it is determined that the amount of movement estimated in the estimation procedure is less than or equal to the first standard, the imaging conditions of the imaging unit are adjusted based on the pixel values ​​of pixels in a narrower range around the position of the AIM light compared to when it is determined that the amount of movement estimated in the estimation procedure is not less than or equal to the first standard.

44. An optical information reading method according to claim 33, The optical information reading method is characterized in that the imaging adjustment procedure is a procedure for adjusting the imaging conditions of the imaging unit based on the pixel value of a pixel at a predetermined reference position in the image captured in the imaging procedure, and when it is determined that the amount of movement estimated in the estimation procedure is less than or equal to the first standard, the procedure adjusts the imaging conditions of the imaging unit based on the pixel value of a narrower range of pixels in the image compared to when it is determined that the amount of movement estimated in the estimation procedure is not less than or equal to the first standard.

45. Imaging unit, An imaging control unit that periodically causes the imaging unit to capture images, A reading unit analyzes the image captured by the imaging unit and reads the optical information contained in the image, An estimation unit that estimates the amount of movement of the imaging unit during a certain time range based on images captured by the imaging unit during that time range, An imaging adjustment unit adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels in the image captured by the imaging unit, so that the brightness of the image obtained in subsequent imaging reaches a predetermined target level. An optical information reading device characterized by comprising: a target adjustment unit that changes the target level used by the imaging adjustment unit to a higher level when the reading of optical information by the reading unit fails while the amount of movement estimated by the estimation unit is less than or equal to a predetermined first standard.

46. An optical information reading device according to claim 45, The optical information reading device is characterized in that the imaging adjustment unit calculates an index value of the brightness of an image based on the pixel values ​​of pixels in an image captured by the imaging unit, and adjusts the imaging conditions of the imaging unit so that the index value of the brightness of an image obtained in subsequent imaging reaches the target level.

47. An optical information reading device according to claim 46, The optical information reading device is characterized in that the imaging adjustment unit adjusts at least one of the imaging conditions, namely the exposure time and the illumination time.

48. An optical information reading device according to claim 46, An optical information reading device characterized in that, if the amount of movement estimated by the estimation unit is less than or equal to the first standard, the brightness index value is determined based on thresholds when pixels sampled from an image captured by the imaging unit are classified into a first class of dark pixels and a second class of bright pixels based on the variance of pixel values ​​of pixels within each class.

49. An optical information reading device according to claim 48, An optical information reading device characterized in that the classification is performed in such a way that the degree of dispersion of pixel values ​​of pixels within each class is minimized.

50. An optical information reading device according to claim 46, The optical information reading device is characterized in that the imaging adjustment unit calculates the brightness index value by a first step if the amount of movement estimated by the estimation unit is less than or equal to the first standard, and calculates the brightness index value by a second step different from the first step if the amount of movement estimated by the estimation unit exceeds the first standard.

51. An optical information reading device according to claim 50, An optical information reading device characterized in that the brightness index value obtained in the first step for an image from which optical information can be read by the reading unit is smaller than the brightness index value obtained in the second step for the same image.

52. An optical information reading device according to claim 45, The optical information reading device is characterized in that the target adjustment unit sets the target level to a predetermined initial value when it determines that the amount of movement estimated by the estimation unit is not less than or equal to a predetermined first standard.

53. An optical information reading device according to claim 45, The optical information reading device is characterized in that the target adjustment unit returns the target level to a predetermined initial value when the reading of optical information by the reading unit fails while the target level is at a predetermined upper limit.

54. An optical information reading device according to claim 45, An illumination unit that emits reference AIM light to direct the imaging unit towards the optical information to be read, The system includes an imaging unit that detects the position of the EMA light in the image captured by the imaging unit, The optical information reading device is characterized in that the imaging adjustment unit determines whether the amount of movement estimated by the estimation unit is less than or equal to a predetermined first standard, and if it determines that it is less than or equal to the first standard, 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 detected AIM light in the image captured by the imaging unit.

55. An optical information reading device according to claim 45, An illumination unit that emits reference AIM light to direct the imaging unit towards the optical information to be read, The system includes an imaging unit that detects the position of the EMA light in the image captured by the imaging unit, The optical information reading device is characterized in that the imaging adjustment unit adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels around the position of the AIM light in the image captured by the imaging unit, and when the estimation unit determines that the amount of movement estimated by the estimation unit is less than or equal to the first standard, it adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range around the position of the AIM light compared to when the estimation unit determines that the amount of movement estimated by the estimation unit is not less than or equal to the first standard.

56. An optical information reading device according to claim 45, The optical information reading device is characterized in that 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, and when the estimation unit determines that the amount of movement estimated by the estimation unit is less than or equal to the first standard, it adjusts the imaging conditions of the imaging unit based on the pixel values ​​of pixels in a narrower range of the image compared to when the estimation unit determines that the amount of movement estimated by the estimation unit is not less than or equal to the first standard.

57. A program for causing a processor controlling the imaging unit to execute the optical information reading method described in any one of claims 33 to 44.

58. The imaging procedure involves periodically capturing images using the imaging unit, A reading procedure which involves analyzing the image captured in the aforementioned imaging procedure and reading the optical information contained within the image, The system includes an imaging adjustment procedure which calculates an index value of the brightness of an image based on the pixel values ​​of pixels in the image captured in the imaging procedure, and adjusts the imaging conditions of the imaging unit so that the index value of the brightness of images obtained in subsequent imaging reaches a predetermined target level. An optical information reading method characterized in that the brightness index value is determined based on thresholds when pixels sampled from an image captured in the imaging procedure are classified into a first class of dark pixels and a second class of bright pixels based on the variance of pixel values ​​within each class.

59. An optical information reading method according to claim 58, An optical information reading method characterized by performing the classification such that the degree of dispersion of pixel values ​​within each class is minimized.

60. An optical information reading method according to claim 58, An optical information reading method characterized by performing the aforementioned classification in such a way that the intra-class variance, which is the weighted average of the variance of pixel values ​​within each class, taking into account the number of pixels belonging to each class, is minimized.

61. An optical information reading method according to claim 58, An optical information reading method characterized in that the brightness index value is a value indicating a pixel value brighter than the threshold value.

62. An optical information reading method according to claim 58, An optical information reading method characterized in that the brightness index value is a value that indicates a pixel value that is near the threshold and brighter than the threshold.

63. An optical information reading method according to claim 58, The optical information reading method is characterized in that the imaging adjustment procedure is a procedure for adjusting at least one of the imaging conditions, namely the exposure time and the illumination time.

64. Imaging unit, An imaging control unit that periodically causes the imaging unit to capture images, A reading unit analyzes the image captured by the imaging unit and reads the optical information contained in the image, The imaging adjustment unit calculates an index value of brightness of an image based on the pixel values ​​of pixels in an image captured by the imaging unit, and adjusts the imaging conditions of the imaging unit so that the index value of brightness of images obtained in subsequent imaging reaches a predetermined target level. An optical information reading device characterized in that the brightness index value is determined based on thresholds when pixels sampled from an image captured by the imaging unit are classified into a first class of dark pixels and a second class of bright pixels based on the variance of pixel values ​​within each class.

65. An optical information reading device according to claim 64, An optical information reading device characterized in that the classification is performed in such a way that the degree of dispersion of pixel values ​​of pixels within each class is minimized.

66. An optical information reading device according to claim 64, The aforementioned classification is characterized by performing the classification in such a way that the intra-class variance, which is the weighted average of the variance of pixel values ​​within each class, taking into account the number of pixels belonging to each class, is minimized.

67. An optical information reading device according to claim 64, An optical information reading device characterized in that the brightness index value is a value indicating a pixel value brighter than the threshold value.

68. An optical information reading device according to claim 64, The optical information reading device is characterized in that the brightness index value is a value that indicates a pixel value that is near the threshold and brighter than the threshold.

69. An optical information reading device according to claim 64, The optical information reading device is characterized in that the imaging adjustment unit adjusts at least one of the imaging conditions, namely the exposure time and the illumination time.

70. A program for causing a processor controlling the imaging unit to execute the optical information reading method described in any one of claims 58 to 63.

71. The imaging procedure involves periodically capturing images using the imaging unit, A reading procedure which involves analyzing the image captured in the aforementioned imaging procedure and reading the optical information contained within the image, An estimation procedure for estimating the amount of movement of the imaging unit per frame based on images captured by the imaging procedure within a certain time range, The system includes an imaging adjustment procedure for adjusting the imaging conditions of the imaging unit, which includes at least one of the items of exposure time and illumination time. An optical information reading method characterized in that the upper limit of the value of at least one of the items set in the imaging adjustment procedure is determined based on the estimated amount of movement of the imaging unit per frame.

72. An optical information reading method according to claim 71, The procedure includes obtaining an acceptable amount of image blur when reading the aforementioned optical information, An optical information reading method characterized in that the upper limit of the value of at least one of the items set in the imaging adjustment procedure is determined based on the estimated amount of movement of the imaging unit per frame and the acquired amount of blur.

73. Imaging unit, An imaging control unit that periodically causes the imaging unit to capture images, A reading unit analyzes the image captured by the imaging unit and reads the optical information contained in the image, An estimation unit estimates the amount of movement of the imaging unit per frame based on images captured by the imaging unit within a certain time range, The system includes an imaging adjustment unit that adjusts the imaging conditions of the imaging unit, which include at least one of the items of exposure time and illumination time. An optical information reading device characterized in that the upper limit of the value of at least one of the items set by the imaging adjustment unit is determined based on the estimated amount of movement of the imaging unit per frame.

74. An optical information reading device according to claim 73, When reading the aforementioned optical information, an acceptable amount of image blur is obtained. An optical information reading device characterized in that the upper limit of the value of at least one of the items set by the imaging adjustment unit is determined based on the estimated amount of movement of the imaging unit per frame and the acquired amount of blur.

75. A program for causing a processor controlling the imaging unit to execute the optical information reading method described in claim 71 or 72.

76. The imaging procedure involves periodically capturing images using the imaging unit, A reading procedure which involves analyzing the image captured in the aforementioned imaging procedure and reading the optical information contained within the image, An estimation procedure for estimating the amount of movement of the imaging unit during a certain time range based on images captured by the imaging procedure during that time range, A first reading control procedure is performed when a certain time range has elapsed since the image being analyzed in the reading procedure, and a new reading procedure is executed to analyze an image taken in the imaging procedure after the image being analyzed and to read the optical information contained in that image. An optical information reading method characterized by comprising: a second reading control procedure which determines whether the amount of movement estimated in the estimation procedure is less than or equal to a predetermined first standard, and if it is determined to be less than or equal to the first standard, the first reading control procedure is not executed.

77. The imaging procedure involves periodically capturing images using the imaging unit, A reading procedure which involves analyzing the image captured in the aforementioned imaging procedure and reading the optical information contained within the image, An estimation procedure for estimating the amount of movement of the imaging unit during a certain time range based on images captured by the imaging procedure during that time range, A first reading control procedure is performed, which, when a time corresponding to a certain time range has elapsed from the start of the reading procedure, a new reading procedure is executed, which analyzes the most recent image captured in the imaging procedure and reads the optical information contained in the image. An optical information reading method characterized by comprising: a second reading control procedure which determines whether the amount of movement estimated in the estimation procedure is less than or equal to a predetermined first standard, and if it is determined to be less than or equal to the first standard, the first reading control procedure is not executed.

78. Imaging unit, An imaging control unit that periodically causes the imaging unit to capture images, A reading unit analyzes the image captured by the imaging unit and reads the optical information contained in the image, An estimation unit that estimates the amount of movement of the imaging unit during a certain time range based on images captured by the imaging unit during that time range, A first reading control unit, when a certain time range has elapsed since the image being analyzed by the reading unit was captured, causes the reading unit to perform a new operation to analyze an image captured by the imaging unit after the image being analyzed and to read the optical information contained in that image. An optical information reading device comprising: a second reading control unit that determines whether the amount of movement estimated by the estimation unit is less than or equal to a predetermined first standard, and stops the first reading control unit if it is determined to be less than or equal to the first standard.

79. Imaging unit, An imaging control unit that periodically causes the imaging unit to capture images, A reading unit analyzes the image captured by the imaging unit and reads the optical information contained in the image, An estimation unit that estimates the amount of movement of the imaging unit during a certain time range based on images captured by the imaging unit during that time range, A first reading control unit, which, when a certain time range has elapsed since the start of image analysis by the reading unit, causes the reading unit to perform a new operation to analyze the most recent image captured by the imaging unit and read the optical information contained in the image, An optical information reading device comprising: a second reading control unit that determines whether the amount of movement estimated by the estimation unit is less than or equal to a predetermined first standard, and stops the first reading control unit if it is determined to be less than or equal to the first standard.

80. A program for causing a processor controlling the imaging unit to execute the optical information reading method described in claim 76 or 77.