Information reading terminal

The information reading terminal optimizes autofocus operations by pre-calculating focus amounts based on phase difference information and predicted displacement, reducing delays in reading multiple codes, thus improving efficiency and user experience.

JP2026110221APending Publication Date: 2026-07-02DENSO WAVE INC

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
DENSO WAVE INC
Filing Date
2024-12-20
Publication Date
2026-07-02

Smart Images

  • Figure 2026110221000001_ABST
    Figure 2026110221000001_ABST
Patent Text Reader

Abstract

This configuration provides an improved reading experience, even when reading large amounts of information code sequentially. [Solution] The imaging unit 13 acquires phase difference information calculated for one or more candidate displacement destination pixels in the captured image in which the information code has been captured, and candidate displacement direction information from a predetermined reference point in the captured image to the candidate displacement destination pixels. The acquired candidate displacement direction information is stored in the storage unit 12 in association with the focus amount calculated based on the corresponding phase difference information. When the reading process is successful, if it is determined that the candidate displacement direction information corresponding to the detected image field displacement direction information is a predicted displacement state stored in the storage unit 12, focus control is performed according to the focus amount stored in the storage unit 12 in association with the candidate displacement direction information determined to be a predicted displacement state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an information reading terminal that optically reads predetermined information such as an information code.

Background Art

[0002] Conventionally, in business applications for optically reading information codes such as barcodes, business terminals equipped with dedicated reading modules with fixed focus have been used. On the other hand, with the improvement in the performance of inexpensive general-purpose cameras, business terminals that perform reading using general-purpose cameras have also come to be used. In recent years, due to the promotion of DX, the use of general-purpose terminals such as smartphones, rather than dedicated business terminals, has also increased. Since general-purpose cameras adopted in such general-purpose terminals often perform reading by autofocus that automatically focuses, there may be a waiting time for focusing as a weakness of autofocus. In photographing with autofocus using a general-purpose digital camera or the like, the lens moves in the moving range from the closest to infinity to perform focusing, so it takes time to focus.

[0003] Regarding such problems, an autofocus control device disclosed in Patent Document 1 below is known. This autofocus control device divides the moving range of the focus lens into a movable range and a movement prohibited range, and when the focus detection operation is performed while the focus lens is in the movement prohibited range, if the drive target position of the focus lens cannot be detected, the focus lens is driven at high speed without performing a search drive up to the switching point between the movable range and the movement prohibited range, and the focus lens is driven and controlled by a search drive means up to a predetermined position within the movable range. Thereby, even for a focus lens with a long moving range from the closest to infinity, the focus lens can be moved within the limit as quickly as possible to focus on the target subject.

Prior Art Documents

Patent Documents

[0004] [Patent Document 1] Japanese Patent Publication No. 2007-047468 [Overview of the project] [Problems that the invention aims to solve]

[0005] Incidentally, the waiting time for autofocus adjustment becomes long when the focal point changes significantly, and when imaging and reading objects with different focal lengths one after another, the autofocus operates each time, worsening the reading experience. In particular, in reading tasks that involve imaging and optically reading a large number of barcodes, QR codes (registered trademarks), etc. (for example, receiving and inventory tasks), it is necessary to read the information codes quickly one after another, so this waiting time becomes a bottleneck in work efficiency.

[0006] The autofocus control device described in the above patent document attempts to shorten the time required for focusing by dividing the scan range, but it is intended for use in photography and is not intended for reading tasks that involve reading a large number of information codes one after another. When reading a large number of information codes continuously, even if the scan range is divided, the device will be reading items with different focal lengths one after another, which may result in frequent waiting times for autofocus to adjust.

[0007] This invention was made to solve the above-mentioned problems, and its objective is to provide a configuration that can improve the reading feel even when reading a large amount of information code in succession. [Means for solving the problem]

[0008] To achieve the above objective, the present invention Imaging unit (13), The control unit (11) that controls the focus of the imaging unit, A reading unit (11) performs a reading process to optically read the information codes (B1 to B3) captured by the imaging unit while the focus is controlled, An information reading terminal (10) equipped with, An acquisition unit (11) acquires phase difference information calculated for one or more candidate displacement pixels (Pa1, Pa2, Pb1, Pb2, Pc1~Pc8, Pd1~Pd4, Pe1) in an image captured by the imaging unit in which the information code is captured, and candidate displacement direction information (Fa1, Fa2, Fb1, Fb2, Fd1~Fd4, Fe1) from a predetermined reference point (Po) in the image to the candidate displacement pixels, A focus amount calculation unit (11) calculates the focus amount based on the phase difference information acquired by the acquisition unit, A storage unit (12) stores the displacement candidate direction information acquired by the acquisition unit in association with the focus amount calculated by the focus amount calculation unit based on the corresponding phase difference information, When the reading process is successful, the imaging field displacement direction detection unit (11) detects the displacement direction of the imaging field by the imaging unit as imaging field displacement direction information (Fm), A determination unit (11) determines whether the candidate displacement direction information corresponding to the imaging field displacement direction information detected by the imaging field displacement direction detection unit is a predicted displacement state stored in the storage unit, Equipped with, The control unit, when it is determined by the determination unit that the predicted displacement state is met, performs focus control according to the focus amount stored in the storage unit in association with the displacement candidate direction information determined to be the predicted displacement state. The symbols within the parentheses above indicate the correspondence with the specific means described in the embodiments described later. [Effects of the Invention]

[0009] In this invention, the acquisition unit acquires phase difference information calculated for one or more candidate displacement destination pixels in an image captured by the imaging unit, and candidate displacement direction information from a predetermined reference point in the image to the candidate displacement destination pixels. The acquired candidate displacement direction information is stored in the storage unit in association with the focus amount calculated by the focus amount calculation unit based on the corresponding phase difference information. When the reading process is successful, the determination unit determines that the candidate displacement direction information corresponding to the image field displacement direction information detected by the image field displacement direction detection unit is in a predicted displacement state stored in the storage unit. Then, the control unit performs focus control according to the focus amount stored in the storage unit in association with the candidate displacement direction information determined to be in a predicted displacement state.

