WO2023016183A1 - 运动检测方法、装置、电子设备和计算机可读存储介质 - Google Patents

运动检测方法、装置、电子设备和计算机可读存储介质 Download PDF

Info

Publication number
WO2023016183A1
WO2023016183A1 PCT/CN2022/105638 CN2022105638W WO2023016183A1 WO 2023016183 A1 WO2023016183 A1 WO 2023016183A1 CN 2022105638 W CN2022105638 W CN 2022105638W WO 2023016183 A1 WO2023016183 A1 WO 2023016183A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
pixels
motion detection
target
frames
Prior art date
Application number
PCT/CN2022/105638
Other languages
English (en)
French (fr)
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 WO2023016183A1 publication Critical patent/WO2023016183A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/144Movement detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the technical field of image processing, and in particular to a motion detection method, device, electronic equipment, and computer-readable storage medium.
  • Embodiments of the present application provide a motion detection method, device, electronic device, and computer-readable storage medium, which can improve the accuracy of motion detection.
  • a motion detection method is provided, which is applied to an electronic device, and the electronic device includes an image sensor, and the image sensor includes an RGBW pixel array, and the method includes:
  • the target pixel According to the light intensity of the current shooting scene, determine the target pixel corresponding to the light intensity of the current shooting scene from the RGBW pixel array; the target pixel includes W pixels or at least one color pixel in the RGBW pixel array ;
  • a motion detection device which is applied to an electronic device, the electronic device includes an image sensor, the image sensor includes an RGBW pixel array, and the device includes:
  • a target pixel determination module configured to determine a target pixel corresponding to the light intensity of the current shooting scene from the RGBW pixel array according to the light intensity of the current shooting scene; the target pixel includes W in the RGBW pixel array pixel or at least one color pixel;
  • a motion detection image generating module configured to acquire pixel values of each of the target pixels in at least two frames of images, and generate at least two frames of motion detection images based on the pixel values of each of the target pixels in at least two frames of images;
  • a motion detection module configured to perform motion detection based on the at least two frames of motion detection images, and obtain a motion detection result.
  • An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the motion detection method as described above operate.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the operation of the above-mentioned motion detection method is implemented.
  • a computer program product comprising a computer program, when the computer program is executed by a processor, the steps of the above-mentioned motion detection method are realized.
  • Fig. 1 is an application environment diagram of a motion detection method in an embodiment
  • Fig. 2 is a partial structural schematic diagram of an RGBW pixel array in an embodiment
  • Fig. 3 is a flowchart of a motion detection method in an embodiment
  • Fig. 4 is a flowchart of a motion detection method in an embodiment
  • FIG. 5 is a schematic diagram of motion detection and subsequent start-up shooting in an embodiment
  • FIG. 6 is a schematic diagram of motion detection and subsequent start-up shooting in another embodiment
  • FIG. 7 is a flowchart of a method for obtaining at least two frames of motion detection images corresponding to the target pixel based on the pixel values of each target pixel in at least two frames of images obtained in FIG. 3;
  • FIG. 8 is a schematic diagram of motion detection and subsequent start-up shooting in yet another embodiment
  • FIG. 9 is a flowchart of a method for obtaining at least two frames of motion detection images corresponding to the target pixel based on the pixel values of each target pixel in at least two frames of images obtained in FIG. 3;
  • Fig. 10 is a schematic diagram of motion detection and subsequent start-up shooting in yet another embodiment
  • FIG. 11 is a flowchart of a method for obtaining at least two frames of motion detection images corresponding to the target pixel based on the pixel values of each target pixel in at least two frames of images obtained in FIG. 3;
  • Fig. 12 is a schematic diagram of motion detection and subsequent start-up shooting in yet another embodiment
  • FIG. 13 is a flowchart of a method for performing motion detection based on at least two frames of motion detection images in FIG. 3 to obtain a motion detection result;
  • Fig. 14 is a schematic diagram of an RGBW pixel array and its pixel structure in one embodiment
  • Fig. 15 is a schematic diagram of an RGBW pixel array in another embodiment
  • Fig. 16 is a schematic diagram of an RGBW pixel array in another embodiment
  • Fig. 17 is a structural block diagram of a motion detection control device in an embodiment
  • Fig. 18 is a schematic diagram of the internal structure of an electronic device in one embodiment.
  • first, second and the like used in this application may be used to describe various elements herein, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element.
  • a first client could be termed a second client, and, similarly, a second client could be termed a first client, without departing from the scope of the present application.
  • Both the first client and the second client are clients, but they are not the same client.
  • Fig. 1 is a schematic diagram of an application environment of a motion detection method in an embodiment.
  • the application environment includes an electronic device 120, and the electronic device 120 includes an image sensor, and the image sensor includes an RGBW pixel array.
  • the electronic device 120 determines the target pixel corresponding to the light intensity of the current shooting scene from the RGBW pixel array according to the light intensity of the current shooting scene.
  • the target pixels include W pixels or at least one color pixel in the RGBW pixel array.
  • electronic devices can be mobile phones, tablet computers, PDA (Personal Digital Assistant, personal digital assistant), wearable devices (smart bracelets, smart watches, smart glasses, smart gloves, smart socks, smart belts, etc.), VR (virtual reality, virtual reality) devices, smart homes, driverless cars and other arbitrary terminal devices.
  • PDA Personal Digital Assistant, personal digital assistant
  • wearable devices smart watches, smart glasses, smart gloves, smart socks, smart belts, etc.
  • VR virtual reality, virtual reality
  • smart homes driverless cars and other arbitrary terminal devices.
  • the image sensor includes a plurality of RGBW pixel arrays arranged in an array.
  • Figure 2 shows a schematic diagram of an RGBW pixel array.
  • the RGBW pattern pixel array
  • Each RGBW pixel array includes a plurality of pixel units Z.
  • each RGBW pixel array includes 4 pixel units Z.
  • the four pixel units Z are respectively a red pixel unit, a green pixel unit, a green pixel unit and a red pixel unit.
  • each RGBW pixel array includes 6 or 8 pixel units Z, which is not limited in this application.
  • Each pixel unit Z includes W pixels (white pixels) D and color pixels D arranged in a diagonal line, and each pixel D corresponds to a microlens.
  • the color pixel D includes R pixel (red pixel), G pixel (green pixel) and B pixel (blue pixel).
  • the red pixel unit it includes 2 W pixels and 2 R pixels arranged diagonally;
  • the green pixel unit it includes 2 W pixels and 2 G pixels arranged diagonally; for the blue
  • the pixel unit includes 2 W pixels and 2 B pixels arranged diagonally.
  • each W pixel D includes a plurality of sub-pixels d arranged in an array
  • each color pixel D includes a plurality of sub-pixels d arranged in an array
  • each sub-pixel d corresponds to a photosensitive element.
  • the photosensitive element is an element capable of converting light signals into electrical signals.
  • the photosensitive element can be a photodiode.
  • each W pixel D includes 4 sub-pixels d (ie, 4 photodiodes) arranged in an array
  • each color pixel D includes 4 sub-pixels d (ie, 4 photodiodes) arranged in an array.
  • the green pixel D includes four photodiodes (Up-Left PhotoDiode, Up-Right PhotoDiode, Down-Left PhotoDiode and Down-Right PhotoDiode) arranged in an array.
  • photodiodes Up-Left PhotoDiode, Up-Right PhotoDiode, Down-Left PhotoDiode and Down-Right PhotoDiode
  • FIG. 3 is a flowchart of a motion detection method in one embodiment.
  • the motion detection method in this embodiment is described by taking the electronic device running on the electronic device in FIG. 1 as an example. As shown in FIG. 3 , the motion detection method includes operation 320 to operation 360 . in,
  • Operation 320 Determine the target pixel corresponding to the light intensity of the current shooting scene from the RGBW pixel array according to the light intensity of the current shooting scene; the target pixel includes W pixels or at least one color pixel in the RGBW pixel array.
  • the light intensity of the current shooting scene is not the same, and because the sensitivity of the RGB pixel array is different under different light intensities, therefore, in some weak light intensity (or dark light) , the amount of light entering the RGB pixel array is small, and the signal-to-noise ratio of the pixel signal (pixel value) collected through the RGB pixel array is low, which leads to a significant decrease in the accuracy of motion detection of the shooting scene.
  • Light intensity is also called light intensity.
  • Light intensity is a physical term, referring to the luminous flux of visible light received per unit area, referred to as illuminance, and the unit is Lux (Lux or lx).
  • Light Intensity is a quantity that indicates how strong or weak the light is and how much the surface area of an object is illuminated. The following table shows the light intensity values under different weather and locations:
  • the RGB pixel array of the image sensor in the traditional method is replaced with an RGBW pixel array. Since the RGBW pixel array is relative to the RGB pixel array, adding a white area to the RGB three-color Color Filter can increase the light transmittance. Since the sensitivity of the W pixel is stronger, the RGBW pixel array can collect signals more accurately than the RGB pixel array in a scene with weaker light intensity, thereby improving the accuracy of motion detection.
  • a target pixel corresponding to the light intensity of the current shooting scene is determined from W pixels or at least one color pixel of the RGBW pixel array.
  • the light intensity of the current shooting scene that is, the light intensity
  • the light intensity of the current shooting scene may be obtained through a sensor on the electronic device.
  • the target pixel corresponding to the light intensity of the current shooting scene is determined from the RGBW pixel array.
  • the W pixel is determined as the target pixel, so as to obtain more pixel signals through the W pixel. If the light intensity of the current shooting scene is greater than or equal to the preset threshold of light intensity, at least one of the RGB pixels is determined to be the target pixel. Because at this time, accurate pixel signals can be obtained through the RGB pixels, and the sensitivity of the W pixels is relatively strong. On the contrary, the W pixels are easy to be saturated, thereby affecting the accuracy of the obtained pixel signals.
  • Operation 340 acquiring pixel values of each target pixel in at least two frames of images, and generating at least two frames of motion detection images based on the pixel values of each target pixel in at least two frames of images.
  • the exposure of the RGBW pixel array is controlled, and the pixel value of each sub-pixel in the RGBW pixel array is acquired when each frame of image is captured. Then, extract the pixel value of the target pixel from the pixel values of each sub-pixel in the RGBW pixel array.
  • the target pixel is at least one of the RGB pixels
  • the pixel value of at least one of the RGB pixels is extracted from the pixel values of each sub-pixel in the RGBW pixel array, and the target pixel corresponding to the frame image is obtained pixel value.
  • a motion detection image corresponding to the frame image is generated.
  • the target pixel is a W pixel
  • the pixel value of the W pixel is extracted from the pixel values of each sub-pixel in the RGBW pixel array to obtain the pixel value of the target pixel corresponding to the frame image.
  • a motion detection image corresponding to the frame image is generated.
  • the at least two frames of motion detection images include at least two frames of images, and the present application does not limit the number of motion detection images.
  • operation 360 perform motion detection based on at least two frames of motion detection images, and obtain a motion detection result.
  • the detection of the moving object can be realized by the background subtraction method or the frame difference method, and the motion detection result can be obtained.
  • the optical flow method can also be used to detect moving objects and obtain motion detection results.
  • the motion detection result includes different moving objects and the moving track of each moving object.
  • a target pixel corresponding to the light intensity of the current shooting scene is determined from W pixels or at least one color pixel of the RGBW pixel array.
  • the accuracy of the pixel signal collected based on at least one color pixel in the RGBW pixel array is low, the pixel signal collected based on the W pixel is selected to generate at least two frames of motion detection Image, motion detection is performed based on at least two frames of motion detection images, and finally the accuracy of motion detection is improved.
  • the accuracy of the pixel signals collected based on the W pixels in the RGBW pixel array is low, you can choose to generate at least two frames of motion detection images based on the pixel signals collected by at least one color pixel, and generate at least two frames of motion detection images based on at least two frames of motion Detect images for motion detection, ultimately improving the accuracy of motion detection.
  • the target pixel corresponding to the light intensity of the current shooting scene is determined from the RGBW pixel array, including:
  • the target pixel corresponding to the light intensity of the current shooting scene is determined from the RGBW pixel array.
  • the preset threshold value of light intensity is the light intensity threshold value, based on the above-mentioned Table 1-1, the light intensity value 50lx of cloudy indoor and outdoor can be set as the first preset light intensity threshold value (hereinafter referred to as the first preset threshold value) .
  • the present application does not limit the specific value of the first preset threshold.
  • the W pixel determines the W pixel as the target pixel, so as to obtain more pixel signals through the W pixel. If the light intensity of the current shooting scene is greater than the first preset threshold, at least one of the RGB pixels is determined to be the target pixel. Because at this time, accurate pixel signals can be obtained through the RGB pixels, and the sensitivity of the W pixels is relatively strong, but the W pixels are easy to be saturated, thereby affecting the accuracy of the obtained pixel signals.
  • the W pixel when the light is weak, due to the strong sensitivity of the W pixel, the W pixel is used as the target pixel, and then the pixel signal collected by the W pixel is used to generate at least two frames of motion detection images, based on at least two frames Motion Detection Images can be accurately motion detected.
  • the light when the light is weak, at least one of the RGB pixels is used as the target pixel, and then at least two frames of motion detection images are generated through at least one of the collected pixel signals of the RGB pixels, based on the at least two frames of motion detection images can be Accurate motion detection.
  • motion detection can be performed accurately under different light intensities.
  • the target pixel corresponding to the light intensity of the current shooting scene is determined from the RGBW pixel array, including:
  • At least one color pixel in the pixel array unit is used as the target pixel.
  • using at least one color pixel in the pixel array unit as the target pixel may be any one of R pixel, G pixel, and B pixel as the target pixel, for example, using the R pixel as the target pixel, or using the G pixel as the target pixel. as the target pixel, or the B pixel as the target pixel. It is also possible to use any two of R pixels, G pixels, and B pixels as target pixels, for example, use RG pixels as target pixels, or use RB pixels as target pixels, or use GB pixels as target pixels. Alternatively, all the R pixels, G pixels, and B pixels may be used as target pixels. This is not limited in this application.
  • the light intensity of the current shooting scene is greater than or equal to the first preset threshold, it means that the light intensity at this time is good, and at least one of the RGB pixels can be determined as the target pixel. Because at this time, accurate pixel signals can be obtained through the RGB pixels, and the sensitivity of the W pixels is relatively strong, but the W pixels are easy to be saturated, thereby affecting the accuracy of the obtained pixel signals.
  • operation 340 acquiring pixel values of each target pixel in at least two frames of images, and generating at least two frames of motion detection images based on the pixel values of each target pixel in at least two frames of images includes:
  • the second preset threshold is greater than the first preset threshold
  • At least two frames of motion detection images are generated.
  • a motion detection method including:
  • Operation 402 judging whether the light intensity of the current shooting scene exceeds a first preset threshold
  • Operation 404 if yes, use at least one color pixel in the pixel array unit as the target pixel;
  • Operation 406 judging whether the light intensity of the current shooting scene exceeds a second preset threshold; the second preset threshold is greater than the first preset threshold;
  • Operation 408 if yes, acquire pixel values of each target pixel in at least two frames of images, combine pixel values of sub-pixels of each target pixel, and generate combined pixel values of each target pixel;
  • At least two frames of motion detection images are generated based on the binned pixel values of the target pixels.
  • the second preset threshold is greater than the first preset threshold.
  • the first preset threshold is set to 50 lx
  • the second preset threshold can be set to 200 lx. Both the first preset threshold and the second preset threshold here can be set to other values, and the specific values of the thresholds are not limited in this application.
  • the motion detection image is generated, the pixel value of at least one type of pixel in the RGB pixels corresponding to each frame of image may be acquired.
  • the motion detection image is generated directly based on the pixel value of at least one of the RGB pixels. In this way, the above operations are performed for each frame of image to obtain at least two frames of motion detection images.
  • the motion detection image is generated based on the pixel values of at least one of the RGB pixels, and there is no need to collect the pixel values of W pixels, thereby reducing the amount of data for motion detection and improving the processing efficiency of the system.
  • the pixel values of at least one type of pixel among the RGB pixels are combined to generate a combined pixel value of each type of pixel. Then, based on the combined pixel values of each type of pixel, a motion detection image corresponding to the frame image is generated. In this way, the above operations are performed for each frame of image to obtain at least two frames of motion detection images. Since the pixel values of each type of pixel are combined once, the amount of data is reduced to half of the original compared to the case of no combination. If only the pixel values of any one of the RGB pixels are collected and combined, the amount of data is reduced to one-sixth of the original compared to the case of no combination. Therefore, the amount of data for motion detection is reduced, and the processing efficiency of the system is improved.
  • the motion detection method in the embodiment of the present application firstly, it is judged whether the light intensity of the current shooting scene exceeds the first preset threshold, and if so, at least one color pixel in the pixel array unit is used as the target pixel. Then, continue to judge whether the light intensity of the current shooting scene exceeds the second preset threshold, if so, obtain the pixel values of each target pixel in at least two frames of images, combine the pixel values of the sub-pixels of each target pixel, and generate each target pixel The binned pixel value of . Finally, at least two frames of motion detection images are generated based on the combined pixel values of the target pixels.
  • the motion detection image is generated based on the pixel values of at least one of the RGB pixels, without collecting the pixel values of W pixels, thereby reducing the amount of data for motion detection and improving the processing efficiency of the system.
  • the pixel values of each type of pixel are merged once, which obviously further reduces the amount of data for motion detection and improves the processing efficiency of the system.
  • the target pixel includes R pixel, G pixel and B pixel
  • the pixel values of the sub-pixels of each target pixel are combined to generate the combined pixel value of each target pixel, including:
  • the pixel values of the sub-pixels of the B pixel are combined to generate a combined pixel value of the B pixel.
  • FIG. 5 it is a schematic diagram of motion detection and subsequent start-up of shooting in an embodiment.
  • the exposure of the RGBW pixel array is controlled, and each sub-pixel in the RGBW pixel array is obtained when each frame of image is captured. pixel value.
  • an original RAW image 504 is constructed.
  • the original RAW image 504 includes pixel values of sub-pixels of R pixels, G pixels, B pixels, and W pixels.
  • the pixel values of the sub-pixels of the R pixel, the G pixel and the B pixel are collected from the original RAW image 504 to form a RAW image 506 corresponding to the RGB pixels.
  • the first combination is performed on the RAW image 506 corresponding to the RGB pixels, that is, the pixel values of the sub-pixels of each pixel in the RAW image 506 corresponding to the RGB pixels are combined.
  • the pixel values of the sub-pixels of the R pixel are combined to generate the combined pixel value of the R pixel; the pixel values of the sub-pixels of the G pixel are combined to generate the combined pixel value of the G pixel;
  • the pixel values of the sub-pixels are combined to generate a combined pixel value of the B pixel.
  • a combined RAW image 508 corresponding to the RGB pixels is generated, and the combined RAW image 508 corresponding to the RGB pixels is a motion detection image. In this way, within a preset period of time, at least two frames of motion detection images are generated using the above method.
  • the at least two frames of motion detection images are acquired, and on the one hand, motion detection is performed based on the at least two frames of motion detection images to obtain a motion detection result.
  • motion detection is performed based on the at least two frames of motion detection images to obtain a motion detection result.
  • at least two frames of motion detection images are cached, data processing is performed on the cached images, and then motion detection is performed to obtain a motion detection result.
  • a trigger signal is generated.
  • the trigger signal is used to trigger the ISP, and control the ISP to call the camera to shoot and generate an image of the current shooting scene in response to the trigger signal.
  • the motion detection result does not contain a moving object, continue to control the exposure of the RGBW pixel array, and obtain the pixel values of each sub-pixel in the RGBW pixel array when each frame of image is captured.
  • the above operations are repeated to perform motion detection again based on at least two frames of motion detection images.
  • the exposure parameters are calculated by an automatic exposure unit in the electronic device.
  • exposure is performed based on the exposure parameters calculated by the automatic exposure unit.
  • the exposure of the RGBW pixel array is controlled to obtain the RGBW pixels when each frame of image is taken.
  • the pixel value for each subpixel in the array From the pixel values of the sub-pixels in the RGBW pixel array, the pixel values of the sub-pixels of the R pixel, the G pixel and the B pixel are collected.
  • the pixel values of the sub-pixels of the R pixel, the G pixel, and the B pixel are combined to generate combined pixel values of the R pixel, the G pixel, and the B pixel.
  • the pixel values of each type of pixel are merged once, so the amount of data for motion detection is obviously reduced, and the processing efficiency of the system is improved.
  • the pixel values of the sub-pixels of each target pixel are combined to generate combined pixel values of each target pixel, including:
  • the same direction includes the first direction or the second Two directions, and the first direction is perpendicular to the second direction;
  • FIG. 6 it is a schematic diagram of motion detection and subsequent start-up of shooting in an embodiment.
  • the exposure of the RGBW pixel array is controlled, and each sub-pixel in the RGBW pixel array is obtained when each frame of image is captured. pixel value.
  • an original RAW image 604 is constructed.
  • the original RAW image 604 includes pixel values of sub-pixels of R pixels, G pixels, B pixels, and W pixels.
  • the pixel values of each sub-pixel of R pixel, G pixel and B pixel are collected from the original RAW image 604 to form a RAW image 606 corresponding to RGB pixels, and the RAW image 606 corresponding to RGB pixels is merged for the first time.
  • the pixel values corresponding to multiple groups of adjacent two sub-pixels located in the same direction in each R pixel are determined.
  • the pixel values corresponding to multiple sets of adjacent two sub-pixels located in the same direction in each R pixel are combined to generate a combined pixel value of the R pixel.
  • the same direction here includes a first direction and a second direction
  • the first direction is the vertical direction of the RGBW pixel array
  • the second direction is the horizontal direction of the RGBW pixel array
  • the first direction and the second direction are perpendicular to each other.
  • the same direction may also be other directions, which is not limited in this application.
  • the numbers in the direction to the right are sub-pixel 1, sub-pixel 2, sub-pixel 3, and sub-pixel 4 (refer to FIG. 5 ).
  • the sub-pixels adjacent to the R pixel in the upper left corner in the first direction are determined as sub-pixel 1 and sub-pixel 3 , sub-pixel 2 and sub-pixel 4 .
  • sub-pixel 1 and sub-pixel 3 in the R pixel in the upper left corner are combined, and sub-pixel 2 and sub-pixel 4 are combined to generate a combined pixel value of the R pixel in the upper left corner.
  • the four sub-pixels of the R pixel in the lower right corner of the first pixel unit are numbered as sub-pixel 5, sub-pixel 6, sub-pixel 7, and sub-pixel 8 from top to bottom and from left to right ( Refer to Figure 5). Then, it is determined that the sub-pixels adjacent to the R pixel in the lower right corner in the first direction are sub-pixels 5 and 7, and the sub-pixels adjacent to the R pixel in the lower right corner in the first direction are determined as sub-pixels 6 and 7. 8. Then, sub-pixel 5 and sub-pixel 7 in the R pixel in the lower right corner are combined, and sub-pixel 6 and sub-pixel 8 are combined to generate a combined pixel value of the R pixel in the lower right corner.
  • the above operations are performed on the G pixels and B pixels in the RAW image 606 corresponding to the RGB pixels to generate the combined pixel value of each G pixel and the combined pixel value of each B pixel.
  • a combined RAW image 608 corresponding to the RGB pixels is generated.
  • the merged RAW image 608 corresponding to the RGB pixels is the motion detection image. In this way, within a preset period of time, at least two frames of motion detection images are generated using the above method.
  • the first pixel unit determines multiple groups of phases of the R pixel in the upper left corner in the second direction
  • the two adjacent sub-pixels are sub-pixel 1 and sub-pixel 2 , sub-pixel 3 and sub-pixel 4 .
  • the above operations are performed on the G pixels and B pixels in the RAW image corresponding to the RGB pixels to generate the combined pixel value of each G pixel and the combined pixel value of each B pixel.
  • a combined RAW image 608 corresponding to the RGB pixels is generated.
  • the merged RAW image corresponding to the RGB pixels is the motion detection image. In this way, within a preset period of time, at least two frames of motion detection images are generated using the above method.
  • the at least two frames of motion detection images are acquired, and on the one hand, motion detection is performed based on the at least two frames of motion detection images to obtain a motion detection result.
  • motion detection is performed based on the at least two frames of motion detection images to obtain a motion detection result.
  • at least two frames of motion detection images are cached, data processing is performed on the cached images, and then motion detection is performed to obtain a motion detection result.
  • a trigger signal is generated.
  • the trigger signal is used to trigger the ISP, and control the ISP to call the camera to shoot and generate an image of the current shooting scene in response to the trigger signal.
  • the motion detection result does not contain a moving object, continue to control the exposure of the RGBW pixel array, and obtain the pixel values of each sub-pixel in the RGBW pixel array when each frame of image is captured.
  • the above operations are repeated to perform motion detection again based on at least two frames of motion detection images.
  • the exposure parameters are calculated by an automatic exposure unit in the electronic device.
  • exposure is performed based on the exposure parameters calculated by the automatic exposure unit.
  • the exposure of the RGBW pixel array is controlled to obtain the RGBW pixels when each frame of image is taken.
  • the pixel value for each subpixel in the array From the pixel values of each sub-pixel in the RGBW pixel array, the pixel value of each sub-pixel of R pixel, G pixel and B pixel is collected.
  • Combine the pixel values of the sub-pixels of the R pixel, the G pixel and the B pixel specifically, combine the pixel values of multiple groups of adjacent two sub-pixels in the same direction in each pixel to generate the R pixel, G pixel and the combined pixel value of the B pixel.
  • the pixel values of each type of pixel are combined once from different directions, and the resolution of the motion detection image generated after the combination is improved. Then, compared with the original RAW image, the amount of data for motion detection is obviously reduced, the processing efficiency of the system is improved, and the resolution of the motion detection image is also guaranteed. Ultimately, the accuracy of motion detection is improved.
  • each RGBW pixel array includes a plurality of pixel units, each pixel unit includes a plurality of pixels, and each pixel includes a plurality of sub-pixels.
  • operation 340 is to obtain the pixel values of each target pixel in at least two frames of images, based on at least two The pixel value of each target pixel in the frame image generates at least two frames of motion detection images corresponding to the target pixel, including:
  • Operation 412 judging whether the light intensity of the current shooting scene is less than or equal to a second preset threshold
  • Operation 414 acquire the pixel values of each target pixel in at least two frames of images, combine the pixel values of the sub-pixels of the target pixels with the same color in the pixel unit, and generate the combined pixel value of the pixel unit; wherein, the second preset threshold greater than a first preset threshold;
  • the light intensity of the current shooting scene exceeds the first preset threshold and is less than or equal to the second preset threshold, it means that the light intensity at this time is at a normal level, and the determined target pixel is at least one of RGB pixels.
  • the pixel value of at least one type of pixel in the RGB pixels in the RGBW pixel array corresponding to each frame is acquired.
  • the pixel values of the sub-pixels of each pixel under the pixel unit are combined to generate the combined pixel value of the pixel unit.
  • the pixel values of the 8 sub-pixels corresponding to the 2 R pixels included in the R pixel unit can be directly combined to generate the combined pixel value of the pixel unit.
  • the above operation is performed on the G pixel unit and the B pixel unit under the RGBW pixel array to generate the combined pixel value of each G pixel unit and the combined pixel value of each B pixel unit.
  • At least two frame motion detection images are generated based on the combined pixel values of the pixel units.
  • a combined RAW image 808 corresponding to RGB pixels is generated.
  • the corresponding merged RAW image 808 is the motion detection image. In this way, within a preset period of time, the above method is used to generate multiple frames of motion detection images.
  • the target pixels are R pixels, G pixels, and B pixels
  • control Expose the RGBW pixel array to obtain the pixel value of each sub-pixel in the RGBW pixel array when each frame of image is captured.
  • the pixel values of the sub-pixels of the R pixel, the G pixel and the B pixel are collected.
  • the pixel values of the sub-pixels of the target pixel with the same color in the pixel unit are combined to generate the combined pixel value of the pixel unit, which reduces the amount of data for motion detection.
  • at least two frames of motion detection images are generated based on the combined pixel values of the pixel units. Since the amount of data for motion detection is reduced, the processing efficiency of the system is improved, and the accuracy of motion detection is improved at the same time.
  • operation 414 is to combine the pixel values of the sub-pixels of the target pixel with the same color in the pixel unit to generate the combined pixel value of the pixel unit, including:
  • the combined pixel values of the target pixels of the same color in the pixel unit are combined to generate the combined pixel value of the pixel unit.
  • the target pixel is at least one type of pixel in the RGB pixels
  • the pixel value of the sub-pixels of the R pixel can be directly Combining to generate the combined pixel value of the R pixel; or combining the pixel values of the sub-pixels of the G pixel to generate the combined pixel value of the G pixel; or combining the pixel values of the sub-pixels of the B pixel to generate the pixel value of the B pixel Merge pixel values.
  • the RGBW pixel array is controlled to expose the shooting scene 802, and the pixel values of each sub-pixel in the RGBW pixel array are obtained when each frame of image is captured. Based on the pixel values of each sub-pixel in the RGBW pixel array, an original RAW image 804 is formed.
  • the original RAW image 804 includes pixel values of sub-pixels of R pixels, G pixels, B pixels, and W pixels.
  • the pixel values of the sub-pixels of the R pixel, the G pixel and the B pixel are collected from the original RAW image 804 to form a RAW image 806 corresponding to the RGB pixels.
  • the first combination is performed on the RAW image 806 corresponding to the RGB pixels, that is, the pixel values of the sub-pixels of each pixel in the RAW image 806 corresponding to the RGB pixels are combined.
  • the pixel values of the sub-pixels of the R pixel are combined to generate the combined pixel value of the R pixel; the pixel values of the sub-pixels of the G pixel are combined to generate the combined pixel value of the G pixel; The pixel values of the sub-pixels are combined to generate a combined pixel value of the B pixel.
  • recombining is performed based on the combined pixel value of the R pixel, the combined pixel value of the G pixel, and the combined pixel value of the B pixel to generate a combined pixel value of the pixel unit.
  • the combined pixel value of the R pixel in the upper left corner of the first pixel unit is combined with the combined pixel value of the R pixel in the lower right corner of the first pixel unit to generate the combined pixel value of the first pixel unit .
  • a combined RAW image 808 corresponding to RGB pixels is generated.
  • the corresponding merged RAW image 808 is the motion detection image. In this way, within a preset period of time, at least two frames of motion detection images are generated using the above method.
  • Subsequent operations of motion detection and calculation of exposure parameters can be performed based on at least two frames of motion detection images, which will not be repeated here.
  • the target pixels are R pixels, G pixels, and B pixels
  • control Expose the RGBW pixel array to obtain the pixel value of each sub-pixel in the RGBW pixel array when each frame of image is captured. From the pixel values of the sub-pixels in the RGBW pixel array, the pixel values of the sub-pixels of the R pixel, the G pixel and the B pixel are collected.
  • the pixel values of the sub-pixels of the R pixel, the G pixel and the B pixel are combined twice to generate combined pixel values of the first pixel unit, the second pixel unit, the third pixel unit and the fourth pixel unit respectively.
  • the pixel values of each type of pixel are merged twice, and while reducing the amount of data for motion detection, the signal-to-noise ratio of the obtained merged pixel values of the pixel units is improved. Then, obviously, the amount of data for motion detection is reduced, the processing efficiency of the system is improved, and the accuracy of motion detection is improved at the same time.
  • the target pixel corresponding to the light intensity of the current shooting scene is determined from the RGBW pixel array, including:
  • the W pixel in the RGBW pixel array is used as the target pixel.
  • the light sensitivity of the W pixel is relatively strong, if the light intensity of the current shooting scene is less than or equal to the first preset threshold, it means that the light intensity at this time is relatively weak, and the W pixel in the RGBW pixel array is used as target pixel. Therefore, more accurate pixel signals can be collected through W pixels.
  • the The pixel value of the target pixel is based on the pixel value of each target pixel in the at least two frames of images to generate at least two frames of motion detection images, including:
  • Operation 902 acquire pixel values of W pixels in at least two frames of images, combine the pixel values of W pixels, and generate combined pixel values of W pixels;
  • Operation 904 based on the combined pixel values of the W pixels, at least two frames of motion detection images corresponding to the W pixels are generated.
  • the third preset threshold is smaller than the first preset threshold, for example, assuming that the first preset threshold is set to 50 lx, then the third preset threshold can be set to 20 lx. Both the first preset threshold and the third preset threshold here can be set to other values, and the specific values of the thresholds are not limited in this application.
  • the determined target pixel is a W pixel. Then, when the motion detection image is generated, the pixel values of the W pixels corresponding to each frame of image can be obtained.
  • the motion detection image is generated directly based on the pixel values of the W pixels. In this way, the above operations are performed for each frame of image to obtain at least two frames of motion detection images. The motion detection image is generated based on the pixel value of the W pixel, and the pixel value of the RGB pixel does not need to be collected, thereby reducing the amount of data for motion detection and improving the processing efficiency of the system.
  • the pixel values of W pixels are combined to generate combined pixel values of W pixels. Then, based on the combined pixel values of the W pixels, a motion detection image corresponding to the frame image is generated. In this way, the above operations are performed for each frame of image to obtain at least two frames of motion detection images. Since the pixel values of the W pixels are merged once, the amount of data is reduced to half of the original compared to the case of no merger. Therefore, the amount of data for motion detection is reduced, and the processing efficiency of the system is improved.
  • the RGBW pixel array is controlled to expose the shooting scene 1102, and the pixel value of each sub-pixel in the RGBW pixel array is acquired when each frame of image is captured. Based on the pixel values of each sub-pixel in the RGBW pixel array, an original RAW image 1004 is constructed.
  • the original RAW image 1004 includes pixel values of sub-pixels of R pixels, G pixels, B pixels, and W pixels.
  • the pixel values of each sub-pixel of W pixels are collected from the original RAW image 1004 to form a RAW image 1006 corresponding to the W pixels.
  • the RAW image 1006 corresponding to W pixels is combined for the first time, that is, the pixel values of the sub-pixels of each pixel in the RAW image 1006 corresponding to W pixels are combined to generate a combined pixel value of W pixels.
  • a combined RAW image 1008 corresponding to W pixels is generated, and the combined RAW image 1008 corresponding to RGB pixels is a motion detection image. In this way, within a preset period of time, at least two frames of motion detection images are generated using the above method.
  • Subsequent operations of motion detection and calculation of exposure parameters can be performed based on at least two frames of motion detection images, which will not be repeated here.
  • the motion detection method in the embodiment of the present application first, it is judged whether the light intensity of the current shooting scene exceeds the first preset threshold, if it is less than or equal to the first preset threshold, if so, the W pixel in the pixel array unit is used as the target pixel . Then, continue to judge whether the light intensity of the current shooting scene exceeds the third preset threshold, if so, obtain the pixel values of each W pixel in at least two frames of images, combine the pixel values of the sub-pixels of each W pixel, and generate each W pixel The binned pixel value of . Finally, at least two frames of motion detection images are generated based on the combined pixel values of the W pixels.
  • the motion detection image is generated based on the pixel value of the W pixel, and the pixel value of the RGB pixel does not need to be collected, thereby reducing the amount of data for motion detection and improving the processing efficiency of the system.
  • each RGBW pixel array includes a plurality of pixel units, each pixel unit includes a plurality of pixels, and each pixel includes a plurality of sub-pixels.
  • each pixel unit includes a plurality of pixels
  • each pixel includes a plurality of sub-pixels.
  • Operation 906 judging whether the light intensity of the current shooting scene is less than or equal to a third preset threshold
  • operation 908 acquire pixel values of W pixels in at least two frames of images, combine pixel values of sub-pixels of W pixels in the pixel unit, and generate a combined pixel value of the pixel unit.
  • the determined target pixel is a W pixel.
  • the pixel values of the sub-pixels of each W pixel under the pixel unit are combined to generate the combined pixel value of the pixel unit.
  • the pixel values of the sub-pixels of each W pixel in the R pixel unit are combined to generate the combined pixel value of the R pixel unit.
  • One way may be to directly combine the pixel values of the 8 sub-pixels corresponding to the 2 W pixels contained in the R pixel unit to generate the combined pixel value of the R pixel unit.
  • the pixel values of the sub-pixels of each W pixel in the R pixel unit may be combined twice to generate the combined pixel value of the R pixel unit.
  • the target pixel is a W pixel
  • the RGBW pixel array is controlled to expose the shooting scene 1202, and the pixel value of each sub-pixel in the RGBW pixel array is acquired when each frame of image is captured.
  • an original RAW image 1204 is constructed.
  • the original RAW image 1204 includes pixel values of sub-pixels of R pixels, G pixels, B pixels, and W pixels.
  • the pixel values of each sub-pixel of W pixels are collected from the original RAW image 1204 to form a RAW image 1206 corresponding to the W pixels.
  • the RAW image 1206 corresponding to W pixels is combined for the first time, that is, the pixel values of the sub-pixels of each pixel in the RAW image 1206 corresponding to W pixels are combined to generate a combined pixel value of W pixels.
  • combining is performed based on the combined pixel values of the W pixels to generate the combined pixel values of the pixel unit.
  • the combined pixel value of the W pixel in the upper right corner of the first pixel unit is combined with the combined pixel value of the W pixel in the lower left corner of the first pixel unit to generate the combined pixel value of the first pixel unit .
  • Combine the combined pixel values of the W pixels in each pixel unit in sequence to obtain the combined pixel value of the first pixel unit, the combined pixel value of the second pixel unit, the combined pixel value of the third pixel unit, and the combined pixel value of the fourth pixel unit The binned pixel value of .
  • At least two frames of motion detection images corresponding to W pixels are generated based on the combined pixel values of the pixel units.
  • a combined RAW image 1208 corresponding to W pixels is generated, the RGB pixel
  • the corresponding merged RAW image 1208 is the motion detection image. In this way, within a preset period of time, at least two frames of motion detection images are generated using the above method.
  • Subsequent operations of motion detection and calculation of exposure parameters can be performed based on at least two frames of motion detection images, which will not be repeated here.
  • the exposure of the RGBW pixel array is controlled to obtain the RGBW pixel when shooting each frame of image Pixel value for each subpixel in the array. From the pixel values of each sub-pixel in the RGBW pixel array, the pixel value of each sub-pixel of the W pixel is collected. The pixel values of the sub-pixels of the W pixels in the pixel unit are combined to generate the combined pixel values of the first pixel unit, the second pixel unit, the third pixel unit and the fourth pixel unit respectively.
  • the pixel values of each W pixel are combined twice, and while reducing the amount of data for motion detection, the signal-to-noise ratio of the combined pixel values of the obtained pixel units is improved. Then, obviously, the amount of data for motion detection is reduced, the processing efficiency of the system is improved, and the accuracy of motion detection is improved at the same time.
  • motion detection is performed based on at least two frames of motion detection images, and motion detection results are obtained, including:
  • Operation 362 for at least two frames of the motion detection image, calculate a histogram of distribution of pixel values of the motion detection image.
  • the pixel value distribution histogram graphically represents the number of pixels of each brightness level in the image, and shows the distribution of pixels in the image. Therefore, for each frame of the motion detection image, the pixel value distribution histogram of the motion detection image is calculated, and the number of pixels of different brightness levels can be visually compared through the pixel value distribution histogram.
  • Operation 364 calculating the range of change of the histogram of pixel value distribution of the motion detection image.
  • the change range of the pixel value distribution histogram of the motion detection image can be calculated based on the number of pixels of different brightness levels.
  • the preset change range threshold here may be set according to actual usage standards, which is not specifically limited in the present application. It is judged whether the change range of the pixel value distribution histogram exceeds the preset change range threshold, and if the change range of the pixel value distribution histogram exceeds the preset change range threshold, the motion detection result includes moving objects. If the change range of the pixel value distribution histogram does not exceed the preset change range threshold, the motion detection result does not contain a moving object.
  • the target pixel corresponding to the light intensity of the current shooting scene is determined from the RGBW pixel array; the target pixel includes W pixels or at least one color pixel in the RGBW pixel array.
  • the pixel values of each target pixel in at least two frames of images are acquired, and at least two frames of motion detection images are generated based on the pixel values of each target pixel in at least two frames of images.
  • the motion detection result includes a moving object. Therefore, the motion detection based on at least two frames of motion detection images is realized, so that the moving object can be captured in time after the moving object is found.
  • a motion detection method further comprising:
  • a trigger signal is generated; the trigger signal is used to trigger the image processor;
  • the image processor is controlled to respond to the trigger signal, calling the camera to shoot and generate an image of the current shooting scene.
  • ISP is the abbreviation of Image Signal Processor, which is the image signal processor.
  • Image Signal Processor By taking at least two frames of motion detection images, and performing motion detection based on the at least two frames of motion detection images, a motion detection result is obtained. If the motion detection result contains a moving object, a trigger signal is generated, and the trigger signal is sent to the ISP, and the ISP responds to the trigger signal and calls the camera to shoot to generate an image of the current shooting scene.
  • the camera does not need to be turned on all the time for shooting, but at least two frames of motion detection images are captured, and motion detection is performed based on the at least two frames of motion detection images to obtain a motion detection result. After a moving object appears in the motion detection result, the camera is called in time to capture the moving object. While reducing the power consumption of electronic devices, it is avoided to miss the capture of moving objects.
  • the electronic device also includes a microlens and an optical filter, and the microlens, the optical filter, and the image sensor are sequentially located on the incident light path;
  • the image sensor includes a plurality of RGBW pixel arrays arranged in an array, and each RGBW pixel array Including a plurality of pixel units, each pixel unit includes W pixels arranged in a diagonal line and color pixels arranged in another diagonal line, and each pixel corresponds to at least one microlens and a plurality of photosensitive elements; the color pixel Including R pixel, G pixel, B pixel.
  • each pixel corresponds to a first microlens, a filter, a second microlens, a metal wiring layer, and a plurality of photosensitive elements along the incident optical path in turn, or,
  • Each pixel corresponds to a first microlens, a filter, a metal wiring layer, a plurality of photosensitive elements and a third microlens sequentially along the incident optical path, or,
  • Each pixel corresponds to a first microlens, a filter, a second microlens, a metal wiring layer, a plurality of photosensitive elements and a third microlens along the incident light path in sequence.
  • each pixel corresponds to a microlens (Lens), a filter layer (Filter), a metal wiring layer (Metal layer) and a photodiode (PhotoDiode) along the incident light path.
  • each W pixel corresponds to at least one microlens
  • each color pixel corresponds to at least one microlens.
  • the absorption coefficient will decrease as the wavelength increases when it is incident on a silicon-based diode.
  • the drop or even can not be absorbed, the phenomenon of escaping to other adjacent pixels after penetrating the radio and television diode, and then causing crosstalk between pixel signals, reducing the signal-to-noise ratio of the pixel signal, and then leading to at least two frames of motion detection images obtained accuracy is reduced.
  • the accuracy of running detection is affected.
  • each pixel corresponds to the first microlens, optical filter, second microlens, metal wiring layer, multiple photosensitive element.
  • the first microlens is also referred to as a front microlens (FrontLens) and the second microlens is also referred to as a middle microlens (Middle Lens).
  • each pixel corresponds to a first microlens, a filter, a metal wiring layer, a plurality of photosensitive elements, and a third microlens sequentially along the incident light path.
  • the first microlens is also referred to as a front microlens (Front Lens) and the third microlens is also referred to as a rear microlens (backLens).
  • each pixel corresponds to a first microlens, a filter, a second microlens, a metal wiring layer, a plurality of photosensitive elements, and a third microlens sequentially along the incident light path.
  • the first microlens is also referred to as the front microlens (Front Lens)
  • the second microlens is also referred to as the middle microlens (Middle Lens)
  • the third microlens is also referred to as the rear microlens (backLens).
  • the filling factor of the pixel can be increased, thereby improving the quantum response and conversion efficiency of incident light. Therefore, accurate pixel signals can also be collected for long-wavelength light. Therefore, the accuracy of the generated at least two frames of motion detection images is improved, thereby improving the accuracy of motion detection.
  • an imaging device including a microlens, an optical filter, and an image sensor, wherein the microlens, the optical filter, and the image sensor are sequentially located on the incident light path;
  • the image sensor includes a plurality of RGBW pixel arrays arranged in an array, each RGBW pixel array includes a plurality of pixel units, and each pixel unit includes W pixels arranged diagonally and color pixels arranged diagonally, and Each pixel corresponds to at least one microlens and a plurality of photosensitive elements; each pixel includes a plurality of sub-pixels arranged in an array, and each sub-pixel corresponds to a photosensitive element; color pixels include R pixels, G pixels, and B pixels.
  • each pixel corresponds to a first microlens, a filter, a second microlens, a metal wiring layer, and a plurality of photosensitive elements along the incident optical path in turn, or,
  • Each pixel corresponds to a first microlens, a filter, a metal wiring layer, a plurality of photosensitive elements and a third microlens sequentially along the incident optical path, or,
  • Each pixel corresponds to a first microlens, a filter, a second microlens, a metal wiring layer, a plurality of photosensitive elements and a third microlens along the incident light path in turn.
  • an imaging device wherein a plurality of photosensitive elements corresponding to pixels are arranged symmetrically about the center.
  • FIG. 2 it is a schematic structural diagram of a part of the image sensor in an embodiment.
  • the image sensor includes a plurality of RGBW pixel arrays arranged in an array.
  • Figure 2 shows a schematic diagram of an RGBW pixel array.
  • Each RGBW pixel array includes a plurality of pixel units Z.
  • each RGBW pixel array includes 4 pixel units Z.
  • the four pixel units Z are respectively a red pixel unit, a green pixel unit, a green pixel unit and a red pixel unit.
  • Each pixel unit Z includes W pixels D and color pixels D arranged in a diagonal line, and each pixel D corresponds to a microlens.
  • the color pixel D includes R pixel, G pixel and B pixel. Specifically, for the red pixel unit, it includes 2 W pixels and 2 R pixels arranged diagonally; for the green pixel unit, it includes 2 W pixels and 2 G pixels arranged diagonally; for the blue The pixel unit includes 2 W pixels and 2 B pixels arranged diagonally.
  • each W pixel D includes a plurality of sub-pixels d arranged in an array
  • each color pixel D includes a plurality of sub-pixels d arranged in an array
  • each sub-pixel d corresponds to a photosensitive element. Since the plurality of photosensitive elements corresponding to the pixels are arranged in a center-symmetric manner, the W pixel, the R pixel, the G pixel and the B pixel include a plurality of sub-pixels arranged in a center-symmetric manner. That is, the photosensitive elements corresponding to these sub-pixels may be arranged symmetrically to the center in various arrangements or in various shapes, and are not limited to the arrangement in a square as shown in FIG. 3 .
  • the photosensitive elements corresponding to the sub-pixels may be arranged symmetrically to the center in various arrangements or shapes, and each sub-pixel d corresponds to a photosensitive element. Therefore, the W pixel, the R pixel, the G pixel, and the B pixel include a plurality of sub-pixels arranged in a center-symmetric manner. Diversified arrangements are provided for the sub-pixels, so the sub-pixels can collect diverse pixel signals, thereby improving the accuracy of subsequent motion detection.
  • the plurality of photosensitive elements corresponding to the pixels are arranged symmetrically in a trapezoidal manner.
  • each RGBW pixel array includes 4 pixel units Z.
  • the four pixel units Z are respectively a red pixel unit, a green pixel unit, a green pixel unit and a red pixel unit.
  • Each pixel unit Z includes W pixels D and color pixels D arranged in a diagonal line, and each pixel D corresponds to a microlens.
  • the color pixel D includes R pixel, G pixel and B pixel.
  • Each W pixel includes a plurality of sub-pixels d arranged in an array, and these sub-pixels are arranged centrally symmetrically in a trapezoidal manner.
  • each R pixel includes a plurality of sub-pixels d arranged in an array, and these sub-pixels are arranged symmetrically to the center in a trapezoidal manner.
  • Each G pixel includes a plurality of sub-pixels d arranged in an array, and these sub-pixels are arranged centrally symmetrically in a trapezoidal manner.
  • Each B pixel includes a plurality of sub-pixels d arranged in an array, and these sub-pixels are arranged symmetrically to the center in a trapezoidal manner.
  • each sub-pixel d corresponds to a photosensitive element.
  • the photosensitive element may be a photodiode (PD, PhotoDiode).
  • PD photodiode
  • FIG. 14 both the left PD and the right PD have a trapezoidal structure, and the left PD and the right PD are arranged symmetrically about the center.
  • the W pixels, R pixels, G pixels, and B pixels in the RGBW pixel array may also be combined in a variety of different arrangements, which is not specifically limited in this application.
  • the photosensitive elements corresponding to the sub-pixels may be arranged symmetrically to the center in various arrangements or shapes, and each sub-pixel d corresponds to a photosensitive element. Therefore, the W pixel, the R pixel, the G pixel, and the B pixel include a plurality of sub-pixels that are symmetrically arranged in a trapezoidal manner. Diversified arrangements are provided for the sub-pixels, so the sub-pixels can collect diverse pixel signals, thereby improving the accuracy of subsequent motion detection.
  • the plurality of photosensitive elements corresponding to the pixels are arranged symmetrically about the center in an L-shape.
  • each RGBW pixel array includes 4 pixel units Z.
  • the four pixel units Z are respectively a red pixel unit, a green pixel unit, a green pixel unit and a red pixel unit.
  • Each pixel unit Z includes W pixels D and color pixels D arranged in a diagonal line, and each pixel D corresponds to a microlens.
  • the color pixel D includes R pixel, G pixel and B pixel.
  • Each W pixel includes a plurality of sub-pixels d arranged in an array, and these sub-pixels are arranged symmetrically to the center in an L-shaped manner.
  • each R pixel includes a plurality of sub-pixels d arranged in an array, and these sub-pixels are arranged symmetrically to the center in an L-shape.
  • Each G pixel includes a plurality of sub-pixels d arranged in an array, and these sub-pixels are arranged symmetrically to the center in an L-shaped manner.
  • Each B pixel includes a plurality of sub-pixels d arranged in an array, and these sub-pixels are arranged symmetrically to the center in an L-shaped manner.
  • each sub-pixel d corresponds to a photosensitive element.
  • the photosensitive element may be a photodiode (PD, PhotoDiode).
  • PD photodiode
  • FIG. 15 both the left PD and the right PD have an L-shaped structure, and the left PD and the right PD are symmetrically arranged in the center.
  • the W pixels, R pixels, G pixels, and B pixels in the RGBW pixel array may also be combined in a variety of different arrangements, which is not specifically limited in this application.
  • the photosensitive elements corresponding to the sub-pixels may be arranged symmetrically to the center in various arrangements or shapes, and each sub-pixel d corresponds to a photosensitive element. Therefore, the W pixel, the R pixel, the G pixel, and the B pixel include a plurality of sub-pixels that are symmetrically arranged in an L-shape. Diversified arrangements are provided for the sub-pixels, so the sub-pixels can collect diverse pixel signals, thereby improving the accuracy of subsequent motion detection.
  • a motion detection device 1700 is provided, which is applied to an electronic device.
  • the electronic device includes an image sensor, and the image sensor includes an RGBW pixel array.
  • the device includes:
  • the target pixel determining module 1720 is configured to determine a target pixel corresponding to the light intensity of the current shooting scene from the RGBW pixel array according to the light intensity of the current shooting scene; the target pixel includes W pixels or at least one color pixel in the RGBW pixel array ;
  • a motion detection image generating module 1740 configured to acquire pixel values of each target pixel in at least two frames of images, and generate at least two frames of motion detection images based on the pixel values of each target pixel in at least two frames of images;
  • the motion detection module 1760 is configured to perform motion detection based on at least two frames of motion detection images, and obtain a motion detection result.
  • the target pixel determination module 1720 is further configured to determine the target pixel corresponding to the light intensity of the current shooting scene from the RGBW pixel array according to the light intensity of the current shooting scene and the preset threshold of light intensity.
  • the target pixel determination module 1720 includes:
  • the first target pixel determination unit is configured to use at least one color pixel in the pixel array unit as a target pixel when the light intensity of the current shooting scene exceeds a first preset threshold.
  • the motion detection image generation module 1740 includes:
  • the merging unit is used to obtain the pixel values of each target pixel in at least two frames of images if the light intensity of the current shooting scene exceeds the second preset threshold, and combine the pixel values of the sub-pixels of each target pixel to generate each target pixel The merged pixel value;
  • the motion detection image generating unit is configured to generate at least two frames of motion detection images based on the combined pixel value of the target pixel, where the second preset threshold is greater than the first preset threshold.
  • the combined pixel value generating unit of the target pixel is further configured to: combine the pixel values of the sub-pixels of the R pixel to generate a combined pixel value of the R pixel Pixel value; combining the pixel values of the sub-pixels of the G pixel to generate a combined pixel value of the G pixel; combining the pixel values of the sub-pixels of the B pixel to generate a combined pixel value of the B pixel.
  • the combined pixel value generating unit of the target pixel is also used for:
  • the same direction includes the first direction or the second direction direction, and the first direction is perpendicular to the second direction;
  • each RGBW pixel array includes a plurality of pixel units, each pixel unit includes a plurality of pixels, and each pixel includes a plurality of sub-pixels; if the light intensity of the current shooting scene exceeds a first preset threshold and is less than or equal to the second preset threshold, then the motion detection image generation module 1740 includes:
  • a merging unit configured to acquire pixel values of each target pixel in at least two frames of images, and combine pixel values of sub-pixels of target pixels of the same color in the pixel unit to generate a combined pixel value of the pixel unit;
  • a motion detection image generation unit configured to generate at least two frames of motion detection images based on the combined pixel values of the pixel units.
  • the merging unit is further configured to combine pixel values of sub-pixels of each target pixel to generate a combined pixel value of each target pixel; wherein, the second preset threshold is greater than the first preset threshold;
  • the combined pixel values of the target pixels of the same color in the pixel unit are combined to generate the combined pixel value of the pixel unit.
  • the motion detection image generating module 1740 is also used for:
  • the R pixel unit is a pixel unit including R pixels
  • the G pixel unit is a pixel unit including the G pixel;
  • the B pixel unit is a pixel unit including the B pixel
  • the combined pixel value of the R pixel unit, the combined pixel value of the G pixel unit, and the combined pixel value of the B pixel unit are fused to generate a combined pixel value of the target pixel.
  • the target pixel determination module 1720 includes:
  • the second target pixel determining unit is configured to use the W pixel in the RGBW pixel array as the target pixel if the light intensity of the current shooting scene is less than or equal to the first preset threshold.
  • the motion detection image generation module 1740 if the light intensity of the current shooting scene is less than or equal to the first preset threshold and exceeds the third preset threshold, and the third preset threshold is smaller than the first preset threshold, the motion detection image generation module 1740, Also used for:
  • At least two frames of motion detection images corresponding to the W pixels are generated.
  • each RGBW pixel array includes a plurality of pixel units, each pixel unit includes a plurality of pixels, and each pixel includes a plurality of sub-pixels; if the light intensity of the current shooting scene is less than or equal to the third preset threshold, The third preset threshold is less than the first preset threshold, then at least two frames of motion detection image generation module 1740 is further used for:
  • At least two frames of motion detection images corresponding to the W pixels are generated based on the combined pixel values of the pixel units.
  • the motion detection module is further configured to calculate the pixel value distribution histogram of the motion detection image for at least two frames of motion detection images; calculate the variation range of the pixel value distribution histogram of the motion detection image; if the pixel value distribution If the change range of the histogram exceeds the preset change range threshold, the motion detection result includes a moving object.
  • a motion detection device further comprising:
  • the photographing module is used to generate a trigger signal if the motion detection result contains a moving object; the trigger signal is used to trigger the image processor; the image processor is controlled to respond to the trigger signal to call the camera to shoot and generate an image of the current shooting scene.
  • the electronic device also includes a microlens and an optical filter, and the microlens, the optical filter, and the image sensor are sequentially located on the incident light path;
  • the image sensor includes a plurality of RGBW pixel arrays arranged in an array, and each RGBW pixel array Including a plurality of pixel units, each pixel unit includes W pixels arranged in a diagonal line and color pixels arranged in another diagonal line, and each pixel corresponds to at least one microlens and a plurality of photosensitive elements; the color pixel Including R pixel, G pixel, B pixel.
  • each pixel corresponds to a first microlens, a filter, a second microlens, a metal wiring layer, a plurality of photosensitive elements along the incident light path, or,
  • Each pixel corresponds to a first microlens, a filter, a metal wiring layer, a plurality of photosensitive elements and a third microlens sequentially along the incident optical path, or,
  • Each pixel corresponds to a first microlens, a filter, a second microlens, a metal wiring layer, a plurality of photosensitive elements and a third microlens along the incident light path in sequence.
  • each module in the above-mentioned motion detection device is only for illustration. In other embodiments, the motion detection device can be divided into different modules according to needs, so as to complete all or part of the functions of the above-mentioned motion detection device.
  • Each module in the above-mentioned motion detection device can be fully or partially realized by software, hardware and a combination thereof.
  • the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.
  • Fig. 18 is a schematic diagram of the internal structure of an electronic device in one embodiment.
  • the electronic device can be any terminal device such as mobile phone, tablet computer, notebook computer, desktop computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, sales terminal), vehicle-mounted computer, wearable device, etc.
  • the electronic device includes a processor and memory connected by a system bus.
  • the processor may include one or more processing units.
  • the processor can be a CPU (Central Processing Unit, central processing unit) or a DSP (Digital Signal Processing, digital signal processor), etc.
  • the memory may include non-volatile storage media and internal memory. Nonvolatile storage media store operating systems and computer programs.
  • the computer program can be executed by a processor to implement a motion detection method provided in the following embodiments.
  • the internal memory provides a high-speed running environment for the operating system computer program in the non-volatile storage medium.
  • each module in the motion detection device provided in the embodiment of the present application may be in the form of a computer program.
  • the computer program can run on a terminal or a server.
  • the program modules constituted by the computer program can be stored in the memory of the electronic device.
  • the operations of the methods described in the embodiments of the present application are realized.
  • the embodiment of the present application also provides a computer-readable storage medium.
  • One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform operations of the motion detection method.
  • the embodiment of the present application also provides a computer program product containing instructions, which, when run on a computer, causes the computer to execute the motion detection method.
  • Non-volatile memory can include ROM (Read-Only Memory, read-only memory), PROM (Programmable Read-only Memory, programmable read-only memory), EPROM (Erasable Programmable Read-Only Memory, erasable programmable read-only memory) Memory), EEPROM (Electrically Erasable Programmable Read-only Memory, Electrically Erasable Programmable Read-only Memory) or flash memory.
  • Volatile memory can include RAM (Random Access Memory, Random Access Memory), which is used as external cache memory.
  • RAM is available in various forms, such as SRAM (Static Random Access Memory, static random access memory), DRAM (Dynamic Random Access Memory, dynamic random access memory), SDRAM (Synchronous Dynamic Random Access Memory , synchronous dynamic random access memory), double data rate DDR SDRAM (Double Data Rate Synchronous Dynamic Random Access memory, double data rate synchronous dynamic random access memory), ESDRAM (Enhanced Synchronous Dynamic Random Access memory, enhanced synchronous dynamic random access memory access memory), SLDRAM (Sync Link Dynamic Random Access Memory, synchronous link dynamic random access memory), RDRAM (Rambus Dynamic Random Access Memory, bus dynamic random access memory), DRDRAM (Direct Rambus Dynamic Random Access Memory, interface dynamic random access memory) memory).
  • SRAM Static Random Access Memory, static random access memory
  • DRAM Dynanamic Random Access Memory, dynamic random access memory
  • SDRAM Synchronous Dynamic Random Access Memory , synchronous dynamic random access memory
  • double data rate DDR SDRAM Double Data Rate Synchronous Dynamic Random Access memory, double

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

