Camera quick start method and system

The method of initializing the CPU and real-time frame images to determine the self-time mode through the FPGA cache is solved, and the problem of excessively long camera startup cycle in the prior art is realized, and the camera is quickly started and the lens automatic switching is improved, thereby improving the user experience.

CN119255098BActive Publication Date: 2025-02-25NANJING AXIS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411760830.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-02-25
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

In the prior art, the cycle from turning on the camera to completing the shooting action is too long to meet the user's demand for timeliness, affecting the user's user experience.

Method used

Initialize the CPU through the built-in cache of FPGA, shorten the startup time, and obtain real-time frame images through the front camera to determine whether it is a selfie, and automatically switch the front camera and the rear camera to achieve fast startup and lens switching.

Benefits of technology

It significantly shortens the time from turning on the camera function to taking images, meets users' needs for fast shooting, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119255098B_ABST
    Figure CN119255098B_ABST
Patent Text Reader

Abstract

The present invention discloses a camera quick start method and system, belonging to the technical field of intelligent mobile devices. The method uses a built-in high-speed cache in an FPGA to initialize a CPU through the high-speed cache. When starting, the CPU does not need to wait for data to be copied from a non-volatile memory to a RAM, but can directly obtain the required data from the non-volatile memory and start processing immediately; therefore, the time required for starting can be shortened. The present invention also obtains the user's habit of arranging the positions of people when taking selfies, and then obtains the real-time frame image collected by the front camera, and further determines whether the user wants to take a selfie, and finally switches the front camera and the rear camera according to the judgment result, thereby realizing automatic switching of the camera. Compared with the prior art, it can quickly realize lens switching, meet the corresponding shooting needs of the user, and greatly shorten the time from turning on the camera function to shooting an image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent mobile devices, and in particular, relates to a camera quick start method and system. Background Art

[0002] A camera is a device that records image information. When taking pictures, the user needs to start the camera first, and then switch the shooting mode according to the current shooting mode and the user's own needs. The shooting mode here refers to shooting with the front camera or the rear camera. Generally speaking, the system will continue the last shooting mode or default to the rear camera shooting mode. This results in the user having to turn on the camera first and then turn on the shooting function if he wants to complete the shooting action when the camera is turned off. The user then makes further adjustments based on the current turned-on camera and the current shooting needs. This results in the whole process being very cumbersome and time-consuming, and it is difficult to meet the user's demand for timeliness when shooting. It is not convenient and fast enough. In order to solve the above problems, a method and system for realizing quick startup of a camera are provided, and the present invention provides the following technical solutions. Summary of the invention

[0003] The purpose of the present invention is to provide a camera quick start method and system to solve the problem in the prior art that when taking pictures with a smart camera, the period from starting the camera to completing the shooting action is too long, which does not meet the user's demand for timeliness and affects the user's experience.

[0004] The purpose of the present invention can be achieved through the following technical solutions:

[0005] A camera quick start method comprises the following steps:

[0006] S1. Start the camera;

[0007] S2, judging whether the camera is stable. If the camera is not stable, continue judging until the camera is stable or manual intervention is performed;

[0008] S3, when the camera is in a stable state, the front camera obtains a frame of image information, and marks the obtained frame of image information as a real-time frame image;

[0009] S4, judging whether it is a selfie according to the acquired real-time frame image, and if it is a selfie, keeping the front camera working, and the camera enters a selfie mode;

[0010] On the contrary, when it is determined that it is not a selfie, the rear camera is switched to enter the photo mode.

[0011] As a further solution of the present invention, the method for starting the camera includes the following steps:

[0012] S11, the FPGA configuration module loads the bit stream pair in the external non-volatile memory and configures the FGPA itself;

[0013] S12, the FPGA configuration module loads the boot program in the external non-volatile memory into the cache and initializes the CPU;

[0014] S13, CPU executes the boot program on the cache;

[0015] S14, the boot program loads the software system into the external RAM, and the boot program sets the CPU running pointer to point to the RAM;

[0016] S15. The CPU jumps to execute the program in RAM.

[0017] As a further solution of the present invention, the method for determining whether the camera is stable in step S2 is as follows:

[0018] An angular velocity threshold is set for the real-time angular velocity detection values ​​of the angular velocity sensor on the x-axis, y-axis and z-axis respectively. When the real-time angular velocity detection value on the x-axis, y-axis or z-axis is greater than the threshold, the camera is considered unstable. Conversely, when the real-time angular velocity detection value on the x-axis, y-axis or z-axis is less than or equal to the threshold within a continuous t1 time, the camera is considered stable.

[0019] As a further solution of the present invention, the method for determining whether it is a selfie according to the acquired real-time frame image in step S4 is:

[0020] Get images from the camera's photo library;

[0021] Obtain a set of images taken by a selfie camera, and record these images as material images;

[0022] Get the hotspot area occupied by the face of the person in the material image;

[0023] When the overlap degree θ between the area occupied by the face of the person in the real-time frame image and the hot spot area is greater than or equal to a preset threshold θy, it is considered that the current user's shooting behavior is a selfie; otherwise, it is considered that the user's current shooting behavior is not a selfie.

[0024] As a further solution of the present invention, a method for obtaining a hot spot area occupied by a person's face in a material image is as follows:

[0025] Divide the image into several blocks according to the same rules;

[0026] For a set of material images that belong to the same group after classification, obtaining a block occupied by a facial image of a person in each material image in the set of material images;

[0027] Count the number of times each block is occupied zi, where 0≤i≤n, and n is the number of material images that belong to the same group after classification;

[0028] When zi is greater than or equal to the preset value α*n, the corresponding block is considered to be a hotspot block, where α is a preset proportional coefficient;

[0029] Get the distribution of hotspot blocks, and mark the area containing continuous hotspot blocks as a hotspot area.

[0030] As a further solution of the present invention, a method for determining the degree of overlap θ between the area occupied by the face of the person in the real-time frame image and the hot spot area is:

[0031] Get the area r1 occupied by the face of the person in the real-time frame image;

[0032] Obtain the hotspot area r2 occupied by the face of the person in the corresponding material image set;

[0033] The overlap degree θ is calculated according to the formula θ=q1 / q2, where q1 is the number of blocks that appear in both r1 and r2, and q2 is the number of blocks contained in the one with the larger number of blocks between r1 and r2.

[0034] As a further solution of the present invention, after obtaining the image set taken by the selfie camera, further classification is performed according to the number of people taking selfies in the image;

[0035] When judging the relationship between the overlap degree θ between the area occupied by the face of a person in the real-time frame image and the hot spot area and the threshold θy, the hot spot areas occupied by the faces of the people in the material image set corresponding to the number of people in the real-time frame image are selected for comparison.

[0036] A camera quick start system executes the above-mentioned camera quick start method. The quick start system includes an external RAM, an external ROM and an FPGA integrating an FPGA configuration module, a cache and a CPU, wherein the external RAM, the external ROM and the FPGA are all electrically connected to a bus.

[0037] Beneficial effects of the present invention:

[0038] 1. The present invention uses a built-in high-speed cache in FPGA to initialize the CPU through the high-speed cache. When starting, the CPU does not need to wait for data to be copied from the non-volatile memory to the RAM, but can directly obtain the required data from the non-volatile memory and start processing immediately; therefore, the time required for startup can be shortened.

[0039] 2. The present invention analyzes and processes the selfies in the photo library to obtain the user's habit of arranging the positions of the characters when taking selfies, then obtains the real-time frame image captured by the front camera, and further determines whether the user wants to take a selfie based on the positions of the characters in the real-time frame image, and finally switches the front camera and the rear camera based on the judgment result, thereby realizing automatic switching of the camera. Compared with the existing technology, it can quickly realize lens switching, meet the user's corresponding shooting needs, and greatly shorten the time from turning on the camera function to shooting an image. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The present invention will be further described below in conjunction with the accompanying drawings.

[0041] Figure 1 is a flowchart of a camera quick start method;

[0042] Figure 2 The present invention is a schematic diagram of the framework structure of a camera quick start system. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] Embodiment 1

[0045] A camera quick start method, such as Figure 1 As shown, the following steps are included:

[0046] S1. Start the camera;

[0047] The method of starting the camera includes the following steps:

[0048] S11, the FPGA configuration module loads the bit stream pair in the external non-volatile memory and configures the FGPA itself;

[0049] S12, the FPGA configuration module loads the boot program in the external non-volatile memory into the cache and initializes the CPU;

[0050] S13, CPU executes the boot program on the cache;