[0010] As a result, when the determination unit determines that a predicted displacement state exists, that is, when a displacement of the imaging field of view is detected at the time of successful reading such that the imaging field of view is directed towards an object (hereinafter also referred to as a candidate object to be read) whose displacement target pixels for which the focus amount has been calculated in advance during the reading process are partly included, focus control is performed according to the calculated focus amount. When reading information codes continuously, once the reading process of the information code to which the imaging field of view is directed is successful, the imaging field of view is directed towards the next information code to be read. Therefore, there is a high probability that the next information code to be read is displayed on a candidate object to be read located in the direction in which the imaging field of view has changed. For this reason, when reading the next information code displayed on the aforementioned candidate object to be read, focus control suitable for imaging the candidate object to be read and the next information code to be read is performed in advance while the imaging field of view is about to be directed towards that candidate object to be read. As a result, even when reading a large number of information codes continuously, the time required for focus control is shortened by pre-reading compared to when focus control is performed after the imaging field of view has been directed towards the information code, thus enabling the realization of an information reading terminal that can improve the reading feel.

[0011] The candidate pixels for displacement may be set to be included in an image region that can be recognized as an information code.

[0012] For barcodes, areas with continuous black and white images, and for QR codes, areas near the position detection pattern, can be detected from the captured image as image areas that can be recognized as information codes. Since the information code to be read next is likely to be captured in the image areas detected in this way, by setting the center of the detected image area as a candidate pixel for displacement, it becomes less likely that a candidate pixel for displacement will be set in an image area that is less likely to be displaced. As a result, candidate pixels for displacement are carefully selected, and the processing load for acquiring phase difference information and candidate displacement direction information can be reduced.

[0013] The candidate pixels for displacement may be set to be included in an image region where a plane image can be recognized.

[0014] Since information codes are often printed on flat surfaces such as cardboard, detecting the area where a flat surface is expected from the captured image and setting the center of that area as a candidate pixel for displacement makes it less likely for candidate pixels to be set in image areas where displacement is unlikely. As a result, candidate pixels for displacement are carefully selected, which reduces the processing load for acquiring phase difference information and candidate displacement direction information.

[0015] The candidate pixels for displacement may be set to be included in an image region where the image of the plane on which the character information is displayed can be recognized.

[0016] Since information codes are often printed on flat surfaces such as cardboard along with text information, detecting the image region where the text information is expected to be displayed from the captured image and setting the center of that image region as a candidate pixel for displacement makes it less likely for candidate pixels to be set in image regions that are unlikely to be displaced. As a result, candidate pixels for displacement are carefully selected, which reduces the processing load for acquiring phase difference information and candidate displacement direction information.

[0017] The acquisition unit may calculate the phase difference information for all pixels in the captured image in which the information code is captured by the imaging unit, and then acquire a set of phase difference information and displacement candidate direction information for each group of phase difference information regarded as being obtained by imaging the same object.

[0018] On the premise that the displacement candidate direction information acquired by the acquisition unit is associated with the focus amount calculated by the focus amount calculation unit based on the corresponding phase difference information and the exposure condition calculated by the exposure condition calculation unit based on the luminance information of the displacement destination candidate pixel and stored in the storage unit, when the control unit is determined by the determination unit to be in the predicted displacement state, the control unit may perform focus control and exposure control according to the focus amount and exposure condition stored in the storage unit associated with the displacement candidate direction information determined to be in the predicted displacement state.

[0019] Thereby, not only the time required for focus control but also the time required for exposure condition setting can be shortened, so that the reading feeling can be further improved.

[0020] On the premise that the prediction unit predicts the direction in which the imaging field of view by the imaging unit is displaced based on the detection result of the movement state detection unit accumulated in the storage unit, the acquisition unit calculates the phase difference information for one or more displacement destination candidate pixels in the image area in the displacement direction predicted by the prediction unit in the captured image in which the information code is captured by the imaging unit and the displacement candidate direction information from a predetermined reference point in the captured image to the displacement destination candidate pixel.

[0021] In this way, by detecting the image area in the predicted displacement direction and setting the center of the image area as the displacement destination candidate pixel, it becomes difficult to set the displacement destination candidate pixel in the image area with a low possibility of displacement. Therefore, since the displacement destination candidate pixels are strictly selected, the processing load for the acquisition process of the phase difference information and the displacement candidate direction information can be reduced.

Brief Description of the Drawings

[0022] [Figure 1]This is an explanatory diagram illustrating an environment in which the information reading terminal according to the first embodiment is used. [Figure 2] This is an explanatory diagram illustrating the state in which the image for reading is displayed on the screen as shown in Figure 1. [Figure 3] This is a block diagram illustrating the electrical configuration of the information reading terminal. [Figure 4] This flowchart illustrates the flow of the reading process performed in the control unit in the first embodiment. [Figure 5] This is an explanatory diagram illustrating the candidate objects to be read from the reading image in the first embodiment. [Figure 6] This is an explanatory diagram illustrating the imaging conditions that are determined to be in a predicted displacement state. [Figure 7] This is an explanatory diagram illustrating the amount of focus selected when there are multiple candidate displacement direction information items that can be determined to be in a predicted displacement state. [Figure 8] This is an explanatory diagram illustrating the positions of each candidate displacement target pixel in the reading image as employed in the second embodiment. [Figure 9] This is an explanatory diagram illustrating the image region of a candidate object to be read, as detected from the reading image, in the third embodiment. [Figure 10] This is an explanatory diagram illustrating a reading image where the candidate object to be read in the background was underexposed. [Figure 11] This flowchart illustrates the flow of the reading process performed in the control unit in the fifth embodiment. [Figure 12] This is an explanatory diagram illustrating the arrangement of objects to be read in the sixth embodiment. [Figure 13] This flowchart illustrates the flow of the reading process performed in the control unit in the sixth embodiment. [Figure 14] This is an explanatory diagram illustrating the image region of a candidate object to be read, as detected from the reading image, in the sixth embodiment. [Modes for carrying out the invention]

[0023] [First Embodiment] A first embodiment of the information reading terminal according to the present invention will be described below with reference to the drawings. The information reading terminal 10 according to this embodiment, shown in Figure 1, is configured as a portable information processing device that optically reads optical information such as information codes (barcodes, QR codes, etc.) and character information. More specifically, the information reading terminal 10 is a general-purpose portable terminal such as a smartphone with an autofocus function, and is configured with a predetermined application program (hereinafter also referred to as a reading app) installed for reading and aggregating the information codes to be read. In Figure 1, the barcode B1 to be read is attached to a cardboard box G1, and cardboard boxes G2 with barcode B2, G3 and G4 with barcode B3 are placed behind cardboard box G1, and cardboard box G5 is placed to the left of cardboard box G1 as viewed from the user.

[0024] The information reading terminal 10 has an outer casing formed by a roughly thin plate-like housing, and a display screen 14a capable of displaying captured images is located in the center of the housing's surface, as shown in Figure 2. An imaging window (not shown) directed towards the information code to be captured is provided on the back of the housing, etc.

[0025] The information reading terminal 10 mainly includes, as shown in Figure 3, a control unit 11 consisting of a CPU, a storage unit 12 consisting of ROM, RAM, non-volatile memory, an imaging unit 13, a display unit 14 which is a touch panel type and whose display content on the display screen 14a is controlled by the control unit 11, an operation unit 15 which outputs signals to the control unit 11 in response to touch operations on the touch panel and operations on various operation keys, a three-axis acceleration sensor 16 which can detect acceleration in three axes, and a communication unit 17 which is configured as a communication interface that can communicate with external devices such as servers via a predetermined network such as the Internet.

[0026] The imaging unit 13 includes an imaging lens 21, an image sensor 22, a lens drive unit 23, etc. Focus control is performed by adjusting the position of the imaging lens 21 relative to the image sensor 22, using the lens drive unit 23, which is driven and controlled by the control unit 11 based on a pair of phase difference signals (hereinafter also referred to as phase difference information (PD information)) generated by the image sensor 22. A phase difference AF sensor for acquiring phase difference information for autofocus may be provided separately.

[0027] The imaging unit 13 captures images of the outside through an imaging window provided on the back of the housing, and the control unit 11 performs a reading process to optically read the information code captured by the imaging unit 13 while the focus is controlled.

[0028] In the information reading terminal 10 of this embodiment, in the reading process performed by the control unit 11 when the reading application is started, in order to shorten the time required for autofocus control, a process is performed to pre-calculate the amount of focus (actuator movement amount by the lens drive unit 23) to be used for focus control suitable for imaging the next object to be read, which has an information code attached to it (hereinafter also referred to as a candidate object to be read). For this reason, when an information code is captured in a decodeable image, the amount of focus is calculated based on the phase difference information obtained from the image region of the candidate object to be read, assuming that the candidate object to be read is captured in the captured image (hereinafter also referred to as the reading image).

[0029] In particular, in this embodiment, assuming that the reading image contains two or more candidate objects to be read, information (also called displacement candidate direction information) regarding the direction from a predetermined reference point (e.g., the image center point) in the reading image toward each candidate object to be read is acquired, and the acquired displacement candidate direction information is stored in the storage unit 12 in association with the focus amount calculated based on the corresponding phase difference information. Then, after successful decoding, focus control is performed according to the candidate object to be read located in the direction in which the imaging field of view has changed. This is because, when reading information codes continuously, if the reading process of the information code to which the imaging field of view is directed is successful, the imaging field of view is directed toward the next information code to be read, and therefore there is a high possibility that the next information code to be read is displayed on the candidate object to be read located in the direction in which the imaging field of view has changed.

[0030] The following describes in detail the reading process performed by the control unit 11 when the above-mentioned reading application is launched, when performing a barcode reading operation in a continuous sequence, with reference to the flowchart shown in Figure 4.

[0031] When the reading application is activated in response to a predetermined operation on the operation unit 15, the control unit 11 starts the reading process. Then, in the image acquisition process shown in step S101 of Figure 4, the imaging unit 13 captures the outside through the imaging window to acquire a reading image. Once the reading image is acquired in this way, a decoding process is started to read the information recorded in the barcode from this reading image (S102).

[0032] During the decoding process described above, the read candidate object detection process shown in step S103 is performed. In this embodiment, since barcodes are read continuously, a process is performed to detect image regions with continuous black and white like a barcode (image regions that resemble a barcode) from the read image as image regions of read candidate objects. If a read image is captured in which only barcode B1 can be decoded, as illustrated in Figure 2, then with respect to that read image, image regions Sa1 and Sa2 are detected as read candidate objects, as illustrated in Figure 5. If QR codes are also to be read, the image region near the position detection pattern (FP pattern), which is a characteristic pattern of QR codes (image regions that resemble a QR code) is detected as the image region of the read candidate object.

[0033] Next, the phase difference information and displacement candidate direction information acquisition process shown in step S104 is performed, and processing is carried out to acquire phase difference information and displacement candidate direction information for the image region of the read candidate object detected as described above. As described above, in the detected image region, there is a high possibility that the barcode to be read next is captured, so by setting the center of the above image region as the displacement destination candidate pixel, it becomes difficult to set the displacement destination candidate pixel in the image region where the possibility of displacement is low. As a result, the displacement destination candidate pixels are carefully selected, and the processing load for acquiring phase difference information and displacement candidate direction information can be reduced. In the example in Figure 5, for the image region Sa1, the pixel at the center (centroid position) of the image region Sa1 is set as the displacement destination candidate pixel Pa1, and the phase difference information of the displacement destination candidate pixel Pa1 and the displacement candidate direction information Fa1 from the image center point Po in the read image to the displacement destination candidate pixel Pa1 are acquired (see Figure 5). Furthermore, for the image region Sa2, the pixel in the center of the image region Sa2 is designated as the candidate displacement target pixel Pa2, and phase difference information of the candidate displacement target pixel Pa2 and displacement candidate direction information Fa2 from the image center point Po in the reading image to the candidate displacement target pixel Pa2 are acquired (see Figure 5). The control unit 11 that performs the above-mentioned phase difference information and displacement candidate direction information acquisition processing may correspond to an example of an "acquisition unit".

[0034] Next, the focus amount calculation process shown in step S105 is performed, and processing is carried out to calculate the focus amount for each candidate displacement pixel based on phase difference information. In the example in Figure 5, a focus amount suitable for imaging the candidate object to be read in image region Sa1 is calculated based on the phase difference information of the candidate displacement pixel Pa1, and a focus amount suitable for imaging the candidate object to be read in image region Sa2 is calculated based on the phase difference information of the candidate displacement pixel Pa2. The control unit 11 that performs the above focus amount calculation process may correspond to an example of a "focus amount calculation unit".

[0035] Once the focus amount is calculated as described above, in the storage process shown in step S106, the phase difference information and displacement candidate direction information acquired as described above are stored in the storage unit 12 in association with the focus amount calculated based on the corresponding phase difference information.

[0036] If the decoding process described above fails (No in S107), the second focus control process shown in step S111 is performed to perform normal focus control, and then the process from step S101 onwards is carried out.

[0037] On the other hand, if the above-described decoding process is successful (Yes in S107), the imaging field displacement direction detection process shown in step S108 is performed. In this process, when the reading process is successful, a process is performed to detect the direction of displacement of the imaging field by the imaging unit 13 as imaging field displacement direction information Fm. For example, if the image captured by the imaging unit 13 changes from the image captured (reading image) shown in Figure 5 to the image captured in Figure 6 after a predetermined time (for example, 1 s), then, as shown in Figure 6, imaging field displacement direction information Fm is detected, which is directed from the image center point Po of the reading image to the image center point Pm of the image captured in Figure 6. Note that the detection result of the 3-axis acceleration sensor 16 may also be used to detect the above imaging field displacement direction information Fm, and the control unit 11 that performs the above imaging field displacement direction detection process may correspond to an example of an "imaging field displacement direction detection unit".

[0038] Next, in the determination process of step S109, it is determined whether or not the displacement candidate direction information corresponding to the imaging field displacement direction information Fm detected as described above is stored in the storage unit 12 (hereinafter also referred to as the predicted displacement state). The control unit 11 that performs the above determination process may correspond to an example of a "determination unit".

[0039] In this embodiment, the state in which displacement candidate direction information is stored in the storage unit 12 such that the angular difference Δθ with the imaging field displacement direction information Fm is less than or equal to a predetermined threshold (e.g., 15°) is determined to be the predicted displacement state. In the example in Figure 6, the predicted displacement state is determined when the angular difference Δθ between the displacement candidate direction information Fa1 and the imaging field displacement direction information Fm is less than or equal to a predetermined threshold. Alternatively, for example, the image for reading may be divided into sections at regular angular intervals (e.g., 15° intervals) around the image center point Po, and the state in which displacement candidate direction information included in the same section as the imaging field displacement direction information Fm is stored in the storage unit 12 may be determined to be the predicted displacement state.

[0040] If it is determined that the predicted displacement state exists (Yes in S109), the first focus control process shown in step S110 is performed. In this process, focus control is performed according to the amount of focus stored in the storage unit 12 in association with the displacement candidate direction information that has been determined to be the predicted displacement state. In the example in Figure 6, focus control is performed according to the amount of focus stored in the storage unit 12 in association with the displacement candidate direction information Fa1.

[0041] As a result, when attempting to read the next barcode displayed on a candidate object corresponding to image region Sa1, the imaging field of view of the information reading terminal 10 is directed towards that barcode (candidate object), and in the meantime, focus control suitable for capturing the next barcode to be read is performed in advance. Therefore, in the image acquisition process performed in step S101 that follows, an image suitable for reading the barcode can be acquired one beat earlier.

[0042] On the other hand, if the imaging field displacement direction information Fm differs significantly from the displacement candidate direction information Fa1 and Fa2, and no displacement candidate direction information whose angular difference Δθ with the imaging field displacement direction information Fm is below a predetermined threshold is stored in the storage unit 12, it is determined that the predicted displacement state is not present (No in S109). In this case, the second focus control process shown in step S111 is performed, and normal focus control is carried out without considering the focus amount stored in the storage unit 12.

[0043] As described above, in the information reading terminal 10 according to this embodiment, phase difference information calculated for one or more candidate displacement pixels (Pa1, Pa2) in the captured image (reading image) in which the information code has been captured by the imaging unit 13, and candidate displacement direction information (Fa1, Fa2) from a predetermined reference point (Po) in the captured image to the candidate displacement pixels are acquired. The acquired candidate displacement direction information is stored in the storage unit 12 in association with the focus amount calculated based on the corresponding phase difference information. When the reading process is successful, if it is determined that the candidate displacement direction information corresponding to the image field displacement direction information (Fm) is a predicted displacement state stored in the storage unit 12 (Yes in S109), focus control is performed according to the focus amount stored in the storage unit 12 in association with the candidate displacement direction information that has been determined to be a predicted displacement state.

[0044] As a result, when it is determined that a predicted displacement state exists, that is, when a displacement of the imaging field of view that directs the imaging field of view towards a candidate object to be read (an object that is imaged such that a portion of the displacement target candidate pixels) for which the focus amount has been calculated in advance during the reading process is detected upon successful reading, focus control is performed according to the calculated focus amount. Therefore, when reading the next information code displayed on the aforementioned candidate object, focus control suitable for imaging the candidate object to be read and the next information code to be read is performed in advance while the imaging field of view is about to be directed towards that candidate object. As a result, even when reading a large number of information codes in succession, the time required for focus control is shortened by pre-reading compared to when focus control is performed after the imaging field of view has been directed towards the information code, thus realizing an information reading terminal 10 that can improve the reading feel.