本申请涉及一种运动检测方法,应用于电子设备,电子设备包括图像传感器,图像传感器包括RGBW像素阵列,该方法包括:根据当前拍摄场景的光线强度,从RGBW像素阵列的W像素或至少一种彩色像素中确定与当前拍摄场景的光线强度对应的目标像素。因此,就可以在不同的光线强度下,若基于RGBW像素阵列中至少一种彩色像素所采集的像素信号的准确性较低时,就选择基于W像素所采集的像素信号生成至少两帧运动检测图像,基于至少两帧运动检测图像进行运动检测,最终提高运动检测的准确性。反之同理,最终提高运动检测准确性。

Description

运动检测方法、装置、电子设备和计算机可读存储介质
本申请要求于2021年08月12日提交中国专利局,申请号为2021109270010,发明名称为“运动检测方法、装置、电子设备和计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理技术领域,特别是涉及一种运动检测方法、装置、电子设备和计算机可读存储介质。
背景技术
随着信息技术的不断发展,视频监控、人脸识别等技术也得到了广泛地应用和普及。在进行视频监控或人脸识别时,对物体或人进行运动检测就是其中一个非常重要的环节。
传统的运动检测方法,通过RGB像素阵列进行采集图像,再基于所采集的图像进行运动检测。然而,由于RGB像素阵列在不同的光线强度下的感光度不同,因此,在部分光线强度场景下,通过RGB像素阵列所采集到的信号的信噪比较低,即噪声比较多。那么,基于所述RGB像素阵列所采集到的信号进行运动检测,显然所得的运动检测结果的准确性也随之大幅降低。
发明内容
本申请实施例提供了一种运动检测方法、装置、电子设备、计算机可读存储介质,可以提高运动检测的准确性。
在其中一个实施例中,提供了一种运动检测方法,应用于电子设备,所述电子设备包括图像传感器,所述图像传感器包括RGBW像素阵列,所述方法包括:
根据当前拍摄场景的光线强度,从所述RGBW像素阵列中确定与所述当前拍摄场景的光线强度对应的目标像素;所述目标像素包括所述RGBW像素阵列中的W像素或至少一种彩色像素;
获取至少两帧图像中各所述目标像素的像素值,基于至少两帧图像中各所述目标像素的像素值生成至少两帧运动检测图像;
基于所述至少两帧运动检测图像进行运动检测,得到运动检测结果。
在其中一个实施例中,提供了一种运动检测装置,应用于电子设备,所述电子设备包括图像传感器,所述图像传感器包括RGBW像素阵列,所述装置包括:
目标像素确定模块,用于根据当前拍摄场景的光线强度,从所述RGBW像素阵列中确定与所述当前拍摄场景的光线强度对应的目标像素;所述目标像素包括所述RGBW像素阵列中的W像素或至少一种彩色像素;
运动检测图像生成模块,用于获取至少两帧图像中各所述目标像素的像素值,基于至少两帧图像中各所述目标像素的像素值生成至少两帧运动检测图像;
运动检测模块,用于基于所述至少两帧运动检测图像进行运动检测,得到运动检测结果。
一种电子设备,包括存储器及处理器,所述存储器中储存有计算得到机程序,所述计算得到机程序被所述处理器执行时,使得所述处理器执行如上所述的运动检测方法的操作。
一种计算得到机可读存储介质,其上存储有计算得到机程序,所述计算得到机程序被处理器执行时实现如上所述的运动检测方法的操作。
一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现如上所述的运动检测方法的步骤。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需 要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一个实施例中运动检测方法的应用环境图;
图2为一个实施例中RGBW像素阵列的部分结构示意图;
图3为一个实施例中运动检测方法的流程图;
图4为一个实施例中运动检测方法的流程图;
图5为一个实施例中进行运动检测及后续启动拍摄的示意图;
图6为另一个实施例中进行运动检测及后续启动拍摄的示意图;
图7为图3中获取至少两帧图像中各目标像素的像素值,基于至少两帧图像中各目标像素的像素值生成与目标像素对应的至少两帧运动检测图像方法的流程图;
图8为再一个实施例中进行运动检测及后续启动拍摄的示意图;
图9为图3中获取至少两帧图像中各目标像素的像素值,基于至少两帧图像中各目标像素的像素值生成与目标像素对应的至少两帧运动检测图像方法的流程图;
图10为再一个实施例中进行运动检测及后续启动拍摄的示意图;
图11为图3中获取至少两帧图像中各目标像素的像素值,基于至少两帧图像中各目标像素的像素值生成与目标像素对应的至少两帧运动检测图像方法的流程图;
图12为再一个实施例中进行运动检测及后续启动拍摄的示意图;
图13为图3中基于至少两帧运动检测图像进行运动检测,得到运动检测结果方法的流程图;
图14为一个实施例中RGBW像素阵列及其上像素结构的示意图;
图15为又一个实施例中RGBW像素阵列的示意图;
图16为再一个实施例中RGBW像素阵列的示意图;
图17为一个实施例中运动检测控制装置的结构框图;
图18为一个实施例中电子设备的内部结构示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一客户端称为第二客户端,且类似地,可将第二客户端称为第一客户端。第一客户端和第二客户端两者都是客户端,但其不是同一客户端。
图1为一个实施例中运动检测方法的应用环境示意图。如图1所示,该应用环境包括电子设备120,电子设备120包括图像传感器,图像传感器包括RGBW像素阵列。电子设备120根据当前拍摄场景的光线强度,从RGBW像素阵列中确定与当前拍摄场景的光线强度对应的目标像素。目标像素包括RGBW像素阵列中的W像素或至少一种彩色像素。获取至少两帧图像中各目标像素的像素值,基于至少两帧图像中各目标像素的像素值生成至少两帧运动检测图像,基于至少两帧运动检测图像进行运动检测,得到运动检测结果。其中,电子设备可以是手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、穿戴式设备(智能手环、智能手表、智能眼镜、智能手套、智能袜子、智能腰带等)、VR(virtual reality,虚拟现实)设备、智能家居、无人驾驶汽车等任意终端设备。
其中,图像传感器包括阵列排布的多个RGBW像素阵列。图2所示为一个RGBW像素阵列的示意图。RGBW pattern(像素阵列)由于相比于一般的Bayer pattern(拜耳像素阵列)增加了通光量,提高了所采集信号的信噪比。每个RGBW像素阵列包括多个像素单元Z,如图2所示,每个RGBW像素阵列包括4个像素单元Z。其中,这4个像素单元Z分别为红色像素单元、绿色像素单元、绿色像素单元及红色像素单元。当然,在其他实施例中,每个RGBW像素阵列包括6个或8个像素单元Z,本申请对此不做限定。
在每个像素单元Z中包括呈对角线排列的W像素(白色像素)D及彩色像素D,且每个像素D对应一个微透镜。其中,彩色像素D包括R像素(红色像素)、G像素(绿色像素)及B像素(蓝色像素)。具体的,针对红色像素单元,包括呈对角线排列的2个W像素及2个R像素;针对绿色像素单元,包括呈对角线排列的2个W像素及2个G像素;针对蓝色像素单元,包括呈对角线排列的2个W像素及2个B像素。
其中,每个W像素D包括阵列排布的多个子像素d,每个彩色像素D包括阵列排布的多个子像素d,且每个子像素d对应一个感光元件。其中,感光元件是一种能够将光信号转化为电信号的元件。例如,感光元件可为光电二极管。如图2所示,每个W像素D包括阵列排布的4个子像素d(即4个光电二极管),每个彩色像素D包括阵列排布的4个子像素d(即4个光电二极管)。例如,针对绿色像素D包括阵列排布的4个光电二极管(Up-Left PhotoDiode、Up-Right PhotoDiode、Down-Left PhotoDiode及Down-Right PhotoDiode)。
图3为一个实施例中运动检测方法的流程图。本实施例中的运动检测方法,以运行于图1中的电子设备上为例进行描述。如图3所示,运动检测方法包括操作320至操作360。其中,
操作320,根据当前拍摄场景的光线强度,从RGBW像素阵列中确定与当前拍摄场景的光线强度对应的目标像素;目标像素包括RGBW像素阵列中的W像素或至少一种彩色像素。
在不同拍摄场景或不同时刻,当前拍摄场景的光线强度均不尽相同,而由于RGB像素阵列在不同的光线强度下的感光度不同,因此,在部分较弱的光线强度(或暗光)下,RGB像素阵列的进光量较少,进而通过RGB像素阵列所采集到的像素信号(像素值)的信噪比较低,进而导致对拍摄场景进行运动检测的准确性也大幅降低。
其中,光线强度又称之为光照强度,光照强度是一种物理术语,指单位面积上所接受可见光的光通量,简称照度,单位勒克斯(Lux或lx)。光照强度用于指示光照的强弱和物体表面积被照明程度的量。下表为不同天气及位置下的光照强度值:
表1-1
天气及位置 光照强度值
晴天阳光直射地面 100000lx
晴天室内中央 200lx
阴天室外 50-500lx
阴天室内 5-50lx
月光(满月) 2500lx
晴朗月夜 0.2lx
黑夜 0.0011lx
从上述表1-1中可知,在拍摄场景或不同时刻,当前拍摄场景的光线强度相差较大。
为了解决在部分较弱的光线强度(或暗光)下,运动检测的准确性也大幅降低问题,将传统方法中图像传感器的RGB像素阵列,替换为RGBW像素阵列。由于RGBW像素阵列相对于RGB像素阵列,在RGB三色Color Filter增加一个白色区域可以提高光线的透过率。由于W像素的感光度较强,那么,RGBW像素阵列相对于RGB像素阵列在光线强度较弱的场景下,就能够更加准确地采集信号,进而提高运动检测的准确性。
具体地,根据当前拍摄场景的光线强度,从RGBW像素阵列的W像素或至少一种彩色像素中确定与当前拍摄场景的光线强度对应的目标像素。首先,获取当前拍摄场景的光线强度即光照强度,这里可以是通过电子设备上的传感器来获取当前拍摄场景的光线强度。然后,基于当前拍摄场景的光线强度与光线强度的预设阈值之间的大小关系,从RGBW像素阵列中确定与当前拍摄场景的光线强度对应的目标像素。例如,若当前拍摄场景的光线强度小于光线强度的预设阈值,则说明此时的光线较弱,那么确定W像素为目标像素,以通过W像素获取到更多的像素信号。若当前拍摄场景的光线强度大于或等于光线强度的预设阈值,则确定RGB像素中的至少一种为目标像素。因为此时通过RGB像素就可以获取到准确的像素信号,而W像素的感光度较强,反而W像素容易饱和进而影响所得到的像素信号的准 确性。
操作340,获取至少两帧图像中各目标像素的像素值,基于至少两帧图像中各目标像素的像素值生成至少两帧运动检测图像。
在确定了目标像素之后,控制RGBW像素阵列曝光,获取拍摄每一帧图像时RGBW像素阵列中各子像素的像素值。然后,从该RGBW像素阵列中各子像素的像素值中提取目标像素的像素值。
具体的,若目标像素为RGB像素中的至少一种,那么从该RGBW像素阵列中各子像素的像素值中提取RGB像素中的至少一种的像素值,得到了该帧图像对应的目标像素的像素值。基于该帧图像对应的目标像素的像素值,生成与该帧图像对应的运动检测图像。
若目标像素为W像素,那么从该RGBW像素阵列中各子像素的像素值中提取W像素的像素值,得到了该帧图像对应的目标像素的像素值。基于该帧图像对应的目标像素的像素值,生成与该帧图像对应的运动检测图像。如此,可以在预设时间段内连续生成至少两帧运动检测图像。这里的至少两帧运动检测图像至少包括两帧图像,本申请并不对运动检测图像的数量进行限制。
操作360,基于至少两帧运动检测图像进行运动检测,得到运动检测结果。
针对至少两帧运动检测图像,可以通过背景减除法或帧差法实现运动物体检测,得到运动检测结果。当然,还可以通过光流法实现运动物体检测,得到运动检测结果。这里,运动检测结果包括不同的运动目标以及每个运动目标的运动轨迹。
本申请实施例中的运动检测方法,由于RGB像素阵列在不同的光线强度下的感光度不同,因此,在部分光线强度下,通过RGB像素阵列所采集的像素信号的准确性较低,进而导致运动检测的准确性也大幅降低。在本申请中,根据当前拍摄场景的光线强度,从RGBW像素阵列的W像素或至少一种彩色像素中确定与当前拍摄场景的光线强度对应的目标像素。因此,就可以在不同的光线强度下,若基于RGBW像素阵列中至少一种彩色像素所采集的像素信号的准确性较低时,就选择基于W像素所采集的像素信号生成至少两帧运动检测图像,基于至少两帧运动检测图像进行运动检测,最终提高运动检测的准确性。同理,若基于RGBW像素阵列中W像素所采集的像素信号的准确性较低时,就可以选择基于至少一种彩色像素所采集的像素信号生成至少两帧运动检测图像,基于至少两帧运动检测图像进行运动检测,最终提高运动检测的准确性。
在一个实施例中,根据当前拍摄场景的光线强度,从RGBW像素阵列中确定与当前拍摄场景的光线强度对应的目标像素,包括:
根据当前拍摄场景的光线强度与光线强度的预设阈值,从RGBW像素阵列中确定与当前拍摄场景的光线强度对应的目标像素。
其中,光线强度的预设阈值即为光照强度阈值,基于上述表1-1可以设定阴天室内与室外的光照强度值50lx为第一预设光线强度阈值(下文简称第一预设阈值)。当然,本申请中并不对第一预设阈值的具体数值进行限定。
若当前拍摄场景的光线强度小于或等于第一预设阈值,则说明此时的光线较弱,那么确定W像素为目标像素,以通过W像素获取到更多的像素信号。若当前拍摄场景的光线强度大于第一预设阈值,则确定RGB像素中的至少一种为目标像素。因为此时通过RGB像素就可以获取到准确的像素信号,而W像素的感光度较强,反而W像素容易饱和进而影响所得到的像素信号的准确性。
本申请实施例中,在光线较弱时,由于W像素的感光度较强,则采用W像素作为目标像素,然后通过W像素所采集的像素信号生成至少两帧运动检测图像,基于至少两帧运动检测图像可以准确地进行运动检测。反之,在光线较弱时,采用RGB像素中的至少一种作为目标像素,然后通过RGB像素中的至少一种所采集的像素信号生成至少两帧运动检测图像,基于至少两帧运动检测图像可以准确地进行运动检测。最终,实现了在不同的光线强度下,均可以实现准确地进行运动检测。
在一个实施例中,根据当前拍摄场景的光线强度与光线强度的预设阈值,从RGBW像素阵列中确定与当前拍摄场景的光线强度对应的目标像素,包括:
若当前拍摄场景的光线强度超过第一预设阈值时,则将像素阵列单元中的至少一种彩色像素作为目标像素。
这里,将像素阵列单元中的至少一种彩色像素作为目标像素,可以是将R像素、G像素、B像素中的任何一种作为目标像素,例如,将R像素作为目标像素,或将G像素作为目标像素,或将B像素作为目标像素。也可以是将R像素、G像素、B像素中的任何两种作为目标像素,例如,将RG像素作为目标像素,或将RB像素作为目标像素,或将GB像素作为目标像素。也可以是将R像素、G像素、B像素全部作为目标像素。本申请中并不对此进行限定。
本申请实施例中,若当前拍摄场景的光线强度大于或等于第一预设阈值,则说明此时的光线强度较好,可以确定RGB像素中的至少一种为目标像素。因为此时通过RGB像素就可以获取到准确的像素信号,而W像素的感光度较强,反而W像素容易饱和进而影响所得到的像素信号的准确性。
在一个实施例中,操作340,获取至少两帧图像中各目标像素的像素值,基于至少两帧图像中各目标像素的像素值生成至少两帧运动检测图像,包括:
若当前拍摄场景的光线强度超过第二预设阈值,则获取至少两帧图像中各目标像素的像素值,对各目标像素的子像素的像素值进行合并,生成各目标像素的合并像素值;第二预设阈值大于第一预设阈值;
基于目标像素的合并像素值,生成至少两帧运动检测图像。
如图4所示,提供了一种运动检测方法,包括:
操作402,判断当前拍摄场景的光线强度是否超过第一预设阈值;
操作404,若是,则将像素阵列单元中的至少一种彩色像素作为目标像素;
操作406,判断当前拍摄场景的光线强度是否超过第二预设阈值;第二预设阈值大于第一预设阈值;
操作408,若是,获取至少两帧图像中各目标像素的像素值,对各目标像素的子像素的像素值进行合并,生成各目标像素的合并像素值;
操作410,基于目标像素的合并像素值,生成至少两帧运动检测图像。
具体的,在判断当前拍摄场景的光线强度是否超过第一预设阈值之后,继续判断当前拍摄场景的光线强度是否超过第二预设阈值。这里,第二预设阈值大于第一预设阈值,例如,假设第一预设阈值设定为50lx,那么可以设定第二预设阈值为200lx。这里的第一预设阈值、第二预设阈值均可以设置为其他数值,在本申请中并不对阈值的具体数值进行限定。
若当前拍摄场景的光线强度超过第二预设阈值,则说明此时的光线强度充足,且所确定的目标像素为RGB像素中的至少一种。那么,在生成运动检测图像时,可以获取每一帧图像对应的RGB像素中的至少一种像素的像素值。在其中一个实施方式中,直接基于RGB像素中的至少一种像素的像素值生成运动检测图像。如此,针对每一帧图像都进行上述操作,得到至少两帧运动检测图像。基于RGB像素中的至少一种像素的像素值生成运动检测图像,就不需要采集W像素的像素值,从而减少了进行运动检测的数据量,提升了系统的处理效率。
在其中另一个实施方式中,将RGB像素中的至少一种像素的像素值进行合并,生成每一种像素的合并像素值。然后,基于每一种像素的合并像素值,生成与该帧图像对应的运动检测图像。如此,针对每一帧图像都进行上述操作,得到至少两帧运动检测图像。由于对每种像素的像素值进行了一次合并,从而相对于不合并的情况,数据量减少为原来的二分之一。若仅仅采集RGB像素中的任意一种像素的像素值进行合并,则相对于不合并的情况,数据量减少为原来的六分之一。从而,减少了进行运动检测的数据量,提升了系统的处理效率。
本申请实施例中的运动检测方法,首先,判断当前拍摄场景的光线强度是否超过第一预设阈值,若是,则将像素阵列单元中的至少一种彩色像素作为目标像素。然后,继续判断当前拍摄场景的光线强度是否超过第二预设阈值,若是,获取至少两帧图像中各目标像素的像素值,对各目标像素的子像素的像素值进行合并,生成各目标像素的合并像素值。最后,基于目标像素的合并像素值,生成至少两帧运动检测图像。
首先,基于RGB像素中的至少一种像素的像素值生成运动检测图像,就不需要采集W像素的像素值,从而减少了进行运动检测的数据量,提升了系统的处理效率。其次,对每种像素的像素值进行了一次合并,那么,显然更进一步减少了进行运动检测的数据量,提升了系统的处理效率。
接上一个实施例,若目标像素包括R像素、G像素及B像素,则对各目标像素的子像素的像素值 进行合并,生成各目标像素的合并像素值,包括:
对R像素的子像素的像素值进行合并,生成R像素的合并像素值;
对G像素的子像素的像素值进行合并,生成G像素的合并像素值;
对B像素的子像素的像素值进行合并,生成B像素的合并像素值。
结合图5所示,为一个实施例中进行运动检测及后续启动拍摄的示意图。针对光线强度超过第二预设阈值的拍摄场景502,在确定了目标像素为R像素、G像素及B像素之后,控制RGBW像素阵列曝光,获取拍摄每一帧图像时RGBW像素阵列中各子像素的像素值。基于RGBW像素阵列中各子像素的像素值,构成了原始RAW图像504。该原始RAW图像504中包括R像素、G像素及B像素、W像素的各子像素的像素值。
从原始RAW图像504中采集R像素、G像素及B像素的各子像素的像素值,构成了RGB像素对应的RAW图像506。对RGB像素对应的RAW图像506进行第一次合并,即对RGB像素对应的RAW图像506中各像素的子像素的像素值进行合并。如图5所示,对R像素的子像素的像素值进行合并,生成R像素的合并像素值;对G像素的子像素的像素值进行合并,生成G像素的合并像素值;对B像素的子像素的像素值进行合并,生成B像素的合并像素值。基于R像素的合并像素值、G像素的合并像素值及B像素的合并像素值,生成RGB像素对应的合并RAW图像508,该RGB像素对应的合并RAW图像508即为运动检测图像。如此,在预设时间段内,采用上述方法生成至少两帧运动检测图像。
然后,获取该至少两帧运动检测图像,一方面基于至少两帧运动检测图像进行运动检测,得到运动检测结果。具体的,将至少两帧运动检测图像进行缓存,对缓存图像进行数据处理,再进行运动检测得到运动检测结果。若运动检测结果为包含运动物体,则生成触发信号。该触发信号用于触发ISP,并控制ISP响应于触发信号,调用摄像头进行拍摄生成当前拍摄场景的图像。若运动检测结果为不包含运动物体,则继续控制RGBW像素阵列曝光,获取拍摄每一帧图像时RGBW像素阵列中各子像素的像素值。重复进行上述操作,以再次基于至少两帧运动检测图像进行运动检测。
另一方面,基于至少两帧运动检测图像,通过电子设备中的自动曝光单元计算曝光参数。以便在调用摄像头进行拍摄生成当前拍摄场景的图像,基于自动曝光单元所计算出的曝光参数进行曝光。
本申请实施例中,针对光线强度超过第二预设阈值的拍摄场景,在确定了目标像素为R像素、G像素及B像素之后,控制RGBW像素阵列曝光,获取拍摄每一帧图像时RGBW像素阵列中各子像素的像素值。从RGBW像素阵列中各子像素的像素值中,采集R像素、G像素及B像素的各子像素的像素值。分别对R像素、G像素及B像素的各子像素的像素值进行合并,生成R像素、G像素及B像素的合并像素值。对每种像素的像素值进行了一次合并,那么,显然减少了进行运动检测的数据量,提升了系统的处理效率。
在一个实施例中,若目标像素包括R像素、G像素及B像素,则对各目标像素的子像素的像素值进行合并,生成各目标像素的合并像素值,包括:
对R像素中位于同一方向上的多组相邻两个子像素对应的像素值进行合并,生成多组像素值,基于多组像素值得到R像素的合并像素值;同一方向包括第一方向或第二方向,且第一方向与第二方向垂直;
对G像素中处于同一方向的多组相邻子像素的像素值进行合并,生成多组像素值,基于多组像素值得到G像素的合并像素值;
对B像素中处于同一方向的多组相邻子像素的像素值进行合并,生成多组像素值,基于多组像素值得到B像素的合并像素值。
如图6所示,为一个实施例中进行运动检测及后续启动拍摄的示意图。针对光线强度超过第二预设阈值的拍摄场景602,在确定了目标像素为R像素、G像素及B像素之后,控制RGBW像素阵列曝光,获取拍摄每一帧图像时RGBW像素阵列中各子像素的像素值。基于RGBW像素阵列中各子像素的像素值,构成了原始RAW图像604。该原始RAW图像604中包括R像素、G像素及B像素、W像素的各子像素的像素值。
从原始RAW图像604中采集R像素、G像素及B像素的各子像素的像素值,构成了RGB像素对 应的RAW图像606,对RGB像素对应的RAW图像606进行第一次合并。在进行第一次合并时,首先,从RGB像素对应的RAW图像606中,确定每个R像素中位于同一方向上的多组相邻两个子像素对应的像素值。其次,将每个R像素中位于同一方向上的多组相邻两个子像素对应的像素值进行合并,生成R像素的合并像素值。其中,这里的同一方向包括第一方向及第二方向,第一方向为RGBW像素阵列的竖直方向,第二方向为RGBW像素阵列的水平方向,且第一方向与第二方向相互垂直。当然,同一方向还可以是其他方向,本申请对此不做限定。
例如,在同一方向为第一方向的前提下,参考图6(a)所示,对第一像素单元(R像素单元)中左上角的R像素的4个子像素按照从上到下、从左到右的方向编号为子像素1、子像素2、子像素3及子像素4(可参考图5)。那么,确定左上角的R像素在第一方向上相邻的子像素为子像素1及子像素3、子像素2及子像素4。然后,将左上角的R像素中子像素1及子像素3进行合并,将子像素2及子像素4进行合并,生成左上角的R像素的合并像素值。
对第一像素单元(R像素单元)中右下角的R像素的4个子像素按照从上到下、从左到右的方向编号为子像素5、子像素6、子像素7及子像素8(可参考图5)。那么,确定右下角的R像素在第一方向上相邻的子像素为子像素5、子像素7,确定右下角的R像素在第一方向上相邻的子像素为子像素6、子像素8。然后,将右下角的R像素中子像素5及子像素7进行合并,将子像素6及子像素8进行合并,生成右下角的R像素的合并像素值。
同理,针对RGB像素对应的RAW图像606中的G像素、B像素进行上述操作,生成每个G像素的合并像素值、每个B像素的合并像素值。
最后,基于每个R像素的合并像素值、每个G像素的合并像素值、每个B像素的合并像素值,生成RGB像素对应的合并RAW图像608。该RGB像素对应的合并RAW图像608即为运动检测图像。如此,在预设时间段内,采用上述方法生成至少两帧运动检测图像。
例如,在同一方向为第二方向的前提下,参考图6(b)所示,对第一像素单元(R像素单元)中那么,确定左上角的R像素在第二方向上的多组相邻两个子像素为子像素1及子像素2、子像素3及子像素4。然后,将左上角的R像素中子像素1的像素值及子像素2的像素值进行合并,将子像素3的像素值及子像素4的像素值进行合并,生成左上角的R像素的合并像素值。
那么,确定右下角的R像素在第二方向上的多组相邻子像素为子像素5、子像素6,确定右下角的R像素在第二方向上的多组相邻子像素为子像素7、子像素8。然后,将右下角的R像素中子像素5的像素值及子像素6的像素值进行合并,将子像素7的像素值及子像素8的像素值进行合并,生成右下角的R像素的合并像素值。
同理,针对RGB像素对应的RAW图像中的G像素、B像素进行上述操作,生成每个G像素的合并像素值、每个B像素的合并像素值。
最后,基于每个R像素的合并像素值、每个G像素的合并像素值、每个B像素的合并像素值,生成RGB像素对应的合并RAW图像608。该RGB像素对应的合并RAW图像即为运动检测图像。如此,在预设时间段内,采用上述方法生成至少两帧运动检测图像。
然后,获取该至少两帧运动检测图像,一方面基于至少两帧运动检测图像进行运动检测,得到运动检测结果。具体的,将至少两帧运动检测图像进行缓存,对缓存图像进行数据处理,再进行运动检测得到运动检测结果。若运动检测结果为包含运动物体,则生成触发信号。该触发信号用于触发ISP,并控制ISP响应于触发信号,调用摄像头进行拍摄生成当前拍摄场景的图像。若运动检测结果为不包含运动物体,则继续控制RGBW像素阵列曝光,获取拍摄每一帧图像时RGBW像素阵列中各子像素的像素值。重复进行上述操作,以再次基于至少两帧运动检测图像进行运动检测。
另一方面,基于至少两帧运动检测图像,通过电子设备中的自动曝光单元计算曝光参数。以便在调用摄像头进行拍摄生成当前拍摄场景的图像,基于自动曝光单元所计算出的曝光参数进行曝光。
本申请实施例中,针对光线强度超过第二预设阈值的拍摄场景,在确定了目标像素为R像素、G像素及B像素之后,控制RGBW像素阵列曝光,获取拍摄每一帧图像时RGBW像素阵列中各子像素的像素值。从RGBW像素阵列中各子像素的像素值中,采集R像素、G像素及B像素的各子像素的像 素值。分别对R像素、G像素及B像素的各子像素的像素值进行合并,具体为对每个像素中处于同一方向的多组相邻两个子像素的像素值进行合并,生成R像素、G像素及B像素的合并像素值。从不同的方向对每种像素的像素值进行了一次合并,提高了合并后所生成的运动检测图像的分辨率。那么,相对于原始RAW图像显然减少了进行运动检测的数据量,提升了系统的处理效率,且也同时保证了运动检测图像的分辨率。最终,提高了运动检测的准确性。
在一个实施例中,每个RGBW像素阵列包括多个像素单元,每个像素单元包括多个像素,每个像素包括多个子像素。如图7所示,若当前拍摄场景的光线强度超过第一预设阈值,且小于或等于第二预设阈值,则操作340,获取至少两帧图像中各目标像素的像素值,基于至少两帧图像中各目标像素的像素值生成与目标像素对应的至少两帧运动检测图像,包括:
操作412,判断当前拍摄场景的光线强度是否小于或等于第二预设阈值;
操作414,获取至少两帧图像中各目标像素的像素值,将像素单元中各色彩相同的目标像素的子像素的像素值进行合并,生成像素单元的合并像素值;其中,第二预设阈值大于第一预设阈值;
若当前拍摄场景的光线强度超过第一预设阈值,且小于或等于第二预设阈值,则说明此时的光线强度处于一般水平,且所确定的目标像素为RGB像素中的至少一种。
具体的,获取每一帧对应的RGBW像素阵列下RGB像素中的至少一种像素的像素值。针对每个像素单元,将该像素单元下每个像素的子像素的像素值进行合并,生成像素单元的合并像素值。
例如,结合图8所示,针对RGBW像素阵列下的R像素单元,可以将R像素单元所包含的2个R像素对应的8个子像素的像素值直接进行合并,生成像素单元的合并像素值。
同理,针对RGBW像素阵列下的G像素单元及B像素单元、进行上述操作,生成每个G像素单元的合并像素值、每个B像素单元的合并像素值。
操作416,基于像素单元的合并像素值,生成至少两帧帧运动检测图像。
基于第一像素单元的合并像素值、第二像素单元的合并像素值、第三像素单元的合并像素值及第四像素单元的合并像素值,生成RGB像素对应的合并RAW图像808,该RGB像素对应的合并RAW图像808即为运动检测图像。如此,在预设时间段内,采用上述方法生成多帧运动检测图像。
基于多帧运动检测图像就可以进行后续运动检测及计算曝光参数的操作,在此不再赘述。
本申请实施例中,针对当前拍摄场景的光线强度超过第一预设阈值,且小于或等于第二预设阈值的拍摄场景,在确定了目标像素为R像素、G像素及B像素之后,控制RGBW像素阵列曝光,获取拍摄每一帧图像时RGBW像素阵列中各子像素的像素值。从RGBW像素阵列中各子像素的像素值中,采集R像素、G像素及B像素的各子像素的像素值。将像素单元中各色彩相同的目标像素的子像素的像素值进行合并,生成像素单元的合并像素值,减少了进行运动检测的数据量。最后,基于像素单元的合并像素值,生成至少两帧运动检测图像。由于减少了进行运动检测的数据量,因此,提升了系统的处理效率,同时提高运动检测的准确性。
接上一个实施例,操作414,将像素单元中各色彩相同的目标像素的子像素的像素值进行合并,生成像素单元的合并像素值,包括:
对各目标像素的子像素的像素值进行合并,生成各目标像素的合并像素值;其中,第二预设阈值大于第一预设阈值;
针对每个像素单元,将像素单元中各色彩相同的目标像素的合并像素值进行合并,生成像素单元的合并像素值。
首先,获取每一帧对应的RGBW像素阵列下RGB像素中的至少一种像素的像素值,对RGB像素中的至少一种像素的子像素的像素值进行合并,生成各每一种像素的合并像素值。
具体的,因为目标像素为RGB像素中的至少一种像素,所以在对RGB像素中的至少一种像素的子像素的像素值进行合并时,可以是直接对R像素的子像素的像素值进行合并,生成R像素的合并像素值;或,对G像素的子像素的像素值进行合并,生成G像素的合并像素值;或,对B像素的子像素的像素值进行合并,生成B像素的合并像素值。
如图8所示,若目标像素为R像素、G像素及B像素,则控制RGBW像素阵列对拍摄场景802进 行曝光,获取拍摄每一帧图像时RGBW像素阵列中各子像素的像素值。基于RGBW像素阵列中各子像素的像素值,构成了原始RAW图像804。该原始RAW图像804中包括R像素、G像素及B像素、W像素的各子像素的像素值。
从原始RAW图像804中采集R像素、G像素及B像素的各子像素的像素值,构成了RGB像素对应的RAW图像806。对RGB像素对应的RAW图像806进行第一次合并,即对RGB像素对应的RAW图像806中各像素的子像素的像素值进行合并。如图8所示,对R像素的子像素的像素值进行合并,生成R像素的合并像素值;对G像素的子像素的像素值进行合并,生成G像素的合并像素值;对B像素的子像素的像素值进行合并,生成B像素的合并像素值。
针对每个像素单元,基于R像素的合并像素值、G像素的合并像素值及B像素的合并像素值进行再次合并,生成像素单元的合并像素值。如图8所示,将第一像素单元中左上角的R像素的合并像素值,与第一像素单元中右下角的R像素的合并像素值进行再次合并,生成第一像素单元的合并像素值。将第二像素单元中左上角的G像素的合并像素值,与第二像素单元中右下角的G像素的合并像素值进行再次合并,生成第二像素单元的合并像素值。将第三像素单元中左上角的G像素的合并像素值,与第三像素单元中右下角的G像素的合并像素值进行再次合并,生成第三像素单元的合并像素值。将第四像素单元中左上角的B像素的合并像素值,与第四像素单元中右下角的B像素的合并像素值进行再次合并,生成第四像素单元的合并像素值。
基于第一像素单元的合并像素值、第二像素单元的合并像素值、第三像素单元的合并像素值及第四像素单元的合并像素值,生成RGB像素对应的合并RAW图像808,该RGB像素对应的合并RAW图像808即为运动检测图像。如此,在预设时间段内,采用上述方法生成至少两帧运动检测图像。
基于至少两帧运动检测图像就可以进行后续运动检测及计算曝光参数的操作,在此不再赘述。
本申请实施例中,针对当前拍摄场景的光线强度超过第一预设阈值,且小于或等于第二预设阈值的拍摄场景,在确定了目标像素为R像素、G像素及B像素之后,控制RGBW像素阵列曝光,获取拍摄每一帧图像时RGBW像素阵列中各子像素的像素值。从RGBW像素阵列中各子像素的像素值中,采集R像素、G像素及B像素的各子像素的像素值。分别对R像素、G像素及B像素的各子像素的像素值进行两次合并,分别生成第一像素单元、第二像素单元、第三像素单元及第四像素单元的合并像素值。对每种像素的像素值进行了两次合并,在减少了进行运动检测的数据量的同时,提高了所得到的像素单元的合并像素值的信噪比。那么,显然减少了进行运动检测的数据量,提升了系统的处理效率,同时提高运动检测的准确性。
在一个实施例中,根据当前拍摄场景的光线强度,从RGBW像素阵列中确定与当前拍摄场景的光线强度对应的目标像素,包括:
若当前拍摄场景的光线强度小于或等于第一预设阈值,则将RGBW像素阵列中的W像素作为目标像素。
本申请实施例中,由于W像素的感光度较强,若当前拍摄场景的光线强度小于或等于第一预设阈值,说明此时的光线强度较弱,则将RGBW像素阵列中的W像素作为目标像素。因此,可以通过W像素采集到较准确的像素信号。
在一个实施例中,如图9所示,若当前拍摄场景的光线强度小于或等于第一预设阈值,且超过第三预设阈值,第三预设阈值小于第一预设阈值,则获取目标像素的像素值,基于至少两帧图像中各目标像素的像素值生成至少两帧运动检测图像,包括:
操作902,获取至少两帧图像中各W像素的像素值,对W像素的像素值进行合并,生成W像素的合并像素值;
操作904,基于W像素的合并像素值,生成与W像素对应的至少两帧运动检测图像。
具体的,在判断出当前拍摄场景的光线强度小于或等于第一预设阈值之后,继续判断当前拍摄场景的光线强度是否超过第三预设阈值。这里,第三预设阈值小于第一预设阈值,例如,假设第一预设阈值设定为50lx,那么可以设定第三预设阈值为20lx。这里的第一预设阈值、第三预设阈值均可以设置为其他数值,在本申请中并不对阈值的具体数值进行限定。
若当前拍摄场景的光线强度超过第三预设阈值,小于或等于第一预设阈值,则说明此时的光线强度较弱,且所确定的目标像素为W像素。那么,在生成运动检测图像时,可以获取每一帧图像对应的W像素的像素值。在其中一个实施方式中,直接基于W像素的像素值生成运动检测图像。如此,针对每一帧图像都进行上述操作,得到至少两帧运动检测图像。基于W像素的像素值生成运动检测图像,就不需要采集RGB像素的像素值,从而减少了进行运动检测的数据量,提升了系统的处理效率。
在其中另一个实施方式中,将W像素的像素值进行合并,生成W像素的合并像素值。然后,基于W像素的合并像素值,生成与该帧图像对应的运动检测图像。如此,针对每一帧图像都进行上述操作,得到至少两帧运动检测图像。由于对W像素的像素值进行了一次合并,从而相对于不合并的情况,数据量减少为原来的二分之一。从而,减少了进行运动检测的数据量,提升了系统的处理效率。
如图10所示,若目标像素为W像素,则控制RGBW像素阵列对拍摄场景1102进行曝光,获取拍摄每一帧图像时RGBW像素阵列中各子像素的像素值。基于RGBW像素阵列中各子像素的像素值,构成了原始RAW图像1004。该原始RAW图像1004中包括R像素、G像素、B像素、W像素的各子像素的像素值。
从原始RAW图像1004中采集W像素的各子像素的像素值,构成了W像素对应的RAW图像1006。对W像素对应的RAW图像1006进行第一次合并,即对W像素对应的RAW图像1006中各像素的子像素的像素值进行合并,生成W像素的合并像素值。
基于W像素的合并像素值,生成W像素对应的合并RAW图像1008,该RGB像素对应的合并RAW图像1008即为运动检测图像。如此,在预设时间段内,采用上述方法生成至少两帧运动检测图像。
基于至少两帧运动检测图像就可以进行后续运动检测及计算曝光参数的操作,在此不再赘述。
本申请实施例中的运动检测方法,首先,判断当前拍摄场景的光线强度是否超过第一预设阈值,若小于或等于第一预设阈值,若是则将像素阵列单元中的W像素作为目标像素。然后,继续判断当前拍摄场景的光线强度是否超过第三预设阈值,若是,获取至少两帧图像中各W像素的像素值,对各W像素的子像素的像素值进行合并,生成各W像素的合并像素值。最后,基于W像素的合并像素值,生成至少两帧运动检测图像。
基于W像素的像素值生成运动检测图像,就不需要采集RGB像素的像素值,从而减少了进行运动检测的数据量,提升了系统的处理效率。
在一个实施例中,每个RGBW像素阵列包括多个像素单元,每个像素单元包括多个像素,每个像素包括多个子像素。如图11所示,若当前拍摄场景的光线强度小于或等于第三预设阈值,第三预设阈值小于第一预设阈值,则获取至少两帧图像中各目标像素的像素值,基于至少两帧图像中各目标像素的像素值生成与目标像素对应的至少两帧运动检测图像,包括:
操作906,判断当前拍摄场景的光线强度是否小于或等于第三预设阈值;
操作908,获取至少两帧图像中各W像素的像素值,对像素单元中各W像素的子像素的像素值进行合并,生成像素单元的合并像素值。
若当前拍摄场景的光线强度小于或等于第三预设阈值,则说明此时的光线强度非常弱,且所确定的目标像素为W像素。首先,获取每一帧对应的RGBW像素阵列下W像素的像素值。针对每个像素单元,将该像素单元下每个W像素的子像素的像素值进行合并,生成该像素单元的合并像素值。
例如,结合图8所示,针对RGBW像素阵列下的R像素单元,对R像素单元中各W像素的子像素的像素值进行合并,生成R像素单元的合并像素值。一种方式可以将R像素单元所包含的2个W像素对应的8个子像素的像素值直接进行合并,生成R像素单元的合并像素值。
另一种方式,针对RGBW像素阵列下的R像素单元,可以对R像素单元中各W像素的子像素的像素值进行两次合并,生成R像素单元的合并像素值。如图12所示,若目标像素为W像素,则控制RGBW像素阵列对拍摄场景1202进行曝光,获取拍摄每一帧图像时RGBW像素阵列中各子像素的像素值。基于RGBW像素阵列中各子像素的像素值,构成了原始RAW图像1204。该原始RAW图像1204中包括R像素、G像素、B像素、W像素的各子像素的像素值。
从原始RAW图像1204中采集W像素的各子像素的像素值,构成了W像素对应的RAW图像1206。 对W像素对应的RAW图像1206进行第一次合并,即对W像素对应的RAW图像1206中各像素的子像素的像素值进行合并,生成W像素的合并像素值。
针对每个像素单元,基于W像素的合并像素值进行再次合并,生成像素单元的合并像素值。如图12所示,将第一像素单元中右上角的W像素的合并像素值,与第一像素单元中左下角的W像素的合并像素值进行再次合并,生成第一像素单元的合并像素值。依次对每个像素单元中的W像素的合并像素值进行再次合并,得到第一像素单元的合并像素值、第二像素单元的合并像素值、第三像素单元的合并像素值及第四像素单元的合并像素值。
操作910,基于像素单元的合并像素值,生成与W像素对应的至少两帧运动检测图像。
基于第一像素单元的合并像素值、第二像素单元的合并像素值、第三像素单元的合并像素值及第四像素单元的合并像素值,生成W像素对应的合并RAW图像1208,该RGB像素对应的合并RAW图像1208即为运动检测图像。如此,在预设时间段内,采用上述方法生成至少两帧运动检测图像。
基于至少两帧运动检测图像就可以进行后续运动检测及计算曝光参数的操作,在此不再赘述。
本申请实施例中,针对当前拍摄场景的光线强度小于或等于第三预设阈值的拍摄场景,在确定了目标像素为W像素之后,控制RGBW像素阵列曝光,获取拍摄每一帧图像时RGBW像素阵列中各子像素的像素值。从RGBW像素阵列中各子像素的像素值中,采集W像素的各子像素的像素值。对像素单元中各W像素的子像素的像素值进行合并,分别生成第一像素单元、第二像素单元、第三像素单元及第四像素单元的合并像素值。对每种W像素的像素值进行了两次合并,在减少了进行运动检测的数据量的同时,提高了所得到的像素单元的合并像素值的信噪比。那么,显然减少了进行运动检测的数据量,提升了系统的处理效率,同时提高运动检测的准确性。
在一个实施例中,如图13所示,操作360,基于至少两帧运动检测图像进行运动检测,得到运动检测结果,包括:
操作362,针对至少两帧运动检测图像,计算运动检测图像的像素值分布直方图。
其中,像素值分布直方图用图形表示图像中每个亮度级别的像素数量,展示了像素在图像中的分布情况。因此,针对每帧运动检测图像,计算运动检测图像的像素值分布直方图,可以通过像素值分布直方图直观地比较不同亮度级别的像素数量。
操作364,计算运动检测图像的像素值分布直方图的变化幅度。
因为通过像素值分布直方图直观地比较不同亮度级别的像素数量,所以就可以基于不同亮度级别的像素数量,计算运动检测图像的像素值分布直方图的变化幅度。
操作366,若像素值分布直方图的变化幅度超过预设变化幅度阈值,则得到运动检测结果为包含运动物体。
这里的预设变化幅度阈值可以根据实际使用标准来设定,本申请对此不做具体限定。判断像素值分布直方图的变化幅度是否超过预设变化幅度阈值,若像素值分布直方图的变化幅度超过预设变化幅度阈值,则得到运动检测结果为包含运动物体。若像素值分布直方图的变化幅度未超过预设变化幅度阈值,则得到运动检测结果为不包含运动物体。
本申请实施例中,根据当前拍摄场景的光线强度,从RGBW像素阵列中确定与当前拍摄场景的光线强度对应的目标像素;目标像素包括RGBW像素阵列中的W像素或至少一种彩色像素。获取至少两帧图像中各目标像素的像素值,基于至少两帧图像中各目标像素的像素值生成至少两帧运动检测图像。
然后,针对每帧运动检测图像,计算运动检测图像的像素值分布直方图,计算运动检测图像的像素值分布直方图的变化幅度。若像素值分布直方图的变化幅度超过预设变化幅度阈值,则得到运动检测结果为包含运动物体。从而,实现了基于至少两帧运动检测图像进行运动检测,以便在发现了运动物体之后,及时进行抓拍运动物体。
在一个实施例中,提供了运动检测方法,还包括:
若运动检测结果为包含运动物体,则生成触发信号;触发信号用于触发图像处理器;
控制图像处理器响应于触发信号,调用摄像头进行拍摄生成当前拍摄场景的图像。
其中,ISP为Image Signal Processor的简称,也就是图像信号处理器。通过拍摄至少两帧运动检测 图像,基于至少两帧运动检测图像进行运动检测,得到运动检测结果。若运动检测结果为包含运动物体,则生成触发信号,将触发信号发送给ISP,由ISP响应于触发信号,调用摄像头进行拍摄生成当前拍摄场景的图像。
本申请实施例中,不需要一直开启摄像头进行拍摄,而是通过拍摄至少两帧运动检测图像,基于至少两帧运动检测图像进行运动检测,得到运动检测结果。在运动检测结果中出现了运动物体后,才及时调用摄像头进行拍摄,以便抓拍运动物体。在降低电子设备的功耗的同时,避免错过对运动物体的抓拍。
在一个实施例中,电子设备还包括微透镜及滤光片,微透镜、滤光片及图像传感器依次位于入射光路上;图像传感器包括阵列排布的多个RGBW像素阵列,每个RGBW像素阵列包括多个像素单元,在每个像素单元中包括呈对角线排列的W像素及呈另一对角线排列的彩色像素,且每个像素对应至少一个微透镜及多个感光元件;彩色像素包括R像素、G像素、B像素。
接上一个实施例,每个像素依次沿入射光路上对应第一微透镜、滤光片、第二微透镜、金属布线层、多个感光元件,或,
每个像素依次沿入射光路上对应第一微透镜、滤光片、金属布线层、多个感光元件及第三微透镜,或,
每个像素依次沿入射光路上对应第一微透镜、滤光片、第二微透镜、金属布线层、多个感光元件及第三微透镜。
一般情况下,每个像素的结构组成依次沿入射光路上对应为微透镜(Lens)、滤光层(Filter)、金属布线层(Metal layer)和光电二极管(PhotoDiode)。其中,每个W像素对应至少一个微透镜,每个彩色像素对应至少一个微透镜。
针对长波长的光线(光信号),入射至硅基二极管中,吸收系数会随着波长增加而不断减少,也就意味对于长波长的光信号,在一定硅基厚度下,会发生吸收数量急剧下降甚至无法吸收,穿透广电二极管后逃逸到别的相邻像素上的现象,进而造成像素信号之间的串扰,降低了像素信号的信噪比,进而导所得到的至少两帧运动检测图像的准确性降低。最终,影响了运行检测的准确性。
为了解决该技术问题,提供了几种像素结构,如图14(a)所示,每个像素依次沿入射光路上对应第一微透镜、滤光片、第二微透镜、金属布线层、多个感光元件。其中,第一微透镜也称之为前微透镜(FrontLens)及第二微透镜也称之为中间的微透镜(Middle Lens)。
如图14(b)所示,每个像素依次沿入射光路上对应第一微透镜、滤光片、金属布线层、多个感光元件及第三微透镜。其中,第一微透镜也称之为前微透镜(Front Lens)及第三微透镜也称之为后微透镜(backLens)。
如图14(c)所示,每个像素依次沿入射光路上对应第一微透镜、滤光片、第二微透镜、金属布线层、多个感光元件及第三微透镜。其中,第一微透镜也称之为前微透镜(Front Lens)及第二微透镜也称之为中间的微透镜(Middle Lens)、第三微透镜也称之为后微透镜(backLens)。通过在像素结构中增加微透镜的个数,可以增大像素的填充因子,进而提高入射光的量子响应和转化效率。使得针对长波长的光线(例如近红外光),也可以采集到准确的像素信号。
本申请实施例中,通过在RGBW像素阵列的像素结构中增加微透镜的个数,可以增大像素的填充因子,进而提高入射光的量子响应和转化效率。使得针对长波长的光线,也可以采集到准确的像素信号。从而,提高所生成的至少两帧运动检测图像的准确性,进而提高运动检测的准确性。
在一个实施例中,提供了一种成像设备,包括微透镜、滤光片及图像传感器,其特征在于,微透镜、滤光片及图像传感器依次位于入射光路上;
图像传感器包括阵列排布的多个RGBW像素阵列,每个RGBW像素阵列包括多个像素单元,在每个像素单元中包括呈对角线排列的W像素及呈对角线排列的彩色像素,且每个像素对应至少一个微透镜及多个感光元件;每个像素包括阵列排布的多个子像素,每个子像素对应一个感光元件;彩色像素包括R像素、G像素、B像素。
接上一个实施例,每个像素依次沿入射光路上对应第一微透镜、滤光片、第二微透镜、金属布线层、多个感光元件,或,
每个像素依次沿入射光路上对应第一微透镜、滤光片、金属布线层、多个感光元件及第三微透镜,或,
每个像素依次沿入射光路上对应第一微透镜、滤光片、第二微透镜、金属布线层、多个感光元件及第三微透镜。
在一个实施例中,还提供了一种成像设备,像素对应的多个感光元件呈中心对称方式排布。
结合图2所示,为一个实施例中图像传感器的一部分的结构示意图。图像传感器包括阵列排布的多个RGBW像素阵列。图2所示为一个RGBW像素阵列的示意图。每个RGBW像素阵列包括多个像素单元Z,如图2所示,每个RGBW像素阵列包括4个像素单元Z。其中,这4个像素单元Z分别为红色像素单元、绿色像素单元、绿色像素单元及红色像素单元。
在每个像素单元Z中包括呈对角线排列的W像素D及彩色像素D,且每个像素D对应一个微透镜。其中,彩色像素D包括R像素、G像素及B像素。具体的,针对红色像素单元,包括呈对角线排列的2个W像素及2个R像素;针对绿色像素单元,包括呈对角线排列的2个W像素及2个G像素;针对蓝色像素单元,包括呈对角线排列的2个W像素及2个B像素。
其中,每个W像素D包括阵列排布的多个子像素d,每个彩色像素D包括阵列排布的多个子像素d,且每个子像素d对应一个感光元件。由于像素对应的多个感光元件呈中心对称方式排布,因此,W像素、R像素、G像素及B像素包括呈中心对称方式排布的多个子像素。即这些子像素对应的感光元件可以以各种排布方式、或各种形状进行中心对称排布,不限定于图3所示的以正方形来进行排布。
本申请实施例中,子像素对应的感光元件可以以各种排布方式、或各种形状进行中心对称排布,每个子像素d对应一个感光元件。因此,W像素、R像素、G像素及B像素包括呈中心对称方式排布的多个子像素。为子像素提供了多样化的排布方式,因此,子像素能够采集到多样化的像素信号,进而提高后续运动检测的准确性。
在一个实施例中,像素对应的多个感光元件以梯形方式进行中心对称排布。
如图15所示,为一个RGBW像素阵列的示意图。每个RGBW像素阵列包括4个像素单元Z。其中,这4个像素单元Z分别为红色像素单元、绿色像素单元、绿色像素单元及红色像素单元。在每个像素单元Z中包括呈对角线排列的W像素D及彩色像素D,且每个像素D对应一个微透镜。其中,彩色像素D包括R像素、G像素及B像素。
每个W像素包括阵列排布的多个子像素d,这些子像素以梯形方式进行中心对称排布。同理,每个R像素包括阵列排布的多个子像素d,这些子像素以梯形方式进行中心对称排布。每个G像素包括阵列排布的多个子像素d,这些子像素以梯形方式进行中心对称排布。每个B像素包括阵列排布的多个子像素d,这些子像素以梯形方式进行中心对称排布。且每个子像素d对应一个感光元件。感光元件可以为光电二极管(PD,PhotoDiode)。如图14中,左侧PD与右侧PD均为梯形结构,且左侧PD与右侧PD呈中心对称排布。
可选的,RGBW像素阵列中的W像素、R像素、G像素及B像素还可以采用多种不同排布方式进行组合,本申请对此不做具体限定。
本申请实施例中,子像素对应的感光元件可以以各种排布方式、或各种形状进行中心对称排布,每个子像素d对应一个感光元件。因此,W像素、R像素、G像素及B像素包括以梯形方式进行中心对称排布的多个子像素。为子像素提供了多样化的排布方式,因此,子像素能够采集到多样化的像素信号,进而提高后续运动检测的准确性。
在一个实施例中,像素对应的多个感光元件以L形方式进行中心对称排布。
如图16所示,为一个RGBW像素阵列的示意图。每个RGBW像素阵列包括4个像素单元Z。其中,这4个像素单元Z分别为红色像素单元、绿色像素单元、绿色像素单元及红色像素单元。在每个像素单元Z中包括呈对角线排列的W像素D及彩色像素D,且每个像素D对应一个微透镜。其中,彩色像素D包括R像素、G像素及B像素。
每个W像素包括阵列排布的多个子像素d,这些子像素以L形方式进行中心对称排布。同理,每个R像素包括阵列排布的多个子像素d,这些子像素以L形方式进行中心对称排布。每个G像素包括 阵列排布的多个子像素d,这些子像素以L形方式进行中心对称排布。每个B像素包括阵列排布的多个子像素d,这些子像素以L形方式进行中心对称排布。且每个子像素d对应一个感光元件。感光元件可以为光电二极管(PD,PhotoDiode)。如图15中,左侧PD与右侧PD均为L形结构,且左侧PD与右侧PD呈中心对称排布。
可选的,RGBW像素阵列中的W像素、R像素、G像素及B像素还可以采用多种不同排布方式进行组合,本申请对此不做具体限定。
本申请实施例中,子像素对应的感光元件可以以各种排布方式、或各种形状进行中心对称排布,每个子像素d对应一个感光元件。因此,W像素、R像素、G像素及B像素包括以L形方式进行中心对称排布的多个子像素。为子像素提供了多样化的排布方式,因此,子像素能够采集到多样化的像素信号,进而提高后续运动检测的准确性。
在一个实施例中,如图17所示,提供了一种运动检测装置1700,应用于电子设备,电子设备包括图像传感器,图像传感器包括RGBW像素阵列,该装置包括:
目标像素确定模块1720,用于根据当前拍摄场景的光线强度,从RGBW像素阵列中确定与当前拍摄场景的光线强度对应的目标像素;目标像素包括RGBW像素阵列中的W像素或至少一种彩色像素;
运动检测图像生成模块1740,用于获取至少两帧图像中各目标像素的像素值,基于至少两帧图像中各目标像素的像素值生成至少两帧运动检测图像;
运动检测模块1760,用于基于至少两帧运动检测图像进行运动检测,得到运动检测结果。
在一个实施例中,目标像素确定模块1720,还用于根据当前拍摄场景的光线强度与光线强度的预设阈值,从RGBW像素阵列中确定与当前拍摄场景的光线强度对应的目标像素。
在一个实施例中,目标像素确定模块1720,包括:
第一目标像素确定单元,用于若当前拍摄场景的光线强度超过第一预设阈值时,则将像素阵列单元中的至少一种彩色像素作为目标像素。
在一个实施例中,运动检测图像生成模块1740,包括:
合并单元,用于若当前拍摄场景的光线强度超过第二预设阈值,则获取至少两帧图像中各目标像素的像素值,对各目标像素的子像素的像素值进行合并,生成各目标像素的合并像素值;
运动检测图像生成单元,用于第二预设阈值大于第一预设阈值;基于目标像素的合并像素值,生成至少两帧运动检测图像。
在一个实施例中,若目标像素包括R像素、G像素及B像素,则目标像素的合并像素值生成单元,还用于:对R像素的子像素的像素值进行合并,生成R像素的合并像素值;对G像素的子像素的像素值进行合并,生成G像素的合并像素值;对B像素的子像素的像素值进行合并,生成B像素的合并像素值。
在一个实施例中,若目标像素包括R像素、G像素及B像素,目标像素的合并像素值生成单元,还用于:
对R像素中位于同一方向上的多组相邻子像素对应的像素值进行合并,生成多组像素值,基于多组像素值得到R像素的合并像素值;同一方向包括第一方向或第二方向,且第一方向与第二方向垂直;
对G像素中处于同一方向的多组相邻子像素的像素值进行合并,生成多组像素值,基于多组像素值得到G像素的合并像素值;
对B像素中处于同一方向的多组相邻子像素的像素值进行合并,生成多组像素值,基于多组像素值得到B像素的合并像素值。
在一个实施例中,每个RGBW像素阵列包括多个像素单元,每个像素单元包括多个像素,每个像素包括多个子像素;若当前拍摄场景的光线强度超过第一预设阈值,且小于或等于第二预设阈值,则运动检测图像生成模块1740,包括:
合并单元,用于获取至少两帧图像中各目标像素的像素值,将像素单元中各色彩相同的目标像素的子像素的像素值进行合并,生成像素单元的合并像素值;
运动检测图像生成单元,用于基于像素单元的合并像素值,生成至少两帧运动检测图像。
在一个实施例中,合并单元,还用于对各目标像素的子像素的像素值进行合并,生成各目标像素的合并像素值;其中,第二预设阈值大于第一预设阈值;
针对每个像素单元,将像素单元中各色彩相同的目标像素的合并像素值进行合并,生成像素单元的合并像素值。
在一个实施例中,若彩色像素包括R像素、G像素及B像素;则运动检测图像生成模块1740,还用于:
将R像素单元中多个R像素的子像素的像素值进行合并,生成R单元的合并像素值;R像素单元为包含R像素的像素单元;
对G像素单元中多个G像素的子像素的像素值进行合并,生成G单元的合并像素值;G像素单元为包含G像素的像素单元;
对B像素单元中多个B像素的子像素的像素值进行合并,生成B单元的合并像素值;B像素单元为包含B像素的像素单元;
将R像素单元的合并像素值、G像素单元的合并像素值及B像素单元的合并像素值进行融合,生成目标像素的合并像素值。
在一个实施例中,目标像素确定模块1720,包括:
第二目标像素确定单元,用于若当前拍摄场景的光线强度小于或等于第一预设阈值,则将RGBW像素阵列中的W像素作为目标像素。
在一个实施例中,若当前拍摄场景的光线强度小于或等于第一预设阈值,且超过第三预设阈值,第三预设阈值小于第一预设阈值,则运动检测图像生成模块1740,还用于:
获取至少两帧图像中各W像素的像素值,对W像素的像素值进行合并,生成W像素的合并像素值;
基于W像素的合并像素值,生成与W像素对应的至少两帧运动检测图像。
在一个实施例中,每个RGBW像素阵列包括多个像素单元,每个像素单元包括多个像素,每个像素包括多个子像素;若当前拍摄场景的光线强度小于或等于第三预设阈值,第三预设阈值小于第一预设阈值,则至少两帧运动检测图像生成模块1740,还用于:
获取至少两帧图像中各W像素的像素值,对像素单元中各W像素的子像素的像素值进行合并,生成像素单元的合并像素值;
基于像素单元的合并像素值,生成与W像素对应的至少两帧运动检测图像。
在一个实施例中,运动检测模块,还用于针对至少两帧运动检测图像,计算运动检测图像的像素值分布直方图;计算运动检测图像的像素值分布直方图的变化幅度;若像素值分布直方图的变化幅度超过预设变化幅度阈值,则得到运动检测结果为包含运动物体。
在一个实施例中,提供了一种运动检测装置,还包括:
拍摄模块,用于若运动检测结果为包含运动物体,则生成触发信号;触发信号用于触发图像处理器;控制图像处理器响应于触发信号,调用摄像头进行拍摄生成当前拍摄场景的图像。
在一个实施例中,电子设备还包括微透镜及滤光片,微透镜、滤光片及图像传感器依次位于入射光路上;图像传感器包括阵列排布的多个RGBW像素阵列,每个RGBW像素阵列包括多个像素单元,在每个像素单元中包括呈对角线排列的W像素及呈另一对角线排列的彩色像素,且每个像素对应至少一个微透镜及多个感光元件;彩色像素包括R像素、G像素、B像素。
在一个实施例中,每个像素依次沿入射光路上对应第一微透镜、滤光片、第二微透镜、金属布线层、多个感光元件,或,
每个像素依次沿入射光路上对应第一微透镜、滤光片、金属布线层、多个感光元件及第三微透镜,或,
每个像素依次沿入射光路上对应第一微透镜、滤光片、第二微透镜、金属布线层、多个感光元件及第三微透镜。
应该理解的是,虽然上述流程图中的各个操作按照箭头的指示依次显示,但是这些操作并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些操作的执行并没有严格的顺序限制,这些操作可以以其它的顺序执行。而且,上述流程图中的至少一部分操作可以包括多个子操作或者多个阶段,这些子操作或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子操作或者阶段的执行顺序也不必然是依次进行,而是可以与其它操作或者其它操作的子操作或者阶段的至少一部分轮流或者交替地执行。
上述运动检测装置中各个模块的划分仅仅用于举例说明,在其他实施例中,可将运动检测装置按照需要划分为不同的模块,以完成上述运动检测装置的全部或部分功能。
关于运动检测装置的具体限定可以参见上文中对于运动检测方法的限定,在此不再赘述。上述运动检测装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
图18为一个实施例中电子设备的内部结构示意图。该电子设备可以是手机、平板电脑、笔记本电脑、台式电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备。该电子设备包括通过系统总线连接的处理器和存储器。其中,该处理器可以包括一个或多个处理单元。处理器可为CPU(Central Processing Unit,中央处理单元)或DSP(Digital Signal Processing,数字信号处理器)等。存储器可包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序可被处理器所执行,以用于实现以下各个实施例所提供的一种运动检测方法。内存储器为非易失性存储介质中的操作系统计算机程序提供高速缓存的运行环境。
本申请实施例中提供的运动检测装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端或服务器上运行。该计算机程序构成的程序模块可存储在电子设备的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述方法的操作。
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当计算机可执行指令被一个或多个处理器执行时,使得处理器执行运动检测方法的操作。
本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行运动检测方法。
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。非易失性存储器可包括ROM(Read-Only Memory,只读存储器)、PROM(Programmable Read-only Memory,可编程只读存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦除可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-only Memory,电可擦除可编程只读存储器)或闪存。易失性存储器可包括RAM(Random Access Memory,随机存取存储器),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如SRAM(Static Random Access Memory,静态随机存取存储器)、DRAM(Dynamic Random Access Memory,动态随机存取存储器)、SDRAM(Synchronous Dynamic Random Access Memory,同步动态随机存取存储器)、双数据率DDR SDRAM(Double Data Rate Synchronous Dynamic Random Access memory,双数据率同步动态随机存取存储器)、ESDRAM(Enhanced Synchronous Dynamic Random Access memory,增强型同步动态随机存取存储器)、SLDRAM(Sync Link Dynamic Random Access Memory,同步链路动态随机存取存储器)、RDRAM(Rambus Dynamic Random Access Memory,总线式动态随机存储器)、DRDRAM(Direct Rambus Dynamic Random Access Memory,接口动态随机存储器)。
以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (22)

  1. 一种运动检测方法,其特征在于,应用于电子设备,所述电子设备包括图像传感器,所述图像传感器包括RGBW像素阵列,所述方法包括:
    根据当前拍摄场景的光线强度,从所述RGBW像素阵列中确定与所述当前拍摄场景的光线强度对应的目标像素;所述目标像素包括所述RGBW像素阵列中的W像素或至少一种彩色像素;
    获取至少两帧图像中各所述目标像素的像素值,基于所述至少两帧图像中所述目标像素的像素值生成至少两帧运动检测图像;
    基于所述至少两帧运动检测图像进行运动检测,得到运动检测结果。
  2. 根据权利要求1所述的方法,其特征在于,所述根据当前拍摄场景的光线强度,从所述RGBW像素阵列中确定与所述当前拍摄场景的光线强度对应的目标像素,包括:
    根据当前拍摄场景的光线强度与光线强度的预设阈值,从所述RGBW像素阵列中确定与所述当前拍摄场景的光线强度对应的目标像素。
  3. 根据权利要求2所述的方法,其特征在于,所述根据当前拍摄场景的光线强度与光线强度的预设阈值,从所述RGBW像素阵列中确定与所述当前拍摄场景的光线强度对应的目标像素,包括:
    若所述当前拍摄场景的光线强度超过第一预设阈值时,则将所述像素阵列单元中的至少一种彩色像素作为目标像素。
  4. 根据权利要求3所述的方法,其特征在于,所述获取至少两帧图像中各所述目标像素的像素值,基于至少两帧图像中各所述目标像素的像素值生成至少两帧运动检测图像,包括:
    若所述当前拍摄场景的光线强度超过第二预设阈值,则获取至少两帧图像中各所述目标像素的像素值,对各所述目标像素的子像素的像素值进行合并,生成各所述目标像素的合并像素值;所述第二预设阈值大于所述第一预设阈值;
    基于所述目标像素的合并像素值,生成至少两帧运动检测图像。
  5. 根据权利要求4所述的方法,其特征在于,若所述目标像素包括R像素、G像素及B像素,则所述对各所述目标像素的子像素的像素值进行合并,生成各所述目标像素的合并像素值,包括:
    对所述R像素的子像素的像素值进行合并,生成所述R像素的合并像素值;
    对所述G像素的子像素的像素值进行合并,生成所述G像素的合并像素值;
    对所述B像素的子像素的像素值进行合并,生成所述B像素的合并像素值。
  6. 根据权利要求4所述的方法,其特征在于,若所述目标像素包括R像素、G像素及B像素,则所述对各所述目标像素的子像素的像素值进行合并,生成各所述目标像素的合并像素值,包括:
    对所述R像素中位于同一方向上的多组相邻两个子像素对应的像素值进行合并,生成多组像素值,基于所述多组像素值得到所述R像素的合并像素值;所述同一方向包括第一方向或第二方向,且所述第一方向与所述第二方向垂直;
    对所述G像素中处于同一方向的多组相邻子像素的像素值进行合并,生成多组像素值,基于所述多组像素值得到所述G像素的合并像素值;
    对所述B像素中处于同一方向的多组相邻子像素的像素值进行合并,生成多组像素值,基于所述多组像素值得到所述B像素的合并像素值。
  7. 根据权利要求3所述的方法,其特征在于,每个所述RGBW像素阵列包括多个像素单元;每个所述像素单元包括多个像素,每个所述像素包括多个子像素;若所述当前拍摄场景的光线强度超过所述第一预设阈值,且小于或等于第二预设阈值,则所述获取至少两帧图像中各所述目标像素的像素值,基于至少两帧图像中各所述目标像素的像素值生成与所述目标像素对应的至少两帧运动检测图像,包括:
    获取至少两帧图像中各所述目标像素的像素值,将所述像素单元中各色彩相同的目标像素的子像素的像素值进行合并,生成所述像素单元的合并像素值;
    基于所述像素单元的合并像素值,生成所述至少两帧运动检测图像。
  8. 根据权利要求7所述的方法,其特征在于,所述将所述像素单元中各色彩相同的目标像素的子 像素的像素值进行合并,生成所述像素单元的合并像素值,包括:
    对各所述目标像素的子像素的像素值进行合并,生成各所述目标像素的合并像素值;其中,所述第二预设阈值大于所述第一预设阈值;
    针对每个所述像素单元,将所述像素单元中各色彩相同的目标像素的合并像素值进行合并,生成所述像素单元的合并像素值。
  9. 根据权利要求7所述的方法,其特征在于,若所述彩色像素包括R像素、G像素及B像素;则将所述像素单元中各色彩相同的目标像素的子像素的像素值进行合并,生成所述像素单元的合并像素值,包括:
    将R像素单元中多个所述R像素的子像素的像素值进行合并,生成所述R单元的合并像素值;所述R像素单元为包含R像素的像素单元;
    对G像素单元中多个所述G像素的子像素的像素值进行合并,生成所述G单元的合并像素值;所述G像素单元为包含G像素的像素单元;
    对B像素单元中多个所述B像素的子像素的像素值进行合并,生成所述B单元的合并像素值;所述B像素单元为包含B像素的像素单元;
    将所述R像素单元的合并像素值、所述G像素单元的合并像素值及所述B像素单元的合并像素值进行融合,生成所述目标像素的合并像素值。
  10. 根据权利要求2所述的方法,其特征在于,所述根据当前拍摄场景的光线强度,从所述RGBW像素阵列中确定与所述当前拍摄场景的光线强度对应的目标像素,包括:
    若所述当前拍摄场景的光线强度小于或等于第一预设阈值,则将所述RGBW像素阵列中的W像素作为目标像素。
  11. 根据权利要求10所述的方法,其特征在于,若所述当前拍摄场景的光线强度小于或等于第一预设阈值,且超过第三预设阈值,所述第三预设阈值小于所述第一预设阈值,则所述获取所述目标像素的像素值,基于至少两帧图像中各所述目标像素的像素值生成至少两帧运动检测图像,包括:
    获取至少两帧图像中各所述W像素的像素值,对所述W像素的像素值进行合并,生成所述W像素的合并像素值;
    基于所述W像素的合并像素值,生成与所述W像素对应的至少两帧运动检测图像。
  12. 根据权利要求10所述的方法,其特征在于,每个所述RGBW像素阵列包括多个像素单元;每个所述像素单元包括多个像素,每个所述像素包括多个子像素;若所述当前拍摄场景的光线强度小于或等于第三预设阈值,所述第三预设阈值小于所述第一预设阈值,则所述获取至少两帧图像中各所述目标像素的像素值,基于至少两帧图像中各所述目标像素的像素值生成与所述目标像素对应的至少两帧运动检测图像,包括:
    获取至少两帧图像中各所述W像素的像素值,对所述像素单元中各所述W像素的子像素的像素值进行合并,生成所述像素单元的合并像素值;
    基于所述像素单元的合并像素值,生成与所述W像素对应的至少两帧运动检测图像。
  13. 根据权利要求1所述的方法,其特征在于,所述基于所述至少两帧运动检测图像进行运动检测,得到运动检测结果,包括:
    针对至少两帧所述运动检测图像,计算所述运动检测图像的像素值分布直方图;
    计算所述运动检测图像的像素值分布直方图的变化幅度;
    若所述像素值分布直方图的变化幅度超过预设变化幅度阈值,则得到所述运动检测结果为包含运动物体。
  14. 根据权利要求13所述的方法,其特征在于,所述方法还包括:
    若所述运动检测结果为包含运动物体,则生成触发信号;所述触发信号用于触发图像处理器;
    控制所述图像处理器响应于所述触发信号,调用摄像头进行拍摄生成所述当前拍摄场景的图像。
  15. 根据权利要求1所述的方法,其特征在于,所述电子设备还包括微透镜及滤光片,所述微透镜、滤光片及图像传感器依次位于入射光路上;
    所述图像传感器包括阵列排布的多个RGBW像素阵列,每个所述RGBW像素阵列包括多个像素单元,在每个所述像素单元中包括呈对角线排列的W像素及呈另一对角线排列的彩色像素,且每个像素对应至少一个微透镜及多个感光元件;所述彩色像素包括R像素、G像素、B像素。
  16. 根据权利要求15所述的方法,其特征在于,每个像素沿入射光路上依次对应第一微透镜、滤光片、第二微透镜、金属布线层、多个感光元件,或,
    每个像素沿入射光路上依次对应所述第一微透镜、滤光片、金属布线层、多个感光元件及第三微透镜,或,
    每个像素沿入射光路上依次对应所述第一微透镜、滤光片、第二微透镜、金属布线层、多个感光元件及第三微透镜。
  17. 一种成像设备,包括微透镜、滤光片及图像传感器,其特征在于,所述微透镜、滤光片及图像传感器依次位于入射光路上;
    所述图像传感器包括阵列排布的多个RGBW像素阵列,每个所述RGBW像素阵列包括多个像素单元,在每个所述像素单元中包括呈对角线排列的W像素及呈对角线排列的彩色像素,且每个像素对应至少一个微透镜及多个感光元件;每个像素包括阵列排布的多个子像素,每个子像素对应一个感光元件;所述彩色像素包括R像素、G像素、B像素。
  18. 根据权利要求17所述的成像设备,其特征在于,每个像素沿入射光路上依次对应第一微透镜、滤光片、第二微透镜、金属布线层、多个感光元件,或,
    每个像素沿入射光路上依次对应所述第一微透镜、滤光片、金属布线层、多个感光元件及第三微透镜,或,
    每个像素沿入射光路上依次对应所述第一微透镜、滤光片、第二微透镜、金属布线层、多个感光元件及第三微透镜。
  19. 根据权利要求17所述的成像设备,其特征在于,所述像素对应的多个感光元件呈中心对称方式排布。
  20. 一种运动检测装置,其特征在于,应用于电子设备,所述电子设备包括图像传感器,所述图像传感器包括RGBW像素阵列,所述装置包括:
    目标像素确定模块,用于根据当前拍摄场景的光线强度,从所述RGBW像素阵列中确定与所述当前拍摄场景的光线强度对应的目标像素;所述目标像素包括所述RGBW像素阵列中的W像素或至少一种彩色像素;
    至少两帧运动检测图像生成模块,用于获取至少两帧图像中各所述目标像素的像素值,基于至少两帧图像中各所述目标像素的像素值生成至少两帧运动检测图像;
    运动检测模块,用于基于所述至少两帧运动检测图像进行运动检测,得到运动检测结果。
  21. 一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器执行如权利要求1至16中任一项所述的运动检测方法的操作。
  22. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至16中任一项所述的运动检测方法的操作。
