WO2019128539A1 - Procédé et appareil d'obtention de définition d'image, support de stockage et dispositif électronique - Google Patents

Procédé et appareil d'obtention de définition d'image, support de stockage et dispositif électronique Download PDF

Info

Publication number
WO2019128539A1
WO2019128539A1 PCT/CN2018/116446 CN2018116446W WO2019128539A1 WO 2019128539 A1 WO2019128539 A1 WO 2019128539A1 CN 2018116446 W CN2018116446 W CN 2018116446W WO 2019128539 A1 WO2019128539 A1 WO 2019128539A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
target area
electronic device
pixel
picture
Prior art date
Application number
PCT/CN2018/116446
Other languages
English (en)
Chinese (zh)
Inventor
张乐
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019128539A1 publication Critical patent/WO2019128539A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Definitions

  • the present application belongs to the field of image processing technologies, and in particular, to a method, an apparatus, a storage medium, and an electronic device for acquiring picture sharpness.
  • the electronic device In the process of taking a picture, the electronic device needs to evaluate the picture obtained by the camera module.
  • the electronic device can perform a sharpness evaluation on a picture using a sharpness evaluation algorithm.
  • commonly used definition evaluation algorithms include Sobel operators and the like.
  • the embodiment of the present application provides a method, an apparatus, a storage medium, and an electronic device for acquiring picture sharpness, which can improve the efficiency of acquiring picture clarity.
  • An embodiment of the present application provides a method for acquiring picture clarity, including:
  • the sum of the squared values of all the differences is obtained to obtain a sum value, and the sum value is determined as the sharpness of the picture.
  • An embodiment of the present application provides a device for acquiring picture sharpness, including:
  • a first acquiring module configured to acquire an original picture obtained by shooting according to a Bayer array
  • a first determining module configured to determine a target area from the original picture, and determine a distribution position of a pixel of a preset color from the target area
  • a second acquiring module configured to acquire a square value of a difference value of a luminance value of a pixel of a preset color in which the distribution position relationship in the target area is diagonally adjacent;
  • a second determining module configured to add the square values of all the difference values to obtain a sum value, and determine the sum value as the sharpness of the picture.
  • the embodiment of the present application provides a storage medium on which a computer program is stored.
  • the computer program is executed on a computer, the computer is caused to execute the flow in the method for acquiring picture sharpness provided by the embodiment of the present application.
  • the embodiment of the present application further provides an electronic device, including a memory, a processor, by using a computer program stored in the memory, to execute:
  • the sum of the squared values of all the differences is obtained to obtain a sum value, and the sum value is determined as the sharpness of the picture.
  • FIG. 1 is a schematic flowchart diagram of a method for acquiring picture sharpness provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of pixel distribution of a target area in an original picture provided by an embodiment of the present application.
  • FIG. 3 is another schematic flowchart of a method for acquiring picture sharpness provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a scenario for acquiring a picture sharpness according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an apparatus for acquiring picture sharpness according to an embodiment of the present application.
  • FIG. 7 is another schematic structural diagram of an apparatus for acquiring picture sharpness according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 9 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the embodiment of the present application provides a method for acquiring picture sharpness, which includes:
  • the obtaining a square value of a difference value of a brightness value of a pixel of a preset color in a diagonally adjacent positional relationship in the target area may include: determining, from the target area a target pixel having the same preset color pixel distribution at positions adjacent to the lower left diagonally adjacent to the lower right diagonal corner; obtaining a difference value of luminance values of each of the target pixels and pixels adjacent to the lower left diagonal thereof The squared value and obtain the square of the difference between the luminance value of each target pixel and the pixel adjacent to its lower right diagonal.
  • the determining the target area from the original picture may include: determining a target area from the original picture, where the target area is a rectangular area of a preset size.
  • the determining the target area from the original picture may include: determining a target area from the original picture, the target area being a required focus area.
  • the method before the acquiring the original image obtained by the Bayer array, the method further includes: acquiring the total running memory capacity of the electronic device when the electronic device enters the shooting interface and needs to acquire the sharpness of the image. And the running memory capacity currently occupied; obtaining the percentage of the currently occupied running memory capacity as a percentage of the total running memory capacity.
  • the acquiring the original image obtained by the Bayer array may include: if the percentage value is detected to be greater than the preset ratio threshold, acquiring the original image obtained by the Bayer array.
  • the method for acquiring the image sharpness may further include: adjusting the preset ratio threshold.
  • the adjusting the preset ratio threshold may include: acquiring a preset basic value; and increasing or decreasing the basic value according to the preset amplitude to obtain a preset proportional threshold.
  • the executive body of the embodiment of the present application may be an electronic device such as a smart phone or a tablet computer.
  • FIG. 1 is a schematic flowchart of a method for acquiring picture sharpness according to an embodiment of the present disclosure, where the process may include:
  • the electronic device In the process of taking a picture, the electronic device needs to evaluate the picture obtained by the camera module.
  • the electronic device can perform a sharpness evaluation on a picture using a sharpness evaluation algorithm.
  • a sharpness evaluation algorithm For example, commonly used definition evaluation algorithms include Sobel operators and the like.
  • Sobel operators When using these definition evaluation algorithms to obtain the sharpness of the picture, it is necessary to interpolate the original picture (Bayer Raw picture) obtained based on the Bayer array image, which results in low efficiency in obtaining picture sharpness.
  • the electronic device may first acquire an original picture (Bayer RAW picture) obtained based on the Bayer array.
  • the original picture taken based on the Bayer array image refers to the original picture inside the unprocessed camera captured by the camera module mounted with the Bayer array sensor.
  • a target area is determined from the original picture, and a distribution position of pixels of a preset color is determined from the target area.
  • the electronic device can determine a target area from the original picture.
  • the target area is an area for obtaining the sharpness of the original picture.
  • the electronic device After determining the target area from the original picture taken by the Bayer array, the electronic device can determine the distribution position of the pixels of the preset color from the target area.
  • the electronic device can determine the distribution location of the green pixels from the target area.
  • the preset color can also be other colors, such as red or blue. It should be understood that the examples herein do not constitute a limitation on the embodiments of the present application.
  • a square value of a difference value of luminance values of pixels of a preset color in which the distribution position relationship in the target area is diagonally adjacent is acquired.
  • the electronic device may acquire the square value of the difference of the brightness value of each of the two green pixels adjacent to the diagonally adjacent positional relationship in the target area.
  • diagonally adjacent means that the relationship between two pixels in the distribution position is that the two pixels have a vertex angle.
  • the figure is a schematic diagram of pixel distribution of a target area in a Bayer RAW image.
  • the pixels R00, R02, R20, and R22 are red pixels, G01, G03, G10, G12, G21, G23, G30, and G32 are green pixels, and B11, B13, B31, and B33 are blue pixels.
  • G01 and G10 are diagonally adjacent green pixels
  • G01 and G12 are diagonally adjacent green pixels
  • G12 and G21 are diagonally adjacent green pixels
  • G12 and G23 are diagonally adjacent green pixels. Pixel.
  • G01 and G23 are not diagonally adjacent green pixels
  • G01 and G21 are not diagonally adjacent green pixels.
  • the electronic device can obtain the squared value of the difference in their luminance values.
  • the green pixel of G01 has a luminance value of L01
  • the green pixel of G10 has a luminance value of L10.
  • the electronic device can obtain the squared value of the difference of their luminance values.
  • the green pixel of G01 has a luminance value of L01
  • the green pixel of G12 has a luminance value of L12.
  • the square values of all the differences are added to obtain a sum value, and the sum value is determined as the sharpness of the picture.
  • the electronic device can add the square values of all the differences to obtain a sum value.
  • the electronic device can then determine the sum value as the sharpness of the picture.
  • the embodiment of the present application can directly obtain the definition on the basis of the original image obtained by the Bayer array, without first interpolating the original image obtained by the Bayer array shooting, Then obtain the definition. Therefore, the embodiment of the present application can improve the efficiency of obtaining picture clarity.
  • the scheme in this embodiment has high robustness and stability. Moreover, the scheme in this embodiment has a high acquisition accuracy.
  • FIG. 3 is another schematic flowchart of a method for acquiring picture sharpness according to an embodiment of the present disclosure, where the process may include:
  • the electronic device acquires an original picture taken based on a Bayer array.
  • the electronic device can first obtain the original picture (Bayer RAW picture) obtained based on the Bayer array.
  • the original picture taken based on the Bayer array image refers to the original picture inside the unprocessed camera captured by the camera module mounted with the Bayer array sensor.
  • the electronic device determines a target area from the original picture, the target area being a rectangular area of a preset size.
  • the electronic device can determine a target area from the original picture.
  • the target area is an area for obtaining the sharpness of the original picture.
  • the target area may be a rectangular area of a preset size.
  • the electronic device determines a distribution position of the pixels of the preset color from the target area.
  • the electronic device can determine the distribution position of the pixels of the preset color from the target area.
  • the electronic device can determine the distribution location of the green pixels from the target area.
  • the preset color can also be other colors, such as red or blue. It should be understood that the examples herein do not constitute a limitation on the embodiments of the present application.
  • the electronic device determines, from the target area, a target pixel having a pixel distribution of the same preset color at positions adjacent to the lower left diagonally adjacent to the lower right diagonal.
  • the electronic device may determine, from the target area, a target having a green pixel distribution at a position adjacent to the lower left diagonally adjacent to the lower right diagonal corner. Pixel.
  • the color of the target pixel is also a preset color.
  • diagonally adjacent means that the relationship between two pixels in the distribution position is that the two pixels have a vertex angle.
  • FIG. 2 is a schematic diagram of pixel distribution of a target area of a certain picture.
  • the pixels R00, R02, R20, and R22 are red pixels
  • G01, G03, G10, G12, G21, G23, G30, and G32 are green pixels
  • B11, B13, B31, and B33 are blue pixels.
  • the electronic device can determine the green pixel G01 as the target pixel. Similarly, the electronic device can also determine the green pixels G12 and G21 as target pixels.
  • the electronic device may not determine the green pixel G03 as the target pixel.
  • the electronic device may not determine the green pixel G10 as the target pixel.
  • the electronic device may not determine the green pixels G23, G30, and G32 as the target pixels.
  • the electronic device acquires a square value of a difference value between each target pixel and a luminance value of a pixel adjacent to a lower left diagonal of the target pixel, and acquires each target pixel and a pixel adjacent to a diagonally lower right corner thereof.
  • the square of the difference in luminance values is a square value of a difference value between each target pixel and a luminance value of a pixel adjacent to a lower left diagonal of the target pixel.
  • the electronic device may acquire the square value of the difference between the brightness value of each target pixel and the same color pixel adjacent to the lower left diagonal of the target pixel, and acquire each target.
  • the electronic device may not obtain the square value of the difference between the luminance values of the pixels and their lower left diagonal adjacent pixels or the lower right diagonal adjacent pixels.
  • the electronic device adds all the squared values of the difference to obtain a sum value, and determines the sum value as the sharpness of the picture.
  • the square value of the difference between the luminance values of each of the target pixels and the pixels adjacent to the lower left diagonal of the target pixel, and the difference between the luminance values of the pixels adjacent to the lower right diagonal of the target pixel are obtained.
  • the electronic device can add the square values of all these differences to obtain a sum value.
  • the electronic device can then determine the sum value as the sharpness of the picture.
  • the electronic device can then determine the sum value C as the sharpness of the original picture.
  • the electronic device may also determine the sum value as the contrast of the original picture.
  • the process in which the electronic device determines the target area from the original picture in 202 may include:
  • the electronic device determines a target area from the original picture, the target area being a desired focus area.
  • the electronic device may determine the required focus area in the original picture as the target area.
  • the focus area needs to be the area with the highest resolution requirement in the original picture, so the required focus area can be determined as the target area for obtaining the sharpness of the original picture.
  • the following process may be further included:
  • the electronic device When the electronic device enters the shooting interface and needs to obtain the sharpness of the picture, the electronic device acquires the total running memory capacity of the electronic device and the currently occupied running memory capacity;
  • the electronic device obtains the percentage of the currently occupied running memory capacity as a percentage of the total running memory capacity.
  • the process of the electronic device in 201 acquiring the original image obtained by the Bayer array may include: if the percentage value is detected to be greater than the preset ratio threshold, the electronic device acquires the original image obtained by the Bayer array.
  • the electronic device can First, get the total running memory capacity of the electronic device, and the running memory capacity currently occupied.
  • the electronic device can obtain the percentage of the currently occupied running memory capacity as a percentage of the total running memory capacity, and detect whether the percentage value is greater than a preset ratio threshold.
  • the current computing power of the electronic device can be considered to be strong, and the electronic device can perform other operations to complete the photo shooting. For example, at this point the electronic device can perform direct calculations based on hardware logic to find the best focus position.
  • the electronic device can acquire the original picture taken based on the Bayer array, and execute the processes in the embodiments 201 to 206, thereby assisting the camera module to find The best focus position.
  • the technical solution of the embodiment can improve the efficiency of the electronic device to obtain picture clarity. Therefore, in the case where the remaining memory is insufficient, by using the flow in the present embodiment 201 to 206, it is possible to speed up the determination of the optimum focus position by the electronic device.
  • the value of the preset ratio threshold may be allowed to be adjusted.
  • the electronic device can first obtain hardware information such as the model of the processor. If it is determined according to the hardware information of the processor that the computing power of the processor is strong, the electronic device may increase the value of the preset ratio threshold by a certain amount. If it is determined that the computing power of the processor is poor according to the hardware information of the processor, the electronic device may lower the value of the preset ratio threshold.
  • the electronic device may set a basic value in advance, and when it is determined that the computing power of the processor is strong according to the hardware information of the processor, the electronic device may increase the basic value by a preset amplitude to obtain a preset proportional threshold. When it is determined that the computing power of the processor is poor according to the hardware information of the processor, the electronic device may reduce the base value by a preset amplitude to obtain a preset ratio threshold.
  • the embodiment may further include the following process: the electronic device adjusts the preset ratio threshold.
  • the electronic device when the electronic device performs the process of adjusting the preset ratio threshold, the electronic device may: the electronic device acquires a preset basic value; and the electronic device increases or decreases the basic value according to the preset amplitude to obtain the pre-prepared Set the proportional threshold.
  • the shooting mode of the camera of the electronic device includes a fast shooting mode, an automatic shooting mode, and a professional shooting mode
  • the technical solution provided in the embodiment of the present application may be used when the fast shooting mode is used, so that Increase the camera's focus speed for electronic devices.
  • the quick shooting mode may be a shooting mode for capturing a picture of a dynamic object.
  • FIG. 4 to FIG. 5 are schematic diagrams of a method for acquiring a picture sharpness according to an embodiment of the present application.
  • the camera module In the production process of the camera module, it is necessary to perform a shooting test on the camera module. Among them, the camera module needs to evaluate the resolution of several frames before and after the shooting, and determines the best focus position according to the resolution of the photos, so as to shoot the highest resolution photos. .
  • the sharpness of the original picture (Bayer RAW picture) or preview image captured by the camera is continuously increased, and the lens is driven from the second position to the first position.
  • the sharpness of the original or preview image captured by the camera is continuously reduced.
  • the electronic device can determine the second position as the best focus position and drive the lens to the second position to complete the shooting.
  • the electronic device can first obtain the original image taken based on the Bayer array.
  • the original picture taken based on the Bayer array image refers to the original picture inside the unprocessed camera captured by the camera module mounted with the Bayer array sensor.
  • the electronic device may first acquire the first original picture obtained based on the Bayer array.
  • the electronic device can determine a target area from the first original picture.
  • the target area may be a rectangular area that requires a focus area, and the target area is a preset size.
  • the target area is a preset size. For example, as shown in FIG. 4, when the user clicks on the camera to capture the face area in the preview interface and wants to focus on the face, the face area needs to be the focus area (the dotted area in the figure indicates the face area that needs to be focused). . Therefore, the electronic device can determine the face area as the target area, and the target area can be a rectangular area of a preset size.
  • the electronic device may determine a distribution position of the green pixel from the target area, and determine, from the target area, a target pixel having a green pixel distribution at a position adjacent to a lower left diagonally opposite and a lower right diagonal opposite .
  • FIG. 2 is a pixel distribution diagram of a target area determined from the first original picture.
  • the green pixel G01 since the green pixel G10 is distributed at the lower left diagonally adjacent position, the green pixel G12 is distributed at the lower right diagonally adjacent position. Therefore, the electronic device can determine the green pixel G01 as the target pixel. Similarly, the electronic device can also determine the green pixels G12 and G21 as target pixels.
  • the electronic device may acquire a square value of a difference value of each target pixel and a luminance value of a pixel adjacent to a lower left diagonal of the target pixel, and acquire each target pixel and distribution The square of the difference in luminance values of pixels adjacent to the lower right diagonal.
  • the electronic device acquires the resolution of the second original picture corresponding to the second position to be D.
  • the electronic device acquires the resolution of the third original picture corresponding to the third position to be E.
  • the electronic device can determine the second position as the best focus position and drive the lens to the second position to complete the photo shooting.
  • the electronic device can prompt the tester to complete the focus (in the figure, the dotted frame of the face area is changed to a solid line frame to indicate that the focus is completed).
  • the camera button as shown in FIG. 5, to complete the photo shooting.
  • the embodiment of the present application provides a device for acquiring picture sharpness, which includes:
  • the first obtaining module is configured to obtain an original picture obtained by shooting according to a Bayer array.
  • a first determining module configured to determine a target area from the original picture, and determine a distribution position of pixels of a preset color from the target area.
  • a second acquiring module configured to acquire a square value of a difference value of a luminance value of a pixel of a preset color in which the distribution position relationship in the target area is diagonally adjacent.
  • a second determining module configured to add the square values of all the difference values to obtain a sum value, and determine the sum value as the sharpness of the picture.
  • the second obtaining module may be configured to: determine, from the target area, a pixel distribution having the same preset color in a position adjacent to a lower left diagonal and a lower right diagonal opposite a target pixel; obtaining a square value of a difference value between each target pixel and a luminance value of a pixel adjacent to a lower left diagonal of the target pixel, and acquiring a luminance value of each target pixel and a pixel adjacent to a diagonally lower diagonal corner thereof The squared value of the difference.
  • the first determining module may be configured to: determine a target area from the original picture, where the target area is a rectangular area of a preset size.
  • the first determining module may be configured to: determine a target area from the original picture, where the target area is a required focus area.
  • the image clarity acquiring device may further include: a third acquiring module, configured to acquire a total running memory of the electronic device when the electronic device enters the shooting interface and needs to acquire the sharpness of the image The capacity and the currently occupied running memory capacity; obtaining the percentage of the currently occupied running memory capacity as a percentage of the total running memory capacity.
  • a third acquiring module configured to acquire a total running memory of the electronic device when the electronic device enters the shooting interface and needs to acquire the sharpness of the image The capacity and the currently occupied running memory capacity; obtaining the percentage of the currently occupied running memory capacity as a percentage of the total running memory capacity.
  • the first acquiring module may be configured to: if the percentage value is detected to be greater than a preset ratio threshold, obtain an original picture obtained by shooting according to a Bayer array.
  • the third acquiring module may be further configured to: adjust the preset ratio threshold.
  • the third obtaining module may be further configured to: obtain a preset basic value; and increase or decrease the basic value according to a preset amplitude to obtain a preset proportional threshold.
  • FIG. 6 is a schematic structural diagram of an apparatus for acquiring picture sharpness according to an embodiment of the present disclosure.
  • the image sharpness obtaining apparatus 300 may include: a first obtaining module 301, a first determining module 302, a second obtaining module 303, and a second determining module 304.
  • the first obtaining module 301 is configured to acquire an original picture obtained by shooting according to a Bayer array.
  • the first obtaining module 301 may first acquire an original picture (Bayer RAW picture) obtained based on the Bayer array.
  • the original picture taken based on the Bayer array image refers to the original picture inside the unprocessed camera captured by the camera module mounted with the Bayer array sensor.
  • the first determining module 302 is configured to determine a target area from the original picture, and determine a distribution position of pixels of a preset color from the target area.
  • the first determining module 302 may determine a target area from the original image.
  • the target area is an area for obtaining the sharpness of the original picture.
  • the first determining module 302 may determine the distribution position of the pixels of the preset color from the target area.
  • the first determining module 302 can determine a distribution location of the green pixels from the target area.
  • the preset color can also be other colors, such as red or blue. It should be understood that the examples herein do not constitute a limitation on the embodiments of the present application.
  • the second obtaining module 303 is configured to acquire a square value of a difference value of the luminance values of the pixels of the preset color in the target area.
  • the second obtaining module 303 may obtain the brightness value of each of the two green pixels adjacent to the diagonally distributed positional relationship in the target area. The squared value of the difference.
  • diagonally adjacent means that the relationship between two pixels in the distribution position is that the two pixels have a vertex angle.
  • the figure is a schematic diagram of pixel distribution of a target area in a Bayer RAW image.
  • the pixels R00, R02, R20, and R22 are red pixels, G01, G03, G10, G12, G21, G23, G30, and G32 are green pixels, and B11, B13, B31, and B33 are blue pixels.
  • G01 and G10 are diagonally adjacent green pixels
  • G01 and G12 are diagonally adjacent green pixels
  • G12 and G21 are diagonally adjacent green pixels
  • G12 and G23 are diagonally adjacent green pixels. Pixel.
  • G01 and G23 are not diagonally adjacent green pixels
  • G01 and G21 are not diagonally adjacent green pixels.
  • the second determining module 304 is configured to add the square values of all the difference values to obtain a sum value, and determine the sum value as the sharpness of the picture.
  • the second determining module 304 may add the square values of all the difference values to obtain a sum. value.
  • the second determination module 304 can then determine the sum value as the sharpness of the picture.
  • the second obtaining module 303 can be used to:
  • the second obtaining module 303 may determine, from the target area, that there are green pixels in the position adjacent to the lower left diagonal and the lower right diagonal. The target pixel of the distribution.
  • diagonally adjacent means that the relationship between two pixels in the distribution position is that the two pixels have a vertex angle.
  • FIG. 2 is a schematic diagram of pixel distribution of a target area of a certain picture.
  • the pixels R00, R02, R20, and R22 are red pixels
  • G01, G03, G10, G12, G21, G23, G30, and G32 are green pixels
  • B11, B13, B31, and B33 are blue pixels.
  • the second acquisition module 303 can determine the green pixel G01 as the target pixel. Similarly, the second acquisition module 303 can also determine the green pixels G12 and G21 as target pixels.
  • the second obtaining module 303 may obtain a square value of a difference value between each target pixel and a luminance value of a same color pixel adjacent to a lower left diagonal of the target pixel, and acquire each The square of the difference between the target pixel and the luminance value of the same color pixel that is adjacent to its lower right diagonal.
  • the second determining module 304 may add R1, R2, R3, R4, R5, R6 to obtain a sum value C, and determine the sum value C as the sharpness of the first original picture.
  • the first determining module 302 can be used to:
  • a target area is determined from the original picture, the target area being a rectangular area of a preset size.
  • the first determining module 302 can determine a target area from the original picture.
  • the target area is an area for obtaining the sharpness of the original picture.
  • the target area may be a rectangular area of a preset size.
  • the first determining module 302 can be used to:
  • a target area is determined from the original picture, the target area being a desired focus area.
  • the first determining module 302 may determine the required focus area in the original picture as the target area.
  • the focus area needs to be the area with the highest resolution requirement in the original picture, so the required focus area can be determined as the target area for obtaining the sharpness of the original picture.
  • FIG. 7 is another schematic structural diagram of an apparatus for acquiring picture sharpness according to an embodiment of the present application.
  • the image sharpness obtaining apparatus 300 may further include: a third obtaining module 305.
  • the third obtaining module 305 is configured to acquire the total running memory capacity of the electronic device and the currently occupied running memory capacity when the electronic device enters the shooting interface and needs to acquire the sharpness of the image; and acquire the currently occupied running The amount of memory capacity as a percentage of the total capacity of the running memory.
  • the first obtaining module 301 can be configured to: if the percentage value is detected to be greater than a preset ratio threshold, obtain an original picture that is obtained based on a Bayer array.
  • the third acquiring module The 305 can first obtain the total running memory capacity of the electronic device and the currently occupied running memory capacity.
  • the third obtaining module 305 can obtain the percentage value of the currently occupied running memory capacity as a percentage of the total running memory capacity, and detect whether the percentage value is greater than a preset ratio threshold.
  • the current computing power of the electronic device can be considered to be strong, and the electronic device can perform other operations to complete the photo shooting. For example, at this point the electronic device can perform direct calculations based on hardware logic to find the best focus position.
  • the first acquiring module 301 of the electronic device can acquire the original picture taken based on the Bayer array and perform subsequent steps, thereby assisting the camera module to find the most Good focus position.
  • the embodiment of the present application provides a computer readable storage medium, where a computer program is stored thereon, and when the computer program is executed on a computer, the computer is caused to execute the image sharpness obtaining method provided by the embodiment. A step of.
  • the embodiment of the present application further provides an electronic device, including a memory, and a processor, by using a computer program stored in the memory, to execute the process in the method for acquiring picture sharpness provided by the embodiment.
  • FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the electronic device 400 can include components such as an imaging unit 401, a memory 402, a processor 403, and the like. It will be understood by those skilled in the art that the structure of the electronic device shown in FIG. 8 does not constitute a limitation on the electronic device, and may include more or less components than those illustrated, or combine some components, or different component arrangements. .
  • the camera unit 401 can be used to capture an image.
  • Memory 402 can be used to store applications and data.
  • the application stored in the memory 402 contains executable code.
  • Applications can form various functional modules.
  • the processor 403 executes various functional applications and data processing by running an application stored in the memory 402.
  • the processor 403 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, executes the electronic device by running or executing an application stored in the memory 402, and calling data stored in the memory 402. The various functions and processing of data to provide overall monitoring of the electronic device.
  • the processor 403 in the electronic device loads the executable code corresponding to the process of one or more applications into the memory 402 according to the following instructions, and is executed by the processor 403 to be stored in the memory.
  • the electronic device 500 may include components such as an imaging unit 501, a memory 502, a processor 503, an input unit 504, an output unit 505, and the like.
  • the imaging unit 501 can be used to capture an image.
  • Memory 502 can be used to store applications and data.
  • the application stored in the memory 502 contains executable code.
  • Applications can form various functional modules.
  • the processor 503 executes various functional applications and data processing by running an application stored in the memory 502.
  • the processor 503 is a control center of the electronic device, and connects various parts of the entire electronic device using various interfaces and lines, executes the electronic device by running or executing an application stored in the memory 502, and calling data stored in the memory 502. The various functions and processing of data to provide overall monitoring of the electronic device.
  • the input unit 504 can be configured to receive input digits, character information or user characteristic information (such as fingerprints), and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
  • the output unit 505 can be used to display information input by the user or information provided to the user as well as various graphical user interfaces of the electronic device, which can be composed of graphics, text, icons, video, and any combination thereof.
  • the output unit may include a display panel.
  • the processor 503 in the electronic device loads the executable code corresponding to the process of one or more applications into the memory 502 according to the following instructions, and is stored in the memory by the processor 503.
  • the processor 503 when the processor 503 performs the acquiring a square value of a difference value of a luminance value of a pixel of a preset color in a diagonally adjacent positional relationship in the target area, the processor 503 may perform: from the Determining, in the target area, a target pixel having a pixel distribution of the same preset color at positions adjacent to the lower left diagonal and adjacent to the lower right diagonal; acquiring each target pixel and a pixel adjacent to the lower left diagonal of the target pixel The square value of the difference of the luminance values, and the square value of the difference between the luminance values of each of the target pixels and the pixels adjacent to the lower right diagonal of the target pixel is obtained.
  • the processor 503 when the processor 503 performs the determining of the target area from the original picture, performing: determining, from the original picture, a target area, where the target area is a rectangular area of a preset size. .
  • the processor 503 when the processor 503 performs the determining of the target area from the original picture, it may be performed to: determine a target area from the original picture, where the target area is a required focus area.
  • the processor 503 may further perform: acquiring, when the electronic device enters the shooting interface and needs to acquire the sharpness of the image, acquiring the electronic device. Running the total memory capacity and the currently occupied running memory capacity; obtaining the percentage of the currently occupied running memory capacity as a percentage of the total running memory capacity.
  • the processor 503 may perform: if the percentage value is greater than the preset ratio threshold, the original image obtained by the Bayer array is acquired.
  • the processor 503 may further perform: adjusting the preset ratio threshold.
  • the method may: perform: acquiring a preset basic value; and increasing or decreasing the basic value according to the preset amplitude to obtain a preset. Proportional threshold.
  • the image sharpness obtaining device provided by the embodiment of the present application belongs to the same concept as the image sharpness obtaining method in the above embodiment, and the image sharpness acquisition can be performed on the image sharpness obtaining device.
  • the image sharpness acquisition can be performed on the image sharpness obtaining device.
  • the specific implementation process of any of the methods provided in the method embodiments refer to the embodiment of the method for obtaining the picture clarity, which is not described here.
  • the program is implemented by controlling related hardware, which may be stored in a computer readable storage medium, such as in a memory, and executed by at least one processor, and may include, as the picture is clear during execution
  • the storage medium may be a magnetic disk, an optical disk, a read only memory (ROM), a random access memory (RAM), or the like.
  • each functional module may be integrated into one processing chip, or each module may exist separately physically, or two or more modules may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated module if implemented in the form of a software functional module and sold or used as a standalone product, may also be stored in a computer readable storage medium, such as a read only memory, a magnetic disk or an optical disk, etc. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