[0045] In addition, in the determination process of step S109 described above, if there are multiple candidate displacement direction information for which the angular difference Δθ with the imaging field displacement direction information Fm is less than or equal to a predetermined threshold, the amount of focus to be controlled may be selected based on the comparison result between the magnitude of the vector obtained from the imaging field displacement direction information Fm (i.e., acceleration) and the magnitude of the vector obtained from each candidate displacement direction information.

[0046] Specifically, as illustrated in Figure 7, when the acceleration is relatively large, the focus control can be performed according to the focus amount associated with the displacement candidate direction information Fb1, which has the largest vector magnitude, assuming that the movement is for reading distant information codes (information codes within the image region Sb1, centered on the displacement destination candidate pixel Pb1, which is furthest from the image center point Po). On the other hand, when the acceleration is relatively small, the focus control can be performed according to the focus amount associated with the displacement candidate direction information Fb2, which has the smallest vector magnitude, assuming that the movement is for reading nearby information codes (information codes within the image region Sb2, centered on the displacement destination candidate pixel Pb2, which is closest to the image center point Po).

[0047] In particular, since the acceleration expected during displacement at the predetermined time can be calculated based on the magnitude of the vector obtained from the displacement candidate direction information, the calculated expected acceleration is stored in the memory unit 12 along with the focus amount (S106), and in the determination process of step S109, the focus amount to be controlled can be selected based on the comparison result between the expected acceleration already stored as described above and the acceleration obtained from the imaging field displacement direction information Fm. This reduces the processing time required to select the focus amount to be controlled. Note that instead of performing the above comparison using the acceleration obtained from the detected imaging field displacement direction information Fm, the comparison may be performed using the detection result of the 3-axis acceleration sensor 16 or the like.

[0048] [Second Embodiment] Next, the information reading terminal according to this second embodiment will be described with reference to the drawings. In this second embodiment, the main difference from the first embodiment and the like is that the position of the candidate pixels where phase difference information is acquired is predetermined. Therefore, components that are substantially the same as those in the first embodiment are denoted by the same reference numerals, and their descriptions are omitted.

[0049] In the information reading terminal 10 according to this embodiment, in order to reduce the processing load related to the reading process performed by the control unit 11, a process is performed to acquire phase difference information of pixels at a predetermined position in the reading image without detecting a candidate object to be read each time, as in the first embodiment described above.

[0050] Specifically, as illustrated in Figure 8, for example, the field of view (reading image) is divided into nine sections, and the center Pc1 to Pc8 of the surrounding eight sections are designated as candidate pixels for displacement, and phase difference information is acquired for each of the candidate pixels Pc1 to Pc8.

[0051] Therefore, in the reading process performed by the control unit 11 of this embodiment, the reading candidate object detection process in step S103 described above is abolished, and in the phase difference information and displacement candidate direction information acquisition process in step S104, phase difference information is acquired at each displacement destination candidate pixel Pc1 to Pc8. The displacement candidate direction information at each displacement destination candidate pixel Pc1 to Pc8 is set to a default value. Based on the phase difference information acquired in this way, the focus amount is calculated (S105), and the displacement candidate direction information and focus amount are stored in the storage unit 12 (S106).

[0052] Then, after successful decoding (Yes in S107), if one of the eight displacement candidate direction information is determined to be in a predicted displacement state (Yes in S109), focus control is performed according to the focus amount stored in the memory unit 12 in association with the displacement candidate direction information determined to be in a predicted displacement state (S110).

[0053] Even in this manner, because the information code is located in the displacement direction of the imaging field detected as imaging field displacement direction information Fm, focus control suitable for imaging the information code is performed according to the focus amount calculated in advance for that information code. For this reason, even in this embodiment, even when reading a large number of information codes continuously, the time required for focus control is shortened, and an information reading terminal 10 that can improve the reading feel can be realized.

[0054] Furthermore, the method is not limited to acquiring phase difference information using the center of each of the eight sections of the nine divisions as candidate pixels for displacement destinations. For example, the method may also involve acquiring phase difference information using the center of each of the four sections of the four divisions, or acquiring phase difference information using multiple predetermined positions within the field of view (reading image) as candidate pixels for displacement destinations.

[0055] [Third Embodiment] Next, the information reading terminal according to this third embodiment will be described with reference to the drawings. This third embodiment differs from the first embodiment and others in that it detects planes and the like in the image to be read as candidate objects to be read. Therefore, components that are substantially the same as those in the first embodiment are denoted by the same reference numerals, and their descriptions are omitted.

[0056] In this embodiment, considering that information codes are often printed on flat surfaces such as cardboard, an image region where a flat surface is assumed is detected from the image to be read, and phase difference information is acquired using the center of that image region as a candidate pixel for displacement. For this reason, in the reading process of this embodiment, the reading candidate object detection process (S103) is performed to detect an image region where a flat surface is assumed to be enclosed by multiple straight lines from the reading image as the image region of a reading candidate object.

[0057] Specifically, straight lines are detected using detection methods such as edge detection and Hough transform. The regions enclosed by the detected lines are determined, and the image regions presumed to be quadrilaterals are detected as the plane of the candidate object to be read. If a part is hidden due to overlap, the corners of the plane are presumed to be where the lines intersect by extending them (see the dashed lines in Figure 9). In this detection process, the image regions of the candidate object to be read are detected while excluding the image region of the plane on which the information code to be decoded is displayed. As illustrated in Figure 9, if a reading image has been captured, then with respect to that reading image, the image regions Sd1, Sd2, Sc3, and Sc4 are detected as candidate objects to be read, excluding the plane on which barcode B1 is displayed.

[0058] Then, in the phase difference information and displacement candidate direction information acquisition process of step S104, in the example of Figure 9, for image region Sd1, the pixel at the center (centroid position) of image region Sd1 is designated as the displacement destination candidate pixel Pd1, and the phase difference information and displacement candidate direction information Fd1 of the displacement destination candidate pixel Pd1 are acquired. Similarly, for image region Sd2, the pixel at the center of image region Sd2 is designated as the displacement destination candidate pixel Pd2, and the phase difference information and displacement candidate direction information Fd2 of the displacement destination candidate pixel Pd2 are acquired. For image region Sd3, the pixel at the center of image region Sd3 is designated as the displacement destination candidate pixel Pd3, and the phase difference information and displacement candidate direction information Fd3 of the displacement destination candidate pixel Pd3 are acquired. For image region Sd4, the pixel at the center of image region Sd4 is designated as the displacement destination candidate pixel Pd4, and the phase difference information and displacement candidate direction information Fd4 of the displacement destination candidate pixel Pd4 are acquired.

[0059] Based on the phase difference information acquired in this way, the focus amount is calculated for each (S105), and the displacement candidate direction information and focus amount are stored in the storage unit 12 (S106). Then, after successful decoding (Yes in S107), if any of the displacement candidate direction information is determined to be in a predicted displacement state (Yes in S109), focus control is performed according to the focus amount stored in the storage unit 12 in association with the displacement candidate direction information determined to be in a predicted displacement state (S110).

[0060] Even in this manner, because the information code is located in the displacement direction of the imaging field detected as imaging field displacement direction information Fm, focus control suitable for imaging the information code is performed according to the focus amount calculated in advance for that information code. For this reason, even in this embodiment, even when reading a large number of information codes continuously, the time required for focus control is shortened, and an information reading terminal 10 that can improve the reading feel can be realized. In particular, even if the next information code to be read is not displayed on the plane that has been focused, the time required for focus control can be shortened if the next information code to be read is displayed in the area outside the imaging area of ​​that plane.

[0061] In this embodiment, in the read candidate object detection process (S103), in order to carefully select the read candidate objects, image regions that can recognize the imaging of a plane on which character information is displayed, or image regions that can recognize the imaging of a plane on which an information code is displayed, rather than just a simple plane, may be detected as image regions of read candidate objects. In this case, in the example of Figure 9, image regions Sd1, Sd2, and Sc3 are detected as read candidate objects, while image region Sc4, which is unlikely to display an information code, is not detected as a read candidate object. By carefully selecting the displacement target candidate pixels in this way, the processing load for acquiring phase difference information and displacement candidate direction information can be reduced.

[0062] [Fourth Embodiment] Next, the information reading terminal according to this fourth embodiment will be described with reference to the drawings. This fourth embodiment differs from the first embodiment and others in that it calculates phase difference information for all pixels in the image to be read. Therefore, components that are substantially the same as those in the first embodiment are denoted by the same reference numerals, and their descriptions are omitted.

[0063] In this embodiment, after calculating phase difference information for all pixels in the read image captured by the imaging unit, a set of phase difference information and displacement candidate direction information is acquired for each group of phase difference information that is considered to be from imaging the same object. Since the phase difference information acquired at each pixel changes according to the distance to the object being imaged, image regions where phase difference information with almost the same value is concentrated, or where phase difference information with little change is concentrated, can be considered to be from imaging the same object.

[0064] Therefore, in the reading process performed by the control unit 11 of this embodiment, in the reading candidate object detection process in step S103, phase difference information is calculated for all pixels in the reading image, and then the image area of ​​the group of phase difference information that is considered to be from imaging the same object is detected as the image area of ​​the reading candidate object. In the example in Figure 9, in addition to the image areas Sd1 to Sd4, the image areas of the top and side surfaces of the object having the plane of image area Sd1, the image areas of the top and side surfaces of the object having the plane of image area Sd2, the image area of ​​the top surface of the object having the plane of image area Sd3, and the image areas of the top and side surfaces of the object having the plane of image area Sd4 are detected as the image areas of the reading candidate object. In this embodiment, the process for acquiring phase difference information for all pixels is performed by a chipset or the like having a phase difference AF sensor, and the control unit 11 acquires the phase difference information from this chipset or the like.

[0065] In step S104, the phase difference information and displacement candidate direction information acquisition process, one set of phase difference information (phase difference information at the displacement destination candidate pixel that is the center of the image area occupied by the phase difference information group) and displacement candidate direction information are acquired for each group of phase difference information. Based on the phase difference information acquired in this way, the focus amount is calculated (S105), and the displacement candidate direction information and focus amount are stored in the storage unit 12 (S106). Then, after successful decoding (Yes in S107), when the imaging field displacement direction information Fm is detected (S108), it is determined to be a predicted displacement state (Yes in S109), and focus control is performed according to the focus amount stored in the storage unit 12 in association with the displacement candidate direction information determined to be a predicted displacement state (S110).

[0066] Even in this manner, because the information code is located in the displacement direction of the imaging field detected as imaging field displacement direction information Fm, focus control suitable for imaging the information code is performed according to the focus amount calculated in advance for that information code. For this reason, even in this embodiment, even when reading a large number of information codes continuously, the time required for focus control is shortened, and an information reading terminal 10 that can improve the reading feel can be realized.

[0067] [Fifth Embodiment] Next, the information reading terminal according to this fifth embodiment will be described with reference to the drawings. In this fifth embodiment, the main difference from the first embodiment and others is that, in addition to the focus amount, the exposure conditions are also acquired in advance for the candidate pixels to be the displacement target. Therefore, components that are substantially the same as those in the first embodiment are denoted by the same reference numerals, and their descriptions are omitted.

[0068] If there is a difference in brightness between the display surface of the information code being read and the display surface of the next information code to be read, even if focus control suitable for imaging the next information code can be performed in advance, the reading feel may deteriorate because processing to change the exposure conditions is required. For example, as illustrated in Figure 10, if the next information code to be read is displayed on a candidate object located in the back in a relatively dark area, underexposure may occur even if appropriate focus control is performed.