PCT/CN2022/105638 2021-08-12 2022-07-14 运动检测方法、装置、电子设备和计算机可读存储介质 WO2023016183A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110927001.0 2021-08-12
CN202110927001.0A CN113676617B (zh) 2021-08-12 2021-08-12 运动检测方法、装置、电子设备和计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2023016183A1 true WO2023016183A1 (zh) 2023-02-16

Family

ID=78542595

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/105638 WO2023016183A1 (zh) 2021-08-12 2022-07-14 运动检测方法、装置、电子设备和计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN113676617B (zh)
WO (1) WO2023016183A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113676617B (zh) * 2021-08-12 2023-08-18 Oppo广东移动通信有限公司 运动检测方法、装置、电子设备和计算机可读存储介质

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013055623A (ja) * 2011-09-06 2013-03-21 Sony Corp 画像処理装置、および画像処理方法、情報記録媒体、並びにプログラム
CN105210369A (zh) * 2013-04-17 2015-12-30 法国甫托尼公司 用于获取双模态图像的设备
CN105611125A (zh) * 2015-12-18 2016-05-25 广东欧珀移动通信有限公司 成像方法、成像装置及电子装置
CN108833812A (zh) * 2018-06-25 2018-11-16 广东工业大学 一种图像传感器及图像动态信息处理方法
CN110087065A (zh) * 2019-04-30 2019-08-02 德淮半导体有限公司 半导体装置及其制造方法
CN110971799A (zh) * 2019-12-09 2020-04-07 Oppo广东移动通信有限公司 控制方法、摄像头组件及移动终端
CN110996077A (zh) * 2019-11-25 2020-04-10 Oppo广东移动通信有限公司 图像传感器、摄像头组件和移动终端
CN111050041A (zh) * 2019-11-25 2020-04-21 Oppo广东移动通信有限公司 图像传感器、控制方法、摄像头组件及移动终端
CN112235494A (zh) * 2020-10-15 2021-01-15 Oppo广东移动通信有限公司 图像传感器、控制方法、成像装置、终端及可读存储介质
CN113676617A (zh) * 2021-08-12 2021-11-19 Oppo广东移动通信有限公司 运动检测方法、装置、电子设备和计算机可读存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109005361A (zh) * 2018-08-06 2018-12-14 Oppo广东移动通信有限公司 控制方法、装置、成像设备、电子设备及可读存储介质
CN109005364B (zh) * 2018-08-13 2020-03-06 Oppo广东移动通信有限公司 成像控制方法、装置、电子设备以及计算机可读存储介质
CN108989700B (zh) * 2018-08-13 2020-05-15 Oppo广东移动通信有限公司 成像控制方法、装置、电子设备以及计算机可读存储介质
CN110381263B (zh) * 2019-08-20 2021-04-13 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013055623A (ja) * 2011-09-06 2013-03-21 Sony Corp 画像処理装置、および画像処理方法、情報記録媒体、並びにプログラム
CN105210369A (zh) * 2013-04-17 2015-12-30 法国甫托尼公司 用于获取双模态图像的设备
CN105611125A (zh) * 2015-12-18 2016-05-25 广东欧珀移动通信有限公司 成像方法、成像装置及电子装置
CN108833812A (zh) * 2018-06-25 2018-11-16 广东工业大学 一种图像传感器及图像动态信息处理方法
CN110087065A (zh) * 2019-04-30 2019-08-02 德淮半导体有限公司 半导体装置及其制造方法
CN110996077A (zh) * 2019-11-25 2020-04-10 Oppo广东移动通信有限公司 图像传感器、摄像头组件和移动终端
CN111050041A (zh) * 2019-11-25 2020-04-21 Oppo广东移动通信有限公司 图像传感器、控制方法、摄像头组件及移动终端
CN110971799A (zh) * 2019-12-09 2020-04-07 Oppo广东移动通信有限公司 控制方法、摄像头组件及移动终端
CN112235494A (zh) * 2020-10-15 2021-01-15 Oppo广东移动通信有限公司 图像传感器、控制方法、成像装置、终端及可读存储介质
CN113676617A (zh) * 2021-08-12 2021-11-19 Oppo广东移动通信有限公司 运动检测方法、装置、电子设备和计算机可读存储介质

Also Published As

Publication number Publication date
CN113676617B (zh) 2023-08-18
CN113676617A (zh) 2021-11-19

Similar Documents

Publication Publication Date Title
US7812869B2 (en) Configurable pixel array system and method
US9288399B2 (en) Image processing apparatus, image processing method, and program
US10992878B2 (en) Method of obtaining wide dynamic range image and image pickup device performing the same
US9942495B2 (en) Imaging array having photodiodes with different light sensitivities and associated image restoration methods
WO2023016144A1 (zh) 对焦控制方法、装置、成像设备、电子设备和计算机可读存储介质
US7430011B2 (en) Image sensor having dual automatic exposure control
US8902336B2 (en) Dynamic, local edge preserving defect pixel correction for image sensors with spatially arranged exposures
US10638055B2 (en) Aperture simulation
US20110310278A1 (en) Systems and methods for adaptive control and dynamic range extension of image sensors
US11818462B2 (en) Phase detection autofocus sensor apparatus and method for depth sensing
CN109716758A (zh) 使用对能见度状态的改变具有鲁棒性的复合滤波法的监控相机和采用其的视频监控系统
WO2023087908A1 (zh) 对焦控制方法、装置、图像传感器、电子设备和计算机可读存储介质
WO2023016183A1 (zh) 运动检测方法、装置、电子设备和计算机可读存储介质
CN103297701A (zh) 成像方法及成像装置
CN108293098A (zh) 固态成像器件、成像装置和电子设备
US11245878B2 (en) Quad color filter array image sensor with aperture simulation and phase detection
WO2023124611A1 (zh) 对焦控制方法、装置、图像传感器、电子设备和计算机可读存储介质
CN108810428A (zh) 成像装置、像素及方法
US10447951B1 (en) Dynamic range estimation with fast and slow sensor pixels
CN111989916A (zh) 成像设备和方法、图像处理设备和方法以及成像元件
CN112866554B (zh) 对焦方法和装置、电子设备、计算机可读存储介质
US20130308021A1 (en) Systems and methods for adaptive control and dynamic range extension of image sensors
CN101986432A (zh) Cmos图像传感器
US20240155245A1 (en) Ambient light sensing using image sensor
WO2021217640A1 (zh) 一种成像装置、成像方法以及相机

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: 22855166

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE