Imaging device, control method and program thereof
The imaging device automatically prioritizes capturing human faces or decoding two-dimensional codes based on their positions or sizes, addressing the inconvenience of manual mode switching and ensuring intended image capture.
Patent Information
- Application Number
- JP2021188047
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-11-18
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2041-11-18
AI Technical Summary
Existing imaging devices require users to manually switch modes to avoid unintentional reading of two-dimensional codes when both human faces and codes are present in the view, causing inconvenience.
An imaging device that automatically determines the priority between capturing a human face or decoding a two-dimensional code based on their relative positions or sizes within the field of view, preventing unintended code reading without user intervention.
Prevents unintended reading of two-dimensional codes by prioritizing the capture of human faces or displaying code information appropriately, enhancing user convenience.
Smart Images

Figure 0007753068000001 
Figure 0007753068000002 
Figure 0007753068000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to an imaging apparatus, a control method thereof, and a program. [Background technology]
[0002] In recent years, it has become possible to easily access web pages and detailed information by reading two-dimensional codes, which are optical code information printed on advertisements, instruction manuals, factory production management documents, etc., with a camera on a smartphone, tablet PC, etc. Patent Document 1 discloses a technology that switches the shooting procedure depending on the subject, such as a natural image or a two-dimensional code, and recognizes the two-dimensional code in the captured image when switched to two-dimensional code shooting. Furthermore, recent smartphones are also capable of recognizing both human faces and two-dimensional codes. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2007-318775 Summary of the Invention [Problem to be solved by the invention]
[0004] However, with the technology described in Patent Document 1, if you want to read a two-dimensional code, you need to change the settings to a two-dimensional code shooting mode. Also, in the normal shooting mode of recent smartphones, if both a human face and a two-dimensional code are recognized, the two-dimensional code will be read even if you want to photograph a human face, so you need to change to portrait mode to photograph a human face without recognizing the two-dimensional code.
[0005] To prevent a two-dimensional code from being read unintentionally by a user when the code is present within a photographing angle of view, without requiring the user to perform any operations. [Means for solving the problem]
[0006] The imaging device according to the present invention comprises: an acquisition means for acquiring an image; a first detection means for detecting a specific subject from the image; Code Image a second detecting means for detecting the a decoding means for performing a decoding process on the code image to obtain predetermined information associated with the code image; and, Place a processing means for executing the process; By acquisition means The distance from the center of the photographing angle of view of the acquired image to the area where the specific subject is detected and the distance from the center of the photographing angle of view of the acquired image to the area where the specific subject is detected are calculated. Code Image Distance to the detected area Get away Comparison means to compare and 、 and the processing means By comparative means Comparison results However, when the distance from the center of the photographing angle of view of the acquired image to the area where the specific subject is detected is equal to or greater than the distance from the center of the photographing angle of view of the acquired image to the area where the code image is detected, Processing based on the predetermined information and when the distance from the center of the photographing angle of view of the acquired image to the area where the specific subject is detected is less than the distance from the center of the photographing angle of view of the acquired image to the area where the code image is detected, executes a photographing preparation process related to the specific subject. It is characterized by carrying out [Effects of the Invention]
[0007] According to the present invention, when a two-dimensional code is present within the shooting field of view, it is possible to prevent the two-dimensional code from being read at times unintended by the user, without requiring the user to perform any operations. [Brief explanation of the drawings]
[0008] [Figure 1] 1A and 1B are a front view and a rear view illustrating an appearance of a smartphone according to an embodiment. [Figure 2] FIG. 1 is a block diagram showing a schematic configuration of a smartphone. [Figure 3] 10 is an example of an image displayed on a display when an image is captured by an outer camera. [Figure 4] 10 is a flowchart showing operation control of the smartphone according to the first embodiment. [Figure 5] 10 is a flowchart showing operation control of a smartphone according to a second embodiment. [Figure 6] 10 is a flowchart showing operation control of a smartphone according to a third embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0009] Hereinafter, an embodiment of the present invention will be described in detail with reference to the accompanying drawings. Here, a smartphone will be taken as an example of an imaging device according to the present invention, but the present invention is not limited to smartphones.
[0010] FIG. 1(a) is a front (front) view showing the appearance of a smartphone 100 according to an embodiment, and FIG. 1(b) is a rear view showing the appearance of the smartphone 100. As shown in FIG.
[0011] A display 105, a touch panel 106a, a speaker 112b, an inner camera 115, and a home button 106e are arranged on the front surface (first surface) of the smartphone 100. The touch panel 106a is arranged superimposed on the display 105.
[0012] An audio output terminal 112a is provided on the bottom surface of the smartphone 100. A power button 106b, a volume up button 106c, and a volume down button 106d are provided on the side surface of the smartphone 100. An outer camera 114 is provided on the back surface (second surface) of the smartphone 100. The outer camera 114 is a multi-lens camera including a telephoto camera 114a, a standard camera 114b, and an ultra-wide-angle camera 114c. Note that the layout of the telephoto camera 114a, the standard camera 114b, and the ultra-wide-angle camera 114c in the outer camera 114 shown in FIG. 1(b) is one example, and a different layout may also be used. The functions of these components of the smartphone 100 will be described together with the block diagram showing the schematic configuration of the smartphone 100 shown in FIG. 2.
[0013] 2 is a block diagram showing a schematic configuration of the smartphone 100. The smartphone 100 has a CPU 201, a memory 202, a nonvolatile memory 203, a display 105, an attitude detection unit 213, an operation unit 106, a storage medium I / F 207, an external I / F 209, a communication I / F 210, and an audio output unit 112. The smartphone 100 also has an outer camera 114, an inner camera 115, an outer camera image processing unit 214, and an inner camera image processing unit 215. These units included in the smartphone 100 are connected to an internal bus 250 and configured to be able to exchange data with each other via the internal bus 250.
[0014] The CPU 201 is a control means that performs overall control of the smartphone 100, and is composed of at least one processor or circuit. The memory 202 is, for example, a RAM. The non-volatile memory 203 stores image data, audio data, other data, various programs for the operation of the CPU 201, and the like. The non-volatile memory 203 is composed of, for example, a flash memory or a ROM. The CPU 201 loads the programs stored in the non-volatile memory 203 into a work area of the memory 202, thereby comprehensively controlling the operation of each unit of the smartphone 100.
[0015] Display 105 is a display device such as a liquid crystal display or an organic EL display, and displays captured images, GUI screens, and the like under the control of CPU 201. For example, CPU 201 generates a display control signal according to a program, and controls each unit of smartphone 100 to generate an image (video) signal for displaying predetermined information on display 105 and output the image to display 105. Display 105 displays video based on the image signals output from each unit of smartphone 100. In addition, images (live view images) currently being captured by in-camera 115 and out-camera 114 can be displayed on display 105. In other words, the user can capture images while checking the live view images displayed on display 105.
[0016] Operation unit 106 includes touch panel 106a, power button 106b, volume up button 106c, volume down button 106d, and home button 106e. Touch panel 106a is configured as a plane overlaid on display 105, detects touch operations on the display surface (operation surface) of display 105, and outputs the contact position of the touch operation as coordinate information to CPU 201. In addition, a keyboard, icons, etc. displayed on display 105 function as part of operation unit 106 when operated on touch panel 106a.
[0017] The touch panel 106a may be any of a variety of touch panels, such as a resistive film type, a capacitance type, a surface acoustic wave type, an infrared type, an electromagnetic induction type, an image recognition type, an optical sensor type, etc. The touch operation on the touch panel 106a may be detected by either a type that detects a touch based on actual contact (contact type) or a type that detects a touch based on proximity (non-contact type).
[0018] The power button 106b is an operating means for switching the display 105 on and off, and is also an operating means for switching the power of the smartphone 100 on and off by continuously pressing it for a certain period of time (for example, 3 seconds) (so-called long press). The volume plus button 106c and the volume minus button 106d are operating means for adjusting the volume output from the audio output unit 112. Pressing the volume plus button 106c increases the output volume, and pressing the volume minus button 106d decreases the output volume. Furthermore, when the camera is in a shooting standby state, the volume plus button 106c and the volume minus button 106d function as shutter buttons for issuing a shooting command. Note that the user of the smartphone 100 can set specific functions to be executed by simultaneously pressing the power button 106b and the volume minus button 106d, or by quickly pressing the volume minus button 106d several times.
[0019] The home button 106e is an operating means for displaying a home screen, which is a startup screen of the smartphone 100, on the display 105. When the user has launched and is using various applications on the smartphone 100, the user can press the home button 106e to temporarily close the launched applications and display the home screen. Note that although the home button 106e is shown here as a physically pressable button, it is not limited to this and may be a button that is displayed on the display 105 and functions in the same way when touched.
[0020] The audio output unit 112 includes an audio output terminal 112a and a speaker 112b. The speaker 112b outputs audio of video and music data, operation sounds, ringtones, various notification sounds, etc. The audio output terminal 112a is a terminal (a so-called headphone jack) that outputs audio signals to headphones, earphones, external speakers, etc. If an audio output device such as headphones is not connected to the audio output terminal 112a, audio is output from the speaker 112b. Note that audio may be output via wireless communication, etc., and an example of audio output to a speaker, earphones (headphones), etc. via Bluetooth (registered trademark) is an example.
[0021] The storage medium 108 is, for example, a memory card attached to the main body of the smartphone 100, or an internal storage incorporated in the smartphone 100. The storage medium I / F 207 is an interface for reading data from the storage medium 108 and writing data to the storage medium 108 under the control of the CPU 201. The external I / F 209 is an interface for communicatively connecting the smartphone 100 to an external device via a connection cable or by wireless communication, and for inputting and outputting video signals, audio signals, etc. The communication I / F 210 is an interface for connecting to a communication network such as the Internet 211.
[0022] The attitude detection unit 213 detects the attitude of the smartphone 100 with respect to the direction of gravity, and the tilt and rotation of the smartphone 100 with respect to each of the yaw, roll, and pitch axes. Based on the detection signal of the attitude detection unit 213, it is possible to determine whether the smartphone 100 is held in a landscape or portrait orientation, whether the surface of the display 105 is facing up or down, whether the smartphone 100 is in an oblique orientation, etc. The attitude detection unit 213 can use at least one of an acceleration sensor, a gyro sensor, a geomagnetic sensor, a direction sensor, an altitude sensor, etc., and a combination of two or more sensors may also be used.
[0023] In the outer camera 114, a lens and an imaging element are arranged in each of the telephoto camera 114a, the standard camera 114b, and the ultra-wide-angle camera 114c. The focal length of the telephoto camera 114a is longer than that of the standard camera 114b, and using the telephoto camera 114a allows for a more magnified image of a more distant subject than when using the standard camera 114b. The focal length of the ultra-wide-angle camera 114c is shorter than that of the standard camera 114b, and therefore using the ultra-wide-angle camera 114c allows for a wider range of image to be captured than when using the standard camera 114b. In other words, the focal lengths of the telephoto camera 114a, the standard camera 114b, and the ultra-wide-angle camera 114c become shorter in this order, and the imaging angle of view becomes wider accordingly. The inner camera 115 has, for example, a zoom lens with a focal length equivalent to that of the standard camera 114b.
[0024] In this embodiment, telephoto camera 114a, standard camera 114b, and ultra-wide-angle camera 114c each have a lens with a mechanism that optically magnifies the image to a predetermined magnification. However, without being limited to this, telephoto camera 114a, standard camera 114b, and ultra-wide-angle camera 114c may have a zoom function that can continuously change the shooting angle of view between the telephoto side and the wide-angle side, or may have a mechanism that allows the user to change the magnification.
[0025] Telephoto camera 114a, standard camera 114b, and ultra-wide-angle camera 114c can simultaneously perform imaging operations. Also, imaging operations can be performed simultaneously using two cameras selected by the user from telephoto camera 114a, standard camera 114b, and ultra-wide-angle camera 114c, or imaging operations can be performed using only one camera selected by the user.
[0026] Both the LV images obtained through the outer camera 114 and the inner camera 115 can be displayed on the display 105. In this case, by operating the touch panel 106a, it is possible to select which lens is used to display the image captured on the display 105. For example, if the telephoto camera 114a is selected, an image that is more enlarged than that of the standard camera 114b can be displayed on the display 105. Furthermore, if the standard camera 114b is selected, an image that is wider in angle than that of the telephoto camera 114a and more enlarged than that of the ultra-wide-angle camera 114c can be displayed. If the ultra-wide-angle camera 114c is selected, an image that is wider in angle than both the telephoto camera 114a and the standard camera 114b can be displayed. Generally, the outer camera 114 is used to capture a scene in front of the user, and the inner camera 115 is often used to capture an image of the user themselves, i.e., a selfie.
[0027] The in-camera image processing unit 215 performs various types of image processing and object recognition processing on the image (video) captured by the in-camera 115 under the control of the CPU 201. The out-camera image processing unit 214 performs various types of image processing and object recognition processing on the image captured by the out-camera 114 under the control of the CPU 201. The out-camera image processing unit 214 also performs decoding processing, which is a series of processes that detects the characteristics of a two-dimensional code (described later), determines whether or not the characteristics are present, and then acquires information associated with the two-dimensional code. The decoding processing will be described below when discussing QR Code (registered trademark). Note that, although a two-dimensional code is used as an example in this embodiment, the description is not limited to this, and any graphic image indicating an identifier, such as a one-dimensional code or a figure, may be used.
[0028] The outer camera image processing unit 214 has a telephoto camera image processing unit 214a, a standard camera image processing unit 214b, and an ultra-wide-angle camera image processing unit 214c. The telephoto camera image processing unit 214a processes images captured through the telephoto camera 114a. Similarly, the standard camera image processing unit 214b processes images captured through the standard camera 114b, and the ultra-wide-angle camera image processing unit 214c processes images captured through the ultra-wide-angle camera 114c.
[0029] In this embodiment, a camera image processing unit is provided for each of the three lenses of the outer camera 114, but the present invention is not limited to this configuration. For example, one camera image processing unit may be provided for two of the three lenses and one camera image processing unit may be provided for the remaining lens, or one camera image processing unit may be provided for three lenses.
[0030] The out-camera image processing unit 214 and the in-camera image processing unit 215 can also perform various types of image processing on images stored in the non-volatile memory 203 or the storage medium 108, video signals acquired via the external I / F 209, images acquired via the communication I / F 210, etc. The image processing performed by the out-camera image processing unit 214 and the in-camera image processing unit 215 includes A / D conversion processing, D / A conversion processing, image data encoding processing, compression processing, decoding processing, enlargement / reduction processing (resizing), noise reduction processing, color conversion processing, etc.
[0031] Note that out-camera image processing unit 214 and in-camera image processing unit 215 may be configured as dedicated circuit blocks for performing specific image processing. Alternatively, out-camera image processing unit 214 and in-camera image processing unit 215 may be integrated into a single processing block that handles images obtained through each lens by parallel processing or time-division processing. Also, depending on the type of image processing, it is possible to configure CPU 201 to perform image processing according to a program instead of out-camera image processing unit 214 and in-camera image processing unit 215.
[0032] Here, we will explain two-dimensional codes. Two-dimensional codes include one-dimensional codes (e.g., barcodes) that have information only in the horizontal direction, and display-type codes that have information in both the horizontal and vertical directions. Two-dimensional codes are divided into matrix and stack types, with QR codes being representative examples of matrix types and PDF417 being representative examples of stack types. Two-dimensional codes can hold more information than one-dimensional codes, and QR codes in particular can store data in multiple languages, including not only numbers but also English letters and Chinese characters. Furthermore, unlike other two-dimensional codes, QR codes do not require a dedicated reading device and can be read using a camera (digital camera) installed in a mobile phone, smartphone, or the like. Note that "reading a QR code" refers to the process of detecting the QR code from an image captured by the camera, performing the decoding process described below, and displaying the results on display 105.
[0033] In recent years, QR codes have been widely printed or displayed on advertisements, instruction manuals, and other media (including not only paper but also digital media). For example, by scanning a QR code, a user can easily access a web page linked to the QR code and obtain information. In this case, even if part of the QR code cannot be read or is read incorrectly, the QR code contains redundant code to correct the error, making the QR code resistant to dirt and distortion. Taking advantage of this feature, QR codes are widely used in production sites such as manufacturing factories to manage production lines.
[0034] Furthermore, as electronic payments are increasingly replacing cash payments, the use of QR code payments, in which QR codes are read with smartphones (electronic information terminals), is also expanding. Therefore, there is a need for technical support on the electronic information terminal side to ensure that QR codes can be read smoothly when making QR code payments.
[0035] A QR code is an approximately square pattern image (symbol (see Figure 3)) formed by arranging small square cells vertically and horizontally. A QR code is created by encoding various symbols such as numbers, letters, and kanji, and then combining the cells and their arrangement. Currently, QR codes range in size from 21 x 21 cells (vertical x horizontal) to 177 x 177 cells (in increments of 4 cells), and the more cells there are, the more information they can hold.
[0036] A QR code symbol has a pattern called a cutout symbol placed in three corners, and camera applications on smartphones and other devices recognize it as a QR code by detecting the cutout symbol in the image being captured. Specifically, the cutout symbol is detected from the image being captured, and the size of the QR code is determined based on the detected cutout symbol. The cell distribution pattern within the detected QR code size is detected, and the detected distribution pattern is decoded to read the information contained in the QR code. The series of processes from detecting the cutout symbol in the captured image, detecting the cell distribution pattern, and reading the information is called the decoding process.
[0037] In the smartphone 100, the CPU 201 not only recognizes and detects the size of the QR code based on the cut-out symbol, but also detects the tilt and distortion of the QR code. The CPU 201 also determines whether the QR code is within the shooting range by recognizing the cut-out symbol.
[0038] In order to correctly read the information contained in a QR code, it is necessary to accurately capture the distribution pattern formed by the cells of the QR code. However, when capturing an image of a QR code using the smartphone 100, the cell distribution pattern may not be accurately recognized due to reasons such as the camera (generally the outer camera 114) of the smartphone 100 being too far from the QR code or the location where the image was captured being dark. In this case, it may not be possible to perform a decoding process on the QR code, and a situation may arise in which the information cannot be correctly read from the QR code. Therefore, it is necessary to clearly and accurately capture the cell distribution pattern and obtain a captured image.
[0039] First Embodiment In the first embodiment, a control method is described in which, when a specific subject and a two-dimensional code are present within the angle of view of the smartphone 100, it is automatically determined whether or not to read the two-dimensional code based on the positions of the specific subject and the two-dimensional code.
[0040] In the control methods according to not only the first embodiment but also the second and third embodiments described below, if a two-dimensional code (specifically, a QR code) is present within the imaging range, the two-dimensional code is captured without any problems. The specific subject is assumed to be a person's face, for example. An example of a specific subject and a two-dimensional code existing within the imaging angle of view is an image captured when photographing a poster, instruction manual, or the like. In such cases, the outer camera 114 is generally used, and therefore, the image is captured using the standard camera 114b. However, the telephoto camera 114a or the ultra-wide-angle camera 114c may be used instead of the standard camera 114b.
[0041] 3A to 3F are diagrams showing examples of image display displayed on the display 105 when an image is captured by the outer camera 114. Details of each of the image display examples in Figs. 3A to 3F will be explained appropriately when explaining the flowcharts in Figs. 4 to 6.
[0042] Fig. 4 is a flowchart showing operation control according to the first embodiment of the smartphone 100. Each process (step) indicated by an S number in the flowchart of Fig. 4 is realized by the CPU 201 loading a predetermined program stored in the nonvolatile memory 203 into the memory 202 and comprehensively controlling the operation of each unit of the smartphone 100.
[0043] First, a camera application is started on the smartphone 100, and in S400 the CPU 201 drives the standard camera 114b to acquire a captured image (live view image) and enters a shooting standby state. However, this is not limited to the camera application, and the shooting standby state may also be when a two-dimensional code reading function of an application for decoding a two-dimensional code is started.
[0044] In S401, the CPU 201 determines whether or not an object resembling an optical code image (i.e., a two-dimensional code) has been detected from the captured image by the standard camera image processing unit 214b. If the CPU 201 determines that an object resembling a two-dimensional code has not been detected (No in S401), the process proceeds to S407, and if the CPU 201 determines that an object resembling a two-dimensional code has been detected (Yes in S401), the process proceeds to S402.
[0045] In S402, the CPU 201 determines whether or not a person's face has been detected from the captured image by the standard camera image processing unit 214b. If the CPU 201 determines that a face has been detected (Yes in S402), the process proceeds to S403.
[0046] In S403, CPU 201 compares the position of the two-dimensional code detected in S401 with the position of the face detected in S402, and determines whether the distance from the center of the shooting angle of view to the face is equal to or greater than the distance from the center of the shooting angle of view to the two-dimensional code. If CPU 201 determines that the distance from the center of the shooting angle of view to the face is less than the distance from the center of the shooting angle of view to the two-dimensional code (No in S403), CPU 201 proceeds to S404. Note that in this embodiment, the distance from the center of the two-dimensional code area to the center of the shooting angle of view is compared with the distance from the center of the face area to the center of the shooting angle of view. However, the determination in S403 may be made by comparing the distance from the vertex of each area that is farthest from the center of the angle of view to the center of the shooting angle of view, instead of the center of the two-dimensional code area or the center of the face area.
[0047] In S404, the CPU 201 performs various controls such as AE (automatic exposure control), WB (white balance control), and AF (automatic focusing control) on the face area detected in S402, and then proceeds to S407. Fig. 3(a) shows an example of an image displayed on the display 105 when S404 is executed. The CPU 201 displays a detection frame 302 for the face 301 because the face 301 is located closer to the center of the shooting angle of view than the two-dimensional code 303. Note that while the process proceeds from S404 to S407, a release process may be performed to save the captured image as image data, but a description of this will be omitted.
[0048] If the CPU 201 determines in S402 that a face has not been detected (No in S402), and if the CPU 201 determines in S403 that the distance from the center of the shooting angle of view to the face is equal to or greater than the distance from the center of the shooting angle of view to the two-dimensional code (Yes in S403), the CPU 201 proceeds to S405.
[0049] In S405, the CPU 201 performs a decoding process to obtain information associated with the two-dimensional code, and then proceeds to S406. Fig. 3(b) shows an example of an image displayed on the display 105 when S405 is executed. Because the two-dimensional code 303 is located closer to the center of the shooting angle of view than the face 301, the CPU 201 displays a detection frame 302 for the two-dimensional code 303.
[0050] In S406, the CPU 201 executes processing using the result obtained by the decoding process in S405, i.e., the information associated with the two-dimensional code. In this embodiment, if the information associated with the two-dimensional code 303 is a URL indicating the destination of a web page, the CPU 201 accesses the URL in accordance with a web browser application program and controls the display 105 to display the web page. The CPU 201 may also display a screen, such as a dialog box 306 shown in FIG. 3C, that displays the URL associated with the two-dimensional code 303 and asks the user whether to access the URL and switch from displaying a live view image in a shooting standby state to displaying a web page. When the CPU 201 detects a touch on the open guide 304, the CPU 201 accesses the URL and controls the display 105 to display the web page. On the other hand, when the CPU 201 detects a touch on the reacquisition guide 305, the user often does not want to switch to displaying a web page or wants to read the two-dimensional code again, so the CPU 201 returns the smartphone 100 to a shooting standby state. As a result, the display on the display 105 returns to the screen shown in FIG. 3(a), for example.
[0051] In this embodiment, a dialog box 306 is displayed as a confirmation screen to ask the user whether or not to access a URL or switch to displaying a web page. Alternatively, after the two-dimensional code is read (after the decoding process is completed), the URL indicated by the information contained in the two-dimensional code may be accessed without displaying the confirmation screen, and the web page may be automatically opened and displayed on the display 105. Alternatively, the user may be allowed to set whether to display the confirmation screen or to immediately open the web page without displaying the confirmation screen. Furthermore, if the read two-dimensional code contains text information or the like as a result of the decoding process in S405, the text information contained in the two-dimensional code may be displayed in the dialog box 306 instead of the URL or the like.
[0052] In this embodiment, a form in which various information can be read using an application capable of reading various two-dimensional codes is described. However, a situation in which an application capable of reading only two-dimensional codes containing specific information is also envisioned. When an application capable of reading only specific two-dimensional codes is used, even if a two-dimensional code other than the specific two-dimensional code is within the imaging field of view, the two-dimensional code may not be recognized. In this case, the image capture standby state continues. On the other hand, even if a two-dimensional code is detected in the captured image, it may not be possible to perform decoding processing. In this case, it is desirable to display an error message in the dialog box 306 indicating that the code cannot be read.
[0053] In addition, in S406, CPU 201 may execute, for example, a billing process instead of displaying a web page as a process using information associated with the two-dimensional code. CPU 201 controls display 105 to display information necessary for the payment procedure in accordance with a billing application program. In this case, the information associated with two-dimensional code 303 may indicate the store to which the fee is to be paid, or the type of payment service provider and the corresponding billing application program.
[0054] In S407, the CPU 201 determines whether the shooting standby state has ended. The shooting standby state is determined to have ended when an operation to close the camera application is performed, or when the display on the display 105 transitions to a screen other than the shooting standby screen, such as a web page, as a result of the decoding process performed in S405.
[0055] If the CPU 201 determines that the shooting standby state has not ended (No in S407), it returns the process to S401, and if it determines that the shooting standby state has ended (Yes in S407), it ends this process.
[0056] As explained above, according to the first embodiment, when a person and a two-dimensional code are within the shooting angle of view, the one closer to the center of the shooting angle of view is given priority, and the corresponding processing is executed. This prevents the two-dimensional code from being read unintentionally by the user, enabling comfortable shooting.
[0057] Second Embodiment In the second embodiment, a control method is described in which, when a face and a two-dimensional code are present within the shooting angle of view, it is automatically determined whether or not to read the two-dimensional code based on the number and size of the faces and the size of the two-dimensional code.
[0058] Fig. 5 is a flowchart showing operation control according to the second embodiment of the smartphone 100. Each process (step) indicated by an S number in the flowchart of Fig. 5 is realized by the CPU 201 loading a predetermined program stored in the nonvolatile memory 203 into the memory 202 and comprehensively controlling the operation of each unit of the smartphone 100.
[0059] The processes in S500 to S502 and S504 to S507 in the flowchart of FIG. 5 are the same as the processes in S400 to S402 and S404 to S407 in the flowchart of FIG. 4, and therefore a description thereof will be omitted.
[0060] If it is determined that a two-dimensional code and a face are present within the photographing field of view (Yes in S501 and S502), the CPU 201 advances the process to S503. In S503, the CPU 201 determines whether the size (area) of the detected face region is less than the size (area) of the detected two-dimensional code region and whether the number of detected faces is less than a predetermined value (hereinafter referred to as the "default value"). If the CPU 201 determines that the size of the face region is equal to or greater than the size of the two-dimensional code region or the number of faces is equal to or greater than the default value (No in S503), it infers that the user does not intend to read the two-dimensional code, and advances the process to S504. On the other hand, if the CPU 201 determines that the size of the face region is less than the size of the two-dimensional code region and the number of faces is less than the default value (Yes in S503), it infers that the user intends to read the two-dimensional code, and advances the process to S505.
[0061] Fig. 3(d) shows an example of a display on the display 105 when the size of the face area is larger than the two-dimensional code, and Fig. 3(e) shows an example of a display when the number of detected faces is larger than a default value (here, the default value = 1). In these cases, the two-dimensional code is not read, and an image capture preparation operation is performed in S504.
[0062] As explained above, according to the second embodiment, when a person and a two-dimensional code are within the shooting angle of view, the system determines whether the user intended to photograph a person or read a two-dimensional code based on the results of comparing the size and number of the person's faces with the two-dimensional code. This prevents the two-dimensional code from being read when the user does not intend, enabling comfortable shooting.
[0063] In the second embodiment, the determination in S503 determines whether to capture an image of a face or decode the two-dimensional code using two determination conditions: a first determination condition that compares the size of the face and the two-dimensional code, and a second determination condition that compares the number of faces with a predetermined value. In this case, the conditions for proceeding to S504 are lenient, while the conditions for proceeding to S505 are strict. However, whether to capture an image of a face or decode the two-dimensional code may be determined only by the first determination condition or only by the second determination condition.
[0064] Third Embodiment In the third embodiment, when a face and a two-dimensional code are present within the photographing angle of view, a control will be described in which the two-dimensional code is read and the display of the read result of the two-dimensional code is changed in accordance with the face detection result. Fig. 6 is a flowchart showing the operation control according to the third embodiment in the smartphone 100. Each process (step) indicated by an S number in the flowchart of Fig. 6 is realized by the CPU 201 loading a predetermined program stored in the non-volatile memory 203 into the memory 202 and comprehensively controlling the operation of each unit of the smartphone 100.
[0065] The processes of S600 to S603 and S606 in the flowchart of FIG. 6 are the same as the processes of S400, S401, S405, S402 and S407 in the flowchart of FIG. 4, respectively, and therefore a description thereof will be omitted.
[0066] If the CPU 201 determines in S603 that a face is present within the photographic field of view (Yes in S603), the process proceeds to S604. In S604, the CPU 201 displays the result of the decoding in S602 in a small size on the display 105, and then proceeds to S606. Fig. 3(f) shows an example of the display on the display 105 when a two-dimensional code is read and a face is present within the photographic field of view. Note that, although the decoded result is displayed in a small size on the display 105 here, the decoded result may be configured not to be displayed.
[0067] If the CPU 201 determines in S603 that there is no face within the photographing angle of view (No in S603), the process proceeds to S605. In S605, the CPU 201 displays the result of decoding in S602 in a large size on the display 105, and then the process proceeds to S606. In this case, the display example on the display 105 is the same as that shown in FIG. 3(c).
[0068] As explained above, according to the third embodiment, when a person and a two-dimensional code are within the shooting angle of view, the decoded result of the two-dimensional code is displayed in small size. This prevents the user from losing sight of the main subject (person) that they want to photograph, even if the two-dimensional code is read at a time when the user does not intend, thereby enabling comfortable shooting.
[0069] While the present invention has been described in detail above based on preferred embodiments thereof, the present invention is not limited to these specific embodiments, and various forms within the scope of the gist of the present invention are also included in the present invention. Furthermore, each of the above-described embodiments merely represents one embodiment of the present invention, and each embodiment can be combined as appropriate.
[0070] For example, the smartphone 100 may have the determination function of S403 in the first embodiment and the determination function of S503 in the second embodiment. However, in that case, it is expected that the determination result of S403 and the determination result of S503 may be reversed. For example, there may be a case where the distance from the center of the shooting angle of view to the two-dimensional code is short, but the face is larger than the two-dimensional code. Even in this situation, by determining in advance as a default setting or by user setting which of the determinations of S403 and S503 should be prioritized, it is possible to capture an image of a specific subject or read a two-dimensional code.
[0071] For example, in the above embodiment, the present invention has been described as being applied to a smartphone 100, but the imaging device according to the present invention includes electronic devices equipped with a display and imaging means, and the present invention can be applied to, for example, tablet PCs, PDAs, digital cameras, etc. Needless to say, depending on the electronic device to which the present invention can be applied, the members constituting the operation means for operating the electronic device will have a configuration different from that of the operation unit 106 shown in FIG. 2. Furthermore, the configuration related to video output of the electronic device according to the present invention may be such that an external monitor is used as the display (display device), and the configuration may be limited to an interface for outputting a video signal to be displayed on the display.
[0072] The present invention can also be realized by supplying a program that realizes one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program. It can also be realized by a circuit (e.g., ASIC) that realizes one or more functions. [Explanation of symbols]
[0073] 100 smartphones 105 Display 114 Outer Camera 114b Standard Camera 201 CPU 214 Out-camera image processing unit 214b Standard camera image processing unit
Claims
1. an acquisition means for acquiring an image; a first detection means for detecting a specific subject from the image acquired by the acquisition means; a second detection means for detecting a code image from the acquired image; a decoding means for performing a decoding process on the code image to obtain predetermined information associated with the code image; processing means for executing processing; a comparison means for comparing a distance from the center of the photographing angle of view of the acquired image to an area where the specific subject is detected with a distance from the center of the photographing angle of view of the acquired image to an area where the code image is detected, the processing means executes processing based on the predetermined information acquired by the decoding means when the result of the comparison by the comparison means shows that the distance from the center of the shooting angle of view of the acquired image to the area where the specific subject is detected is equal to or greater than the distance from the center of the shooting angle of view of the acquired image to the area where the code image is detected, and executes shooting preparation processing related to the specific subject when the distance from the center of the shooting angle of view of the acquired image to the area where the code image is detected is less than the distance from the center of the shooting angle of view of the acquired image to the area where the code image is detected.
2. 2. The imaging device according to claim 1, wherein, when a result of the comparison by the comparison means indicates that the distance from the center of the angle of view of the captured image to the area where the specific subject is detected is equal to or greater than the distance from the center of the angle of view of the captured image to the area where the code image is detected, the decoding means reads predetermined information from the code image.
3. An acquisition means for acquiring an image; a first detection means for detecting a specific subject from the image; a second detecting means for detecting a code image from the image; a decoding means for performing a decoding process on the code image to obtain predetermined information associated with the code image; processing means for executing processing; a comparison means for comparing the size of the area in which the specific subject is detected with the size of the area in which the code image is detected, the processing means executes processing based on the predetermined information acquired by the decoding means when the result of the comparison by the comparison means shows that the size of the area where the specific subject is detected is smaller than the size of the area where the code image is detected, and executes photographing preparation processing related to the specific subject when the size of the area where the specific subject is detected is equal to or larger than the size of the area where the code image is detected.
4. An imaging device as described in Claim 3, characterized in that when the result of comparison by the comparison means is that the size of the area in which the specific subject is detected is less than the size of the area in which the code image is detected, the decoding means reads specified information from the code image.
5. an acquisition means for acquiring an image; a first detection means for detecting a specific subject from the image; a second detecting means for detecting a code image from the image; a decoding means for performing a decoding process on the code image to obtain predetermined information associated with the code image; processing means for executing processing; a comparison means for comparing the number of the specific subjects detected by the first detection means with a predetermined value, The processing means executes processing based on the predetermined information acquired by the decoding means when the result of the comparison by the comparison means shows that the number of the detected specific subjects is less than a predetermined value, and executes shooting preparation processing related to the specific subjects when the result of the comparison shows that the number of the detected specific subjects is equal to or greater than a predetermined value.
6. 6. The imaging apparatus according to claim 1, wherein the specific subject is a human face.
7. The imaging device described in Claim 6, characterized in that the shooting preparation processing is AF processing for the facial area of the person who is the specific subject.
8. An imaging device as described in any one of claims 1 to 7, characterized in that the processing means does not perform the shooting preparation processing when performing processing based on the specified information obtained by the decoding means.
9. The processing means controls displaying the image acquired by the acquisition means on a display, 9. The imaging device according to claim 1, wherein the processing means controls the display so that, when the processing based on the predetermined information is executed, the result of the processing is displayed on the display.
10. The imaging device described in Claim 9, characterized in that the processing means performs processing based on the specified information obtained by the decoding means to display the specified information on the display.
11. The imaging device described in Claim 9 or 10, characterized in that, in processing based on the specified information acquired by the decoding means, if the specified information is a URL indicating the destination of a web page, the processing means performs a process of displaying a screen on the display to allow the user to select whether or not to access the URL and switch to displaying the web page.
12. A control method for an imaging device, comprising: an image acquisition step of acquiring an image; a first detection step of detecting a specific subject from the image acquired in the image acquisition step; a second detection step of detecting a code image from the acquired image; an information acquisition step of acquiring predetermined information associated with the code image by performing a decoding process on the code image; a processing step for performing a process; a comparison step of comparing a distance from the center of the photographing angle of view of the acquired image to an area where the specific subject is detected with a distance from the center of the photographing angle of view of the acquired image to an area where the code image is detected, a control method for an imaging device, characterized in that, in the processing step, if the result of the comparison in the comparison step is that the distance from the center of the shooting angle of view of the acquired image to the area where the specific subject is detected is equal to or greater than the distance from the center of the shooting angle of view of the acquired image to the area where the code image is detected, a processing based on the predetermined information acquired in the information acquisition step is executed, and if the distance from the center of the shooting angle of view of the acquired image to the area where the specific subject is detected is less than the distance from the center of the shooting angle of view of the acquired image to the area where the code image is detected, a shooting preparation process related to the specific subject is executed.
13. A control method for an imaging device, comprising: an image acquisition step of acquiring an image; a first detection step of detecting a specific subject from the image acquired in the image acquisition step; a second detection step of detecting a code image from the acquired image; an information acquisition step of acquiring predetermined information associated with the code image by performing a decoding process on the code image; a processing step for performing a process; a comparison step of comparing the size of the area in which the specific subject is detected with the size of the area in which the code image is detected, In the processing step, if the result of the comparison in the comparison step is that the size of the area where the specific subject is detected is less than the size of the area where the code image is detected, processing is performed based on the predetermined information acquired in the information acquisition step, and if the size of the area where the specific subject is detected is equal to or greater than the size of the area where the code image is detected, a photographing preparation process related to the specific subject is performed.
14. A control method for an imaging device, comprising: an image acquisition step of acquiring an image; a first detection step of detecting a specific subject from the image acquired in the image acquisition step; a second detection step of detecting a code image from the acquired image; an information acquisition step of acquiring predetermined information associated with the code image by performing a decoding process on the code image; a processing step for performing a process; a comparison step of comparing the number of specific subjects detected in the first detection step with a predetermined value, A control method for an imaging device, characterized in that in the processing step, if the result of the comparison in the comparison step is that the number of the detected specific subjects is less than a predetermined value, processing based on the predetermined information acquired in the information acquisition step is performed, and if the result of the comparison is that the number of the detected specific subjects is equal to or greater than a predetermined value, shooting preparation processing related to the specific subjects is performed.
15. A program that causes a computer to function as each of the means of the imaging device according to any one of claims 1 to 11.
Citation Information
Patent Citations
Portable telephone
JP2007318775A
Photographing control program and digital camera, and photographing control method
JP2008236482A
Image recognition device
JP2018117374A
Digital photographing apparatus, method for controlling the same, and a recording medium for storing a program to implement the method
US20080170132A1
Mobile device and method for controlling the same
US20180063344A1