[0069] Therefore, in this embodiment, exposure conditions are calculated based on the brightness information of the candidate displacement pixels, and the calculated exposure conditions and the focus amount calculated for the candidate displacement pixels are stored in the storage unit 12 in association with the candidate displacement direction information. Focus control and exposure control are then performed according to the focus amount and exposure conditions associated with the candidate displacement direction information that has been determined to be a predicted displacement state. As a result, for example, even if the display surface of the information code to be read is dark, exposure control suitable for imaging that information code can be performed in advance, and a decrease in reading feel due to insufficient exposure, etc., is suppressed.

[0070] The reading process performed by the control unit 11 in this embodiment will be described in detail below with reference to the flowchart shown in Figure 11. When the reading process is started in the control unit 11, similar to the first embodiment described above, an image region of a candidate object to be read is detected from the reading image during the decoding process (S103 in Figure 11), phase difference information and candidate displacement direction information are acquired (S104), and the focus amount is calculated (S105).

[0071] Next, the exposure condition calculation process shown in step S201 is performed, and for each candidate displacement target pixel acquired as described above, the exposure condition is calculated based on the brightness information of the candidate displacement target pixel. Once the exposure condition is calculated in this way, in the storage process shown in step S106, the phase difference information and candidate displacement direction information acquired as described above are associated with the calculated focus amount and exposure condition and stored in the storage unit 12. The control unit 11 that performs the above exposure condition calculation process may correspond to an example of an "exposure condition calculation unit".

[0072] Then, after successful decoding (Yes in S107), if any of the displacement candidate direction information is determined to be in a predicted displacement state (Yes in S109), focus control is performed according to the focus amount stored in the storage unit 12 in association with the displacement candidate direction information determined to be in a predicted displacement state (S110). Furthermore, exposure control is performed according to the exposure conditions stored in the storage unit 12 in association with the displacement candidate direction information determined to be in a predicted displacement state (S202).

[0073] As described above, in the information reading terminal 10 according to this embodiment, the acquired displacement candidate direction information is stored in the storage unit 12 in association with the focus amount calculated based on the corresponding phase difference information and the exposure conditions calculated based on the brightness information of the displacement target candidate pixel. When it is determined that a predicted displacement state exists, focus control and exposure control are performed according to the focus amount and exposure conditions stored in the storage unit 12 in association with the displacement candidate direction information determined to be a predicted displacement state.

[0074] This reduces not only the time required for focus control but also the time required for setting exposure conditions, thereby further improving the reading feel. Note that the exposure control in this embodiment may also be applied in other embodiments.

[0075] [Sixth Embodiment] Next, the information reading terminal according to this sixth embodiment will be described with reference to the drawings. This sixth embodiment differs from the first embodiment and others in that it detects the image region of the candidate object to be read, limited to the predicted imaging field displacement direction of the image for reading. Therefore, components that are substantially the same as those in the first embodiment are denoted by the same reference numerals, and their descriptions are omitted.

[0076] In tasks involving the repeated reading of information codes, there is a high probability of repeating similar actions. Therefore, based on the past movement status of the information reading terminal 10, it is possible to predict the direction of movement of the information reading terminal 10 when it moves next.

[0077] For example, as illustrated in Figure 12, if the reading operation is performed by reading the information codes on cardboard boxes arranged horizontally from left to right as viewed from the user, there is a high probability that the imaging field of view of the information reading terminal 10 will be shifted to the right towards the next information code to be read.

[0078] Therefore, in this embodiment, the detection results of the movement state of the information reading terminal 10, which are detected using a 3-axis acceleration sensor 16, etc., are sequentially stored in the storage unit 12, and based on these detection results, the direction in which the imaging field of view will be displaced is predicted, and processing is performed to detect the image region of a candidate object to be read from the reading image, limited to the predicted direction of displacement. The 3-axis acceleration sensor 16, etc., can be considered an example of a "movement state detection unit" that detects the movement state of the information reading terminal 10 and stores the detection results in the storage unit 12.

[0079] The reading process performed by the control unit 11 in this embodiment will be described in detail below with reference to the flowchart shown in Figure 13. When the reading process is started in the control unit 11, similar to the first embodiment, after the decoding process is started on the image to be read (S102 in Figure 13), the imaging field displacement direction prediction process shown in step S301 is performed. In this process, the direction of the imaging field that will be displaced is predicted as the imaging field displacement direction based on the movement state of the information reading terminal 10 stored in the storage unit 12, as will be described later. The control unit 11 that performs the above imaging field displacement direction prediction process may correspond to an example of a "prediction unit".

[0080] Next, the read candidate object detection process shown in step S103 is performed. In this embodiment, the process is limited to detecting the image region of the read candidate object from the read image in the direction of the predicted imaging field displacement as described above. In the example in Figure 12, since the direction of the imaging field displacement is predicted to be approximately to the right, as illustrated in Figure 14, in a read image in which barcode B4 can be read, the image region Se1 on the right side that resembles a barcode is detected as the image region of the read candidate object, while the image region on the left side that resembles a barcode is not detected as the image region of the read candidate object. Note that in Figure 12, the imaging range shown in Figure 14 is illustrated with a dashed line.

[0081] As described above, when the image region of the candidate object to be read is detected, phase difference information and candidate displacement direction information are acquired for the detected image region (S104), and the focus amount is calculated (S105). In the example in Figure 14, for the image region Se1 detected as described above, the pixel in the center of the image region Se1 is designated as the candidate displacement pixel Pe1, and phase difference information and candidate displacement direction information Fe1 for the candidate displacement pixel Pe1 are acquired.

[0082] Then, in the storage process shown in step S106, in addition to the displacement candidate direction information and focus amount, the detection result of the movement state of the information reading terminal 10, which is detected using the 3-axis acceleration sensor 16, is stored in the storage unit 12. In this way, the detection results of the movement state of the information reading terminal 10 are accumulated sequentially, and by using these accumulated detection results, the imaging field displacement direction can be predicted in the imaging field displacement direction prediction process.

[0083] Then, after successful decoding (Yes in S107), and when it is determined that the predicted displacement state is met (Yes in S109), focus control is performed according to the amount of focus stored in the memory unit 12 in association with the displacement candidate direction information that has been determined to be the predicted displacement state (S110).

[0084] As described above, in the information reading terminal 10 according to this embodiment, the direction in which the imaging field of view will be displaced is predicted based on the detection results of the information reading terminal 10 stored in the storage unit 12 (S301). Then, phase difference information and displacement candidate direction information are obtained for one or more candidate pixels in the image region of the reading image in the predicted displacement direction.

[0085] In this way, by detecting the image region in the predicted direction of displacement in the imaging field of view and setting the center of that image region as a candidate pixel for the displacement destination, it becomes less likely that a candidate pixel for the displacement destination will be set in an image region that is unlikely to be displaced. As a result, candidate pixels for the displacement destination are carefully selected, and the processing load for acquiring phase difference information and candidate displacement direction information can be reduced.

[0086] Furthermore, assuming that phase difference information and displacement candidate direction information are obtained for one displacement target candidate pixel in the image region of the image for reading in the predicted displacement direction, the first focus control in step S110 may be performed without performing the imaging field displacement direction detection process in step S108 and the determination process in step S109. In other words, instead of assuming multiple read candidate objects, one read candidate object may be assumed based on the estimated displacement candidate direction, and focus control may be performed according to that read candidate object. Also, the image region of the assumed read candidate object is not limited to an image region that resembles an information code, but may be an image region where a plane is assumed, as in the third embodiment described above.

[0087] The present invention is not limited to the embodiments described above, and may be further embodied as follows, for example. (1) In the phase difference information and displacement candidate direction information acquisition process of step S104, the pixel at the center (centroid position) of the image region of the detected read candidate object is not limited to being the displacement destination candidate pixel, but a pixel at a predetermined position may also be used as the displacement destination candidate pixel.

[0088] (2) The present invention is not limited to being used in general-purpose mobile terminals such as smartphones that have an autofocus function, but may also be used in dedicated terminals that optically read information codes, character information, etc. using an autofocus function. [Explanation of Symbols]

[0089] 10. Information reading terminal 11 Control Unit (Reading Unit, Acquisition Unit, Focus Amount Calculation Unit, Imaging Field of View Displacement Direction Detection Unit, Determination Unit, Exposure Condition Calculation Unit, Prediction Unit) 12 Storage section 13 Imaging Unit 16. 3-axis accelerometer (movement state detection unit) 21 Imaging Lens 22 Imaging elements 23 Lens drive unit B1-B3 Barcode (Information Code) Displacement candidate direction information for Fa1, Fa2, Fb1, Fb2, Fd1~Fd4, Fe1 Fm imaging field displacement direction information Candidate pixels for displacement: Pa1, Pa2, Pb1, Pb2, Pc1~Pc8, Pd1~Pd4, Pe1

Claims

1. Imaging unit, A control unit that performs focus control of the imaging unit, A reading unit performs a reading process to optically read the information code captured by the imaging unit while the focus is controlled, An information reading terminal equipped with, An acquisition unit that acquires phase difference information calculated for one or more candidate displacement destination pixels in an image captured by the imaging unit, and candidate displacement direction information from a predetermined reference point to the candidate displacement destination pixel in the image captured; A focus amount calculation unit calculates the focus amount based on the phase difference information acquired by the acquisition unit, A storage unit stores the displacement candidate direction information acquired by the acquisition unit in association with the focus amount calculated by the focus amount calculation unit based on the corresponding phase difference information. When the reading process is successful, the imaging field displacement direction detection unit detects the displacement direction of the imaging field by the imaging unit as imaging field displacement direction information, A determination unit that determines whether the candidate displacement direction information corresponding to the imaging field displacement direction information detected by the imaging field displacement direction detection unit is a predicted displacement state stored in the storage unit, Equipped with, The information reading terminal is characterized in that, when the control unit determines that the predicted displacement state is met, it performs focus control according to the amount of focus stored in the storage unit in association with the displacement candidate direction information that has been determined to be the predicted displacement state.

2. The information reading terminal according to claim 1, characterized in that the candidate pixels to be displaced are set to be included in an image region that can be recognized as an information code.

3. The information reading terminal according to claim 1, characterized in that the candidate pixels for displacement are set to be included in an image region in which imaging of a plane can be recognized.

4. The information reading terminal according to claim 1, characterized in that the candidate pixels for displacement are set to be included in an image region where imaging of a plane on which character information is displayed can be recognized.

5. The information reading terminal according to claim 1, characterized in that the acquisition unit calculates phase difference information for all pixels in the captured image in which the information code has been captured by the imaging unit, and then acquires one set of phase difference information and displacement candidate direction information for each group of phase difference information that is considered to be from imaging of the same object.

6. The system includes an exposure condition calculation unit that calculates exposure conditions based on the brightness information of the candidate pixels to be displaced, The storage unit stores the displacement candidate direction information acquired by the acquisition unit, associated with the focus amount calculated by the focus amount calculation unit based on the corresponding phase difference information and the exposure conditions calculated by the exposure condition calculation unit. The information reading terminal according to claim 1, characterized in that when the control unit determines that the predicted displacement state is met, it performs focus control and exposure control according to the focus amount and exposure conditions stored in the storage unit in association with the displacement candidate direction information determined to be the predicted displacement state.

7. A movement state detection unit that detects the movement state of the information reading terminal and stores the detection result in the storage unit, A prediction unit predicts the direction in which the imaging field of view captured by the imaging unit is displaced based on the detection results of the movement state detection unit stored in the memory unit, Equipped with, The information reading terminal according to claim 1, characterized in that the acquisition unit acquires phase difference information calculated for one or more candidate pixels in the image region of the image captured by the imaging unit in the displacement direction predicted by the prediction unit, and candidate displacement direction information from a predetermined reference point in the image captured image to the candidate pixels.