[0051] S14, the boot program loads the software system into the external RAM, and the boot program sets the CPU running pointer to point to the RAM;

[0052] S15. The CPU jumps to execute the program in RAM.

[0053] S2, judging whether the camera is stable by using an angular velocity sensor, and when the camera is unstable, continuing to judge until the camera is stable or manual intervention is performed, specifically, when the camera is stable, proceeding to the next step, and when manual intervention is performed, executing the instruction input by manual intervention;

[0054] This embodiment also provides a method for determining whether the camera is stable as follows:

[0055] An angular velocity threshold is set for the real-time angular velocity detection values ​​of the angular velocity sensor on the x-axis, y-axis and z-axis respectively. When the real-time angular velocity detection value on the x-axis, y-axis or z-axis is greater than the threshold, the camera is considered unstable. Conversely, when the real-time angular velocity detection value on the x-axis, y-axis or z-axis is less than or equal to the threshold within a continuous t1 time, the camera is considered stable.

[0056] S3, when the camera is in a stable state, the front camera collects image information;

[0057] Specifically, the front camera obtains a frame of image information. For the convenience of description, the obtained frame of image information is marked as a real-time frame image;

[0058] S4, judging whether it is a selfie according to the acquired real-time frame image, and if it is a selfie, keeping the front camera working, and the camera enters a selfie mode;

[0059] On the contrary, when it is determined that it is not a selfie, the rear camera is switched to enter the photo mode.

[0060] The method for determining whether it is a selfie based on the acquired real-time frame image is as follows:

[0061] Get images from the camera's photo library;

[0062] Classify the images in the photo library according to the difference in the shooting cameras, so as to obtain a set of images taken by the selfie camera. For the convenience of description, these images are marked as material images;

[0063] Get the hotspot area occupied by the face of the person in the material image;

[0064] When the overlap degree θ between the area occupied by the face of the person in the real-time frame image and the hot spot area is greater than or equal to a preset threshold θy, it is considered that the current user's shooting behavior is a selfie; otherwise, it is considered that the user's current shooting behavior is not a selfie.

[0065] Specifically, after the images in the photo library are classified according to the difference in shooting cameras, they can be further classified according to the number of people in the selfie in the image;

[0066] When judging the relationship between the overlap degree θ between the area occupied by the face of a person in the real-time frame image and the hot spot area and the threshold θy, the hot spot areas occupied by the faces of the people in the material image set corresponding to the number of people in the real-time frame image are selected for comparison.

[0067] For example: when it is detected that the number of human faces in the real-time frame image is 2, all images containing two human faces in the selfie images captured by the selfie camera are obtained as a corresponding set of material images, and then the hot spot area corresponding to this set of material images is obtained by calculation and analysis, and then the relationship between the overlap degree θ between the area occupied by the human face in the real-time frame image and the hot spot area and the threshold θy is determined.

[0068] The method for obtaining the hotspot area occupied by the face of a person in the material image is:

[0069] Divide the image into several blocks according to the same rules;

[0070] For a set of material images that belong to the same group after classification, obtaining a block occupied by a facial image of a person in each material image in the set of material images;

[0071] Count the number of times each block is occupied zi, where 0≤i≤n, and n is the number of material images that belong to the same group after classification;

[0072] When zi is greater than or equal to a preset value α*n, the corresponding block is considered to be a hotspot block, where α is a preset proportional coefficient, preferably 0.6;

[0073] Get the distribution of hotspot blocks, and mark the area containing continuous hotspot blocks as a hotspot area.

[0074] The method for determining the degree of overlap θ between the area occupied by the face of the person in the real-time frame image and the hot spot area is:

[0075] Get the area r1 occupied by the face of the person in the real-time frame image;

[0076] Obtain the hotspot area r2 occupied by the face of the person in the corresponding material image set;

[0077] The overlap degree θ is calculated according to the formula θ=q1 / q2, where q1 is the number of blocks that appear in both r1 and r2, and q2 is the number of blocks contained in the one with the larger number of blocks between r1 and r2.

[0078] Embodiment 2

[0079] like Figure 2As shown, a camera quick start system is shown, which executes a camera quick start method of an embodiment. Specifically, the quick start system includes an external RAM, an external ROM, and an FPGA integrating an FPGA configuration module, a cache and a CPU, wherein the external RAM, the external ROM and the FPGA are all electrically connected to the bus.

[0080] The above contents are merely examples and explanations of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the invention or exceed the scope defined by the claims, they shall all fall within the protection scope of the present invention.

Claims

1. A camera quick start method, characterized in that: The steps include: S1. Start the camera; S2, judging whether the camera is stable. If the camera is not stable, continue judging until the camera is stable or manual intervention is performed; S3, when the camera is in a stable state, the front camera obtains a frame of image information, and marks the obtained frame of image information as a real-time frame image; S4, judging whether it is a selfie according to the acquired real-time frame image, and if it is a selfie, keeping the front camera working, and the camera enters a selfie mode; On the contrary, when it is determined that it is not a selfie, the rear camera is switched to enter the photo mode; The method for determining whether it is a selfie according to the acquired real-time frame image in step S4 is: Get images from the camera's photo library; Obtain a set of images taken by a selfie camera, and record these images as material images; Get the hotspot area occupied by the face of the person in the material image; When the overlap degree θ between the area occupied by the face of the person in the real-time frame image and the hot spot area is greater than or equal to a preset threshold θy, it is considered that the current user's shooting behavior is a selfie; otherwise, it is considered that the user's current shooting behavior is not a selfie.

2. A camera quick start method according to claim 1, characterized in that: The method of starting the camera includes the following steps: S11, the FPGA configuration module loads the bit stream pair in the external non-volatile memory and configures the FGPA itself; S12, the FPGA configuration module loads the boot program in the external non-volatile memory into the cache and initializes the CPU; S13, CPU executes the boot program on the cache; S14, the boot program loads the software system into the external RAM, and the boot program sets the CPU running pointer to point to the RAM; S15. The CPU jumps to execute the program in RAM.

3. A camera quick start method according to claim 1, characterized in that: The method for determining whether the camera is stable in step S2 is as follows: An angular velocity threshold is set for the real-time angular velocity detection values ​​of the angular velocity sensor on the x-axis, y-axis and z-axis respectively. When the real-time angular velocity detection value on the x-axis, y-axis or z-axis is greater than the threshold, the camera is considered unstable. Conversely, when the real-time angular velocity detection value on the x-axis, y-axis or z-axis is less than or equal to the threshold within a continuous t1 time, the camera is considered stable.

4. A camera quick start method according to claim 1, characterized in that: The method for obtaining the hotspot area occupied by the face of a person in the material image is: Divide the image into several blocks according to the same rules; For a set of material images that belong to the same group after classification, obtaining a block occupied by a facial image of a person in each material image in the set of material images; Count the number of times each block is occupied zi, where 0≤i≤n, and n is the number of material images that belong to the same group after classification; When zi is greater than or equal to the preset value α*n, the corresponding block is considered to be a hotspot block, where α is a preset proportional coefficient; Get the distribution of hotspot blocks, and mark the area containing continuous hotspot blocks as a hotspot area.

5. A camera quick start method according to claim 4, characterized in that: The method for determining the degree of overlap θ between the area occupied by the face of the person in the real-time frame image and the hot spot area is: Get the area r1 occupied by the face of the person in the real-time frame image; Obtain the hotspot area r2 occupied by the face of the person in the corresponding material image set; The overlap degree θ is calculated according to the formula θ=q1 / q2, where q1 is the number of blocks that appear in both r1 and r2, and q2 is the number of blocks contained in the one with the larger number of blocks between r1 and r2.

6. A camera quick start method according to claim 1, characterized in that: After obtaining the image set taken by the selfie camera, continue to classify it again according to the number of people taking selfies in the image; When judging the relationship between the overlap degree θ between the area occupied by the face of a person in the real-time frame image and the hot spot area and the threshold θy, the hot spot areas occupied by the faces of the people in the material image set corresponding to the number of people in the real-time frame image are selected for comparison.

7. A camera quick start system, used to execute a camera quick start method as described in any one of claims 1 to 6, the quick start system comprising an external RAM, an external ROM and an FPGA integrating an FPGA configuration module, a cache and a CPU, wherein the external RAM, the external ROM and the FPGA are all electrically connected to a bus.

Citation Information

Patent Citations

  • Method and device for self-shooting of mobile terminal

    CN102946514A

  • Blink detection-based smart handset photographing system and method

    CN106572304A