La présente invention concerne un procédé d'obtention de définition d'image, comprenant les étapes suivantes : obtenir une image d'origine obtenue par photographie à base de matrice de Bayer ; déterminer une région cible de l'image d'origine, et déterminer des positions de distribution de pixels avec une couleur prédéfinie dans la région cible ; obtenir des valeurs au carré de valeurs de différence de valeurs de luminosité des pixels avec la couleur prédéfinie dans la région cible, une relation des positions de distribution des pixels étant telle que les pixels sont adjacents en diagonale ; et effectuer une addition sur les valeurs au carré de toutes les valeurs de différence pour obtenir une valeur de somme, et déterminer la valeur de somme en tant que définition de l'image.
PCT/CN2018/116446 2017-12-28 2018-11-20 Procédé et appareil d'obtention de définition d'image, support de stockage et dispositif électronique WO2019128539A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711464337.8 2017-12-28
CN201711464337.8A CN108198189B (zh) 2017-12-28 2017-12-28 图片清晰度的获取方法、装置、存储介质及电子设备

Publications (1)

Publication Number Publication Date
WO2019128539A1 true WO2019128539A1 (fr) 2019-07-04

Family

ID=62585210

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116446 WO2019128539A1 (fr) 2017-12-28 2018-11-20 Procédé et appareil d'obtention de définition d'image, support de stockage et dispositif électronique

Country Status (2)

Country Link
CN (1) CN108198189B (fr)
WO (1) WO2019128539A1 (fr)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108198189B (zh) * 2017-12-28 2020-03-10 Oppo广东移动通信有限公司 图片清晰度的获取方法、装置、存储介质及电子设备
WO2020056629A1 (fr) * 2018-09-19 2020-03-26 深圳市大疆创新科技有限公司 Procédé et dispositif de détection d'image bayer et support d'informations lisible par machine
CN109696788B (zh) * 2019-01-08 2021-12-14 武汉精立电子技术有限公司 一种基于显示面板的快速自动对焦方法
CN109993722B (zh) * 2019-04-09 2023-04-18 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102903098A (zh) * 2012-08-28 2013-01-30 四川虹微技术有限公司 一种基于图像清晰度差异的深度估计方法
EP2955691A1 (fr) * 2014-06-10 2015-12-16 Baumer Optronic GmbH Dispositif de détermination des parties de couleur d'un pixel d'une matrice BAYER
CN107172296A (zh) * 2017-06-22 2017-09-15 维沃移动通信有限公司 一种图像拍摄方法及移动终端
CN108198189A (zh) * 2017-12-28 2018-06-22 广东欧珀移动通信有限公司 图片清晰度的获取方法、装置、存储介质及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102903098A (zh) * 2012-08-28 2013-01-30 四川虹微技术有限公司 一种基于图像清晰度差异的深度估计方法
EP2955691A1 (fr) * 2014-06-10 2015-12-16 Baumer Optronic GmbH Dispositif de détermination des parties de couleur d'un pixel d'une matrice BAYER
CN107172296A (zh) * 2017-06-22 2017-09-15 维沃移动通信有限公司 一种图像拍摄方法及移动终端
CN108198189A (zh) * 2017-12-28 2018-06-22 广东欧珀移动通信有限公司 图片清晰度的获取方法、装置、存储介质及电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIU, XIAOFANG: "Studies on Definition Evaluation and Window Construction Algorithms in Auto-focusing System", STUDIES ON ELECTRONIC TECHNOLOGY & INFORMATION SCIENCE , CHINA MASTER'S THESES FULL-TEXT DATABASE 1138-320, 15 September 2017 (2017-09-15), pages 1138 - 320, ISSN: 1674-0246 *

Also Published As

Publication number Publication date
CN108198189B (zh) 2020-03-10
CN108198189A (zh) 2018-06-22

Similar Documents

Publication Publication Date Title
CN111028189B (zh) 图像处理方法、装置、存储介质及电子设备
WO2019128539A1 (fr) Procédé et appareil d'obtention de définition d'image, support de stockage et dispositif électronique
WO2019105154A1 (fr) Procédé, appareil et dispositif de traitement d'image
WO2018201809A1 (fr) Dispositif et procédé de traitement d'image basé sur des caméras doubles
US10805508B2 (en) Image processing method, and device
US7450756B2 (en) Method and apparatus for incorporating iris color in red-eye correction
US8971628B2 (en) Face detection using division-generated haar-like features for illumination invariance
WO2018201875A1 (fr) Capteur d'image, module de caméra, et dispositif électronique
WO2015081556A1 (fr) Procédé de photographie destiné à un dispositif à double appareil photo et dispositif à double appareil photo
JP2009193421A (ja) 画像処理装置、カメラ装置、画像処理方法、およびプログラム
US11350063B2 (en) Circuit for correcting lateral chromatic abberation
US20220329729A1 (en) Photographing method, storage medium and electronic device
US11950012B2 (en) Apparatus, method of controlling the same, and storage medium
CN112164007A (zh) 图像显示方法和装置、终端和可读存储介质
CN118613821A (zh) 针对原始图像数据的多模式去马赛克
CN113592753B (zh) 基于工业相机拍摄的图像的处理方法、装置和计算机设备
US11176643B1 (en) Circuit for correcting chromatic aberration through sharpening
CN115052097B (zh) 拍摄方法、装置和电子设备
WO2019148996A1 (fr) Procédé et dispositif de traitement d'image, support de stockage, et appareil électronique
CN110266965A (zh) 图像处理方法、装置、存储介质及电子设备
WO2015141185A1 (fr) Dispositif de commande d'imagerie, procédé de commande d'imagerie, et support d'informations
US11252299B1 (en) High dynamic range color conversion using selective interpolation for different curves
CN110545375B (zh) 图像处理方法、装置、存储介质及电子设备
CN111479074A (zh) 图像采集方法、装置、计算机设备和存储介质
US20190052803A1 (en) Image processing system, imaging apparatus, image processing apparatus, control method, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18893756

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18893756

Country of ref document: EP

Kind code of ref document: A1