Image processing method and device, electronic equipment and storage medium
By acquiring and comparing image differences in the static pixel area, the problem of the dynamic visual pixel structure being misjudged as a bad point in the static image acquisition is solved, and the dynamic scene is perceived without reducing the resolution.
Patent Information
- Application Number
- CN202311069816.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2025-02-25
AI Technical Summary
Dynamic visual pixel structures are easily misjudged as bad points when acquiring static images, and need to rely on algorithms to remove, resulting in a decrease in resolution.
By acquiring the first image and the second image in the static pixel region of the imaging element, comparing the differences between the two images, obtaining comparison parameters, and outputting the target image according to these parameters, the dependence on the dynamic pixel structure is avoided.
It realizes the perception of dynamic scenes without the need for dynamic pixel structure, avoids the resolution problem of dynamic pixels when shooting static scenes, and improves the effect of image processing.
Smart Images

Figure CN119521018A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of terminals, and in particular to an image processing method, device, electronic device and storage medium. Background Art
[0002] With the development of technology, dynamic visual capture imaging has become a research direction. The pixels of image sensors are divided into static pixel structures and dynamic pixel structures.
[0003] However, there are some problems with the dynamic visual pixel structure in terms of conventional image output effects. For example, when capturing static images, the dynamic visual pixel structure may be misjudged as a bad pixel and needs to be removed by an algorithm. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides an image processing method, device, electronic device and storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method, the method comprising: acquiring a first image of a first static pixel area of an imaging element; acquiring a second image of a second static pixel area of the imaging element, wherein at least a portion of the second static pixel area overlaps with the first static pixel area; obtaining a comparison parameter between the first image and the second image by comparing the first image and the second image; and outputting a target image according to the comparison parameter.
[0006] In some embodiments, obtaining the comparison parameters between the first image and the second image by comparing the first image and the second image includes: obtaining the comparison parameters of the same pixel between the first image and the second image based on the difference between the pixel value of each pixel of the first image and the pixel value of the same pixel of the second image.
[0007] In some embodiments, based on the difference between the pixel value of each pixel of the first image and the pixel value of the same pixel of the second image, a comparison parameter of the same pixel between the first image and the second image is obtained, including: based on the difference being greater than a threshold parameter, marking the comparison parameter of the pixel as a first comparison parameter, and based on the difference being less than or equal to the threshold parameter, marking the comparison parameter of the same pixel as a second comparison parameter.
[0008] In some embodiments, outputting the target image according to the comparison parameter includes: adjusting the pixels according to the comparison parameter being a first comparison parameter; and outputting the adjusted image as the target image.
[0009] In some embodiments, the adjusting the pixels includes: performing one or more operations of interpolation, image fusion, image replacement and image enhancement on the pixels.
[0010] In some embodiments, the method includes: setting a pixel mean value of a plurality of pixels of the first image as a threshold parameter.
[0011] In some embodiments, the comparison parameter is quantized as a 1-bit parameter.
[0012] In some embodiments, the method further includes: determining to end execution of the image processing method based on the fact that a first comparison parameter is included in a plurality of differences between pixel values of the plurality of pixels of the first image and pixel values of the corresponding pixels of the second image; and determining to re-execute the image processing method based on the fact that the first comparison parameter is not included in a plurality of differences between pixel values of the plurality of pixels of the first image and pixel values of the corresponding pixels of the second image.
[0013] In some embodiments, the method further includes: determining exposure parameters for acquiring the image according to the shooting scene.
[0014] In some embodiments, a preset time interval is between the step of acquiring a first image of a first static pixel area of the imaging element and the step of acquiring a second image of a second static pixel area of the imaging element.
[0015] According to a second aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a camera module, comprising an imaging element, the imaging element comprising a static pixel area, and a plurality of pixels are arranged in the pixel area; a control module, the control module controlling the camera module to capture a first image and a second image, the first image being an imaging of a first static pixel of a first static pixel area in the static pixel area, the second image being an imaging of a first static pixel of a second static pixel area in the static pixel area, at least a portion of the second static pixel area overlapping with the first static pixel area, wherein the control module obtains a comparison parameter between the first image and the second image by comparing the first image and the second image, and outputs a target image according to the comparison parameter.
[0016] In some embodiments, the control module also includes a storage unit, which is used to store the first image, the second image and the comparison parameter, wherein the storage unit is arranged in the camera module; or, the electronic device includes a mainboard, and the storage unit is arranged in the mainboard.
[0017] In some embodiments, the control module also includes a comparison unit, which is used to compare pixel values of multiple pixels of the first image with pixel values of corresponding pixels of the second image to obtain multiple difference values, wherein the comparison unit is electrically connected to the storage unit, and the comparison unit is arranged in the camera module; or, the comparison unit is arranged in the main board.
[0018] In some embodiments, the control module also includes a control unit, the comparison unit transmits the multiple differences to the control unit, and the control unit adjusts the first image according to the multiple differences, wherein the control unit is electrically connected to the comparison unit, and the control unit is arranged in the camera module; or, the control unit is arranged in the main board.
[0019] According to a third aspect of an embodiment of the present disclosure, there is provided an image processing device, comprising: an acquisition module for acquiring a first image of a first static pixel area of an imaging element, and acquiring a second image of a second static pixel area of the imaging element, wherein at least a portion of the second static pixel area overlaps with the first static pixel area; a calculation module for obtaining a comparison parameter between the first image and the second image by comparing the first image and the second image; and an output module for outputting a target image according to the comparison parameter.
[0020] In some embodiments, the calculation module obtains the comparison parameters between the first image and the second image by comparing the first image and the second image in the following manner: based on the difference between the pixel value of each pixel of the first image and the pixel value of the same pixel of the second image, the comparison parameter of the same pixel between the first image and the second image is obtained.
[0021] In some embodiments, the calculation module obtains the comparison parameter between the first image and the second image by comparing the first image and the second image in the following manner: based on the difference being greater than a threshold parameter, marking the comparison parameter of the pixel as a first comparison parameter; based on the difference being less than or equal to the threshold parameter, marking the comparison parameter of the same pixel as a second comparison parameter.
[0022] In some embodiments, the output module outputs the target image according to the comparison parameter in the following manner: adjusting the pixel according to the comparison parameter being a first comparison parameter; and outputting the adjusted image as the target image.
[0023] In some embodiments, the adjusting the pixels includes: performing one or more operations of interpolation, image fusion, image replacement and image enhancement on the pixels.
[0024] In some embodiments, the device further comprises: a setting unit configured to set a pixel mean value of a plurality of pixels of the first image as a threshold parameter.
[0025] In some embodiments, the comparison parameter is quantized as a 1-bit parameter.
[0026] In some embodiments, the device also includes: an execution module, used to determine to end the execution of the image processing method based on the fact that the first comparison parameter is included in the multiple differences between the pixel values of the multiple pixels of the first image and the pixel values of the corresponding pixels of the second image; and determine to re-execute the image processing method based on the fact that the first comparison parameter is not included in the multiple differences between the pixel values of the multiple pixels of the first image and the pixel values of the corresponding pixels of the second image.
[0027] In some embodiments, the device further includes: a determination module, configured to determine exposure parameters of the captured image according to the shooting scene.
[0028] In some embodiments, the acquisition module leaves a preset time interval between the step of acquiring a first image of a first static pixel area of the imaging element and the step of acquiring a second image of a second static pixel area of the imaging element.
[0029] According to a fourth aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to: execute the image processing method as described in any one of the aforementioned embodiments.
[0030] According to a fifth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the image processing method described in any of the aforementioned embodiments.
[0031] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0032] By collecting the first image and the second image in the static pixel area of the imaging element and comparing the difference between the second image and the first image, the information of the dynamic event can be judged to realize the perception of dynamic scenes. Compared with the related technology, the present disclosure no longer requires a dynamic pixel structure to realize the perception of dynamic scenes, so it can avoid the resolution problem of dynamic pixels when shooting static scenes.
[0033] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0035] Figure 1 The figure is a flowchart of an image processing method according to an exemplary embodiment.
[0036] Figure 2 The flowchart is a method of obtaining a comparison parameter between a first image and a second image by comparing the first image and the second image according to another exemplary embodiment.
[0037] Figure 3 The present invention is a flowchart showing a method of obtaining a comparison parameter of a same pixel between a first image and a second image according to a difference between a pixel value of each pixel of a first image and a pixel value of the same pixel of a second image according to another exemplary embodiment.
[0038] Figure 4 is a flowchart of an image processing method according to another exemplary embodiment.
[0039] Figure 5 is a flowchart of an image processing method according to yet another exemplary embodiment.
[0040] Figure 6 is a flowchart of an image processing method according to yet another exemplary embodiment.
[0041] Figure 7 is a flowchart of an image processing method according to yet another exemplary embodiment.
[0042] Figure 8 The diagram is a schematic diagram of an electronic device according to an exemplary embodiment.
[0043] Fig. 9 is a block diagram of an image processing apparatus according to an exemplary embodiment.
[0044] Fig.10 is a block diagram of an image processing apparatus according to another exemplary embodiment.
[0045] Fig.11 The invention is a block diagram of an image processing apparatus according to an exemplary embodiment. DETAILED DESCRIPTION
[0046] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0047] In the related art, the pixels of image sensors are divided into two types: static pixel structure and dynamic pixel structure. The advantage of the static pixel structure is that the image quality is higher, but there are limitations in capturing scenes with a high dynamic range. The dynamic visual pixel structure can adaptively adjust the size of the pixel according to the light intensity, thereby improving the ability to capture high-brightness and low-brightness details.
[0048] However, since the dynamic pixel structure occupies a large space in the image sensor and there is no color filter inside the dynamic pixel structure, when using a sensor with a dynamic pixel structure to shoot a static scene, bad pixels will appear at the location of the dynamic pixel structure, which needs to be removed by an algorithm, and the resolution of the captured image will be reduced after removal.
[0049] Therefore, the embodiment of the present disclosure provides an image processing method, which collects a first image and a second image in a static pixel area of an imaging element, compares the difference between the second image and the first image, and thereby determines information about a dynamic event, thereby realizing perception of dynamic scenes. Compared with related technologies, the present disclosure no longer requires a dynamic pixel structure to realize perception of dynamic scenes, and thus can avoid resolution problems caused by dynamic pixels when shooting static scenes.
[0050] The image processing method described above in the present disclosure will be described below. The image processing method provided in the embodiment of the present disclosure can be used in terminals such as electronic devices or camera modules. The embodiment of the present disclosure does not limit the type of terminal.
[0051] Figure 1 is a flowchart of an image processing method according to an exemplary embodiment. Figure 1 As shown, the image processing method can be applied to a terminal, which can be an electronic device such as a mobile phone or a tablet. The terminal can include a camera module, which includes multiple static pixels, such as Figure 1 As shown, the image processing method may include the following steps S11-S14.
[0052] In step S11 , a first image of a first static pixel area of an imaging element is acquired.
[0053] It is understandable that the static pixel area may only include a plurality of static pixels. In the embodiment of the present disclosure, the imaging element may be a device for acquiring an image. Taking an image sensor as an example, in some embodiments, a first group of static pixel areas in the image sensor may be selected in step S11 to obtain an image of pixels in the first group of static pixel areas at a first moment, which may be used as a first image, and then the first image data may be stored in a storage device.
[0054] In step S12, a second image of a second static pixel area of the imaging element is acquired, wherein at least a portion of the second static pixel area overlaps with the first static pixel area.
[0055] In some embodiments, step S12 may select a second group of static pixel regions in the image sensor, obtain an image of pixels in the second group of static pixel regions at a second moment as the second image, and then store the second image data in a storage device.
[0056] In some embodiments, a preset time may be spaced between step S11 and step S12, that is, a preset time may be spaced between the step of acquiring a first image of a first static pixel area of an imaging element and the step of acquiring a second image of a second static pixel area of an imaging element.
[0057] That is, a first image is acquired at a first time, and a second image is acquired at a second time.
[0058] The preset interval time may be the time after the first image is acquired, that is, the second image is acquired after the first image is acquired. Alternatively, the preset interval time may be the time after the first line of the first image is exposed, and the second image can be acquired, which can further shorten the time for acquiring the second image and can be used for high-speed dynamic visual perception.
[0059] The second static pixel area collected at the second moment may at least partially overlap with the first static pixel area collected at the first moment. That is, in one possible case, the image area at the second moment may include some pixels of the image area at the first moment and other new pixels. For example, the left half of the image may be collected at the first moment, and the whole image may be collected at the second moment. In this case, the second static pixel area includes all pixels of the first static pixel area and other pixels of the right half.
[0060] In another possible case, the image area at the second moment may also be completely identical to all pixels of the image area at the first moment. For example, the image area at the first moment and the image area at the second moment may be completely identical, and the second static pixel area includes all pixels of the first static pixel area.
[0061] Alternatively, in other cases, the image area at the second moment may also include only some pixels in the image area at the first moment. For example, the complete pixel area may be collected at the first moment as the first pixel area, and the image collected at this time is the first image. The middle part of the pixel area may be collected at the second moment as the second pixel area, and the image collected at this time is the second image. The second static pixel area overlaps with some pixels in the middle of the first static pixel area.
[0062] It is understandable that the above situation is only an exemplary description of the relationship between the image area at the second moment and the image area at the first moment under different circumstances, but is not limited to the situation described in the above embodiment. In other words, as long as the second static pixel area collected at the second moment can at least partially overlap with the first static pixel area collected at the first moment, those skilled in the art can adjust the implementation method according to the needs of specific applications.
[0063] In step S13, by comparing the first image and the second image, a comparison parameter between the first image and the second image is obtained.
[0064] In the disclosed embodiments, the first image and the second image can be compared by comparing the difference in pixel values between the first image and the second image (for example, the difference in brightness, grayscale, and color values at each pixel position), comparing image correlations (for example, the difference in image correlation values such as SSIM and PSNR), and matching feature points (for example, the difference in the number and position of feature points in the image detail area).
[0065] By comparing the first image and the second image as described above, comparison parameters can be obtained, such as the brightness difference matrix of each pixel, the overall correlation value of the image, the matrix of the change in the number of feature points in the local area, or the pixel position set of edge and contour changes, etc. According to the comparison parameters, the difference or similarity between the first image and the second image can be determined.
[0066] In step S14, the target image is output according to the comparison parameters.
[0067] It is understandable that the comparison parameters obtained in step S13 can be used for further image processing, image retrieval, image classification, etc. The present disclosure does not limit this.
[0068] For example, according to the comparison parameters, the target image that can be output may be the original image with the dynamically changing area marked, a cropped image containing only the dynamically changing area, an image with the dynamically changing area enhanced, an image with the details of the dynamically changing area added, etc., but the present disclosure is not limited thereto, that is, those skilled in the art may adjust the target image according to the requirements of the specific application.
[0069] According to the comparison parameters, the clarity or sharpness of the dynamic area of the target image can be improved, the noise or blur in the dynamic area can be eliminated, the edge or contour of the dynamic area can be enhanced, the frame rate or smoothness of the dynamic area can be improved, the exposure or color of the dynamic area can be adjusted, the lost details of the dynamic area can be restored, and more realistic dynamic area content can be reconstructed, etc., but the present disclosure is not limited to this, that is, those skilled in the art can adjust the target image according to specific needs.
[0070] In the above embodiment, the present disclosure collects the first image and the second image in the static pixel area of the imaging element, compares the difference between the second image and the first image, thereby determining the information of the dynamic event, realizing the perception of the dynamic scene, and thus improving the image processing effect.
[0071] In the following disclosed embodiments, a process of obtaining a comparison parameter between the first image and the second image by comparing the first image and the second image will be described in detail.
[0072] Figure 2 FIG. 1 is a flow chart showing a method of obtaining a comparison parameter between a first image and a second image by comparing the first image and the second image according to another exemplary embodiment. Figure 2 As shown, obtaining the comparison parameter between the first image and the second image by comparing the first image and the second image in the above step S13 may include the following step S131.
[0073] In step S131, a comparison parameter of the same pixel between the first image and the second image is obtained according to the difference between the pixel value of each pixel of the first image and the pixel value of the same pixel of the second image.
[0074] The same pixel in the first image and the second image can be determined by an image coordinate system. For example, an XY coordinate system is established with the pixel point at the upper left corner of the first image and the second image as the origin.
[0075] In one possible case, the first image and the second image have the same resolution, and the pixels with the same XY coordinates are the same pixel.
[0076] In another possible case, the resolutions of the first image and the second image are different. The image with the larger resolution can be downsampled to the same size as the other image, or the image with the smaller resolution can be upsampled to the same size as the other image. Alternatively, an image registration algorithm can be used to calculate the coordinate mapping relationship between two images of different sizes, and based on the mapping relationship, the same pixel point with a corresponding relationship in images of different resolutions can be determined.
[0077] It should be noted that the difference in pixel values of the same pixel can be the difference in the brightness value of the same pixel point in the two images, reflecting the value of the light and dark change of the point, or it can be the difference in the color value of the same XY coordinate pixel in the two images. For example, the difference of the red (R) component, the green (G) component, and the blue (B) component are calculated in the RGB color space. RGB can also be converted to HSV (Hue, Saturation, Value) space to calculate the differences in the three channels of hue (Hue, H), saturation (Saturation, S), and value (Value, V). The correlation coefficient of the two images can also be calculated, such as the difference of indicators such as structural similarity (SSIM) and peak signal-to-noise ratio (PSNR). However, the present disclosure is not limited to this, that is, those skilled in the art can adjust the difference to be obtained according to specific needs.
[0078] It can be understood that, based on the above pixel value difference, a comparison parameter characterizing the change of the pixel point can be obtained, providing effective information for subsequent processing and analysis.
[0079] For example, the brightness difference can be directly used as a scalar value dL as a parameter, the RGB color component can be directly used as a three-element vector [dR, dG, dB] as a comparison parameter, the HSV color space difference can obtain a three-element vector [dH, dS, dV] as a parameter, and the difference in correlation coefficient can also be directly used as a parameter. However, the present disclosure is not limited to this, that is, those skilled in the art can adjust the required parameter type according to specific needs.
[0080] In the above embodiment, the difference can be calculated for each pixel in the image, and a pixel-by-pixel comparison can be performed to achieve fine image contrast. Moreover, by calculating the numerical difference of each pixel in the two images, the pixel change can be quantified and a digital comparison parameter can be obtained. The digital comparison parameter at the pixel level is conducive to subsequent algorithm quantitative analysis and classification, clustering and other processing.
[0081] In the following disclosed embodiments, a process of obtaining a comparison parameter of a same pixel between the first image and the second image based on a difference between a pixel value of each pixel of the first image and a pixel value of the same pixel of the second image will be described in detail.
[0082] Figure 3 FIG. 1 is a flowchart showing a method of obtaining a comparison parameter of a same pixel between a first image and a second image according to a difference between a pixel value of each pixel of a first image and a pixel value of the same pixel of a second image according to another exemplary embodiment. Figure 3As shown, in the above step S131, obtaining the comparison parameter of the same pixel between the first image and the second image according to the difference between the pixel value of each pixel of the first image and the pixel value of the same pixel of the second image may include the following step S132.
[0083] In step S132, when the difference is greater than the threshold parameter, the comparison parameter of the pixel is marked as the first comparison parameter, and when the difference is less than or equal to the threshold parameter, the comparison parameter of the same pixel is marked as the second comparison parameter.
[0084] In some embodiments, a pixel mean value of a plurality of pixels of the first image may be set as a threshold parameter.
[0085] In other embodiments, a fixed threshold parameter may be set based on the experience of those skilled in the art.
[0086] In some other embodiments, the average change of the first image and the second image can also be calculated as the threshold parameter, that is, the average value of the difference between each pixel between the two input images can be used as the threshold parameter. Of course, only the average change of the overlapping area of the two images can be calculated.
[0087] In other embodiments, an adaptive threshold segmentation algorithm may be used to calculate based on the image content, for example, the Otsu algorithm may be used to automatically determine a global threshold based on the image histogram distribution. Of course, a local adaptive threshold algorithm may also be used to determine different thresholds for different sub-regions of the image.
[0088] It is understandable that the above is only an exemplary description of how the threshold parameter can be obtained, but is not limited to the situation described in the above embodiment. In other words, those skilled in the art can adjust the acquisition method according to the needs of specific applications.
[0089] Among them, for marking the pixel position, in one possible case, a masking layer with the same size as the image can be created, and different values can be written in the masking layer for the changed and non-changed pixels, for example, marking the first comparison parameter as 1 and marking the second comparison parameter as 0.
[0090] In another possible case, different colors may be used to mark the output image. For example, the positions of changed pixels and non-changed pixels may be marked with red and green colors on the output image.
[0091] In other possible cases, the marking result of the pixel comparison parameter may also be recorded in the metadata field of the image file as additional description information of the image.
[0092] It is understandable that the above is only an exemplary description of how the marking of pixel positions can be implemented, but is not limited to the situations described in the above embodiments. In other words, those skilled in the art can adjust the implementation method according to the needs of specific applications.
[0093] In the above embodiment, setting the change threshold can distinguish between areas with larger and smaller image changes. Moreover, by marking with different comparison parameters, static background and dynamic targets can be quickly divided. The marking results can be directly used in algorithms such as image segmentation and target recognition to improve the efficiency of subsequent processing.
[0094] In the following disclosed embodiments, how to output a target image according to comparison parameters will be described in detail.
[0095] Figure 4 FIG. 1 is a flowchart of an image processing method according to another exemplary embodiment. Figure 4 As shown, in the above step S14, outputting the target image according to the comparison parameters may include the following steps S141-S142.
[0096] In step S141, the pixel is adjusted according to the comparison parameter being the first comparison parameter.
[0097] It can be understood that, from the above embodiments, the first comparison parameter indicates that the change between the first image and the second image at the pixel position is large and exceeds the threshold, so the pixel point with the large change can be oriented. The second comparison parameter indicates that the change between the first image and the second image at the pixel position is small and no oriented processing is required.
[0098] In some embodiments, adjusting the pixels may include performing one or more operations of interpolation, image fusion, image replacement, and image enhancement on the pixels to improve the visual effects of these changed pixel regions.
[0099] In step S142, the adjusted image is output as a target image.
[0100] In some embodiments, pixels marked as the first comparison parameter may be directly adjusted on the first image to generate the target image.
[0101] However, the present disclosure is not limited thereto. In other embodiments, an image with changes marked may be generated first, and then only the marked area is processed and fused with the first image to generate a target image.
[0102] In some embodiments, the comparison parameter may be quantized as a 1-bit parameter.
[0103] It should be noted that a 1-bit parameter represents a binary parameter with only two possible values. Specifically, a 1-bit parameter can usually be represented in different situations.
[0104] In the first possible case, the 1-bit parameter may be 0 or 1, that is, 0 may indicate no change, and 1 may indicate a change.
[0105] In the second possible case, the 1-bit parameter may be two Boolean values of True or False, that is, True indicates a change, and False indicates no change.
[0106] In this embodiment, the comparison parameter can be quantized into a 1-bit parameter. On the one hand, the 1-bit parameter can be directly used for logical operations without complex calculations, which reduces the difficulty of processing. On the other hand, simplifying and quantizing the complex comparison parameters into 1 bit greatly reduces the amount of data, which is beneficial for storage and transmission. On the other hand, simplifying the parameters is beneficial for using compression coding to store and transmit image information, which improves the speed of subsequent processing and is beneficial for real-time applications.
[0107] Figure 5 FIG. 1 is a flowchart of an image processing method according to another exemplary embodiment. Figure 5 As shown, the image processing method may further include the following steps S15 and S16.
[0108] In step S15, it is determined to terminate the execution of the image processing method according to that a plurality of differences between pixel values of a plurality of pixels of the first image and pixel values of corresponding pixels of the second image include a first comparison parameter.
[0109] It can be understood that if there is a pixel marked as the first comparison parameter (large change) in the multiple difference values, it means that a change is detected and the current processing flow can be terminated.
[0110] In step S16, it is determined to re-execute the image processing method according to the fact that the first comparison parameter is not included in the plurality of differences between the pixel values of the plurality of pixels of the first image and the pixel values of the corresponding pixels of the second image.
[0111] It is understandable that if there is no pixel marked as the first comparison parameter in the plurality of difference values, it means that there is no significant change between the two captured images and no dynamic event is detected. In this case, the first image, the second image and the processing flow can be re-executed.
[0112] In some embodiments, a flag or a counter may be set to count the number of the first comparison parameters, and the execution is terminated if the number is greater than 0, and restarted if the number is equal to 0.
[0113] In the above embodiment, the present disclosure re-executes the image acquisition and processing flow to obtain the first comparison parameter after comparing the first image and the second image. On the one hand, automatic snapshot can be achieved. For example, when no change is detected in two acquisitions, the system will continue to re-acquire, thereby achieving automatic monitoring. Once a change is detected, the system automatically ends the current acquisition and completes the snapshot.
[0114] On the other hand, the present invention can also ensure that images are captured at key dynamic moments through repeated acquisition, and will not miss the opportunity to capture, thereby improving the success rate of capturing. In the embodiment of the present invention, acquisition is terminated only when there is a valid change, which can also avoid storing a large number of invalid static images and reduce storage space.
[0115] However, the present disclosure is not limited to this. In other aspects, the present disclosure can also be applied to video recording scenarios, and can realize automatic recording of dynamic scenes. In one possible case, the start and end flags of the video recording can be set, and linked with the change detection result, and it can be set to continuously loop the video recording when there is no change between two acquisitions. When a change is detected, the current recording is ended and the recorded video clip is saved.
[0116] Specifically, in some embodiments, a recording control variable (rec_control) may be set, wherein rec_control may be a flag variable for controlling video recording. The recording control variable (rec_control) may have two states, namely, when rec_control=1, it may indicate starting or continuing recording, and when rec_control=0, it may indicate ending recording, and the initial value of 0 indicates not recording.
[0117] Furthermore, images may be collected during the recording process. For example, two frames of images may be periodically captured in a continuous video frame stream as a first image and a second image. Then, by comparing the first image and the second image, a comparison parameter between the first image and the second image may be obtained.
[0118] Furthermore, if there are pixels marked as the first comparison parameter (large change) in the multiple differences between the first image and the second image, it means that a change has been detected. At this time, the recording control variable (rec_control) can be set to 0, which will trigger the recording module to stop the current recording and automatically save the video clip just now to end the recording.
[0119] If there is no pixel marked as the first comparison parameter in the multiple differences between the first image and the second image, it means that there is no obvious change in the two captured images and no dynamic event is detected. At this time, the recording control variable (rec_control) can be kept at 1, so that the video recording module will continue recording to achieve loop recording.
[0120] For example, in the video recording scenario, in the continuous video frame stream, every X seconds, the current frame is taken out and saved as the first image. After another Y seconds (Y < X), a new video frame is taken out and saved as the second image. The first image and the second image are compared by change detection to determine whether there is a change and generate a comparison result. If the comparison result shows no change, the recording control variable (rec_control) is kept as 1, and the video recording continues. If the comparison result shows a change, the recording control variable (rec_control) is set to 0, and the current video recording ends. After the recording ends, the just-recorded video segment is saved. Then the recording control variable (rec_control) is reset to 1, and the loop recording state is entered. When the end condition is met, the loop is exited, and the entire video recording process ends.
[0121] However, the present disclosure is not limited thereto. In other aspects, the present disclosure can also be applied to the dynamic monitoring scenario to implement the function of automatically triggering the processing flow when a change occurs in the video. In one possible case, change detection judgment can be added during the monitoring video processing, and it can be linked with the alarm module. It can be set that no alarm is triggered when there is no change, and an alarm is triggered and a screenshot is taken when there is a change.
[0122] Specifically, in some embodiments, a flag bit control variable for controlling the alarm on or off can be set. This control variable can be alarm_contro, which can be represented by 1 or 0. The control variable (alarm_contro) can have two states. That is, when the control variable (alarm_contro) = 1, it can indicate that the alarm is turned on, and when the control variable (alarm_contro) = 0, it can indicate that no alarm is triggered.
[0123] Furthermore, two frames of images can be periodically collected in the monitoring video as the first image and the second image, and then by comparing the first image and the second image, the comparison parameter between the first image and the second image can be obtained.
[0124] Still further, if there are pixels marked as the first comparison parameter (significant change) among the multiple differences between the first image and the second image, it indicates that a change has been detected. At this time, the control variable (alarm_contro) can be set to 1, which can trigger the alarm to be turned on, and at the same time, a video screenshot can be taken, and this video screenshot can be used as the alarm picture.
[0125] If there are no pixels marked as the first comparison parameter among the multiple differences between the first image and the second image, it indicates that there is no obvious change between the two collected images, and no dynamic event is detected. At this time, the control variable (alarm_contro) can be kept as 0 all the time, and the video monitoring continues.
[0126] Figure 6 FIG. 1 is a flowchart of an image processing method according to another exemplary embodiment. Figure 6 As shown, the image processing method may further include the following step S10.
[0127] In step S10, exposure parameters for acquiring images are determined according to the shooting scene.
[0128] The exposure parameters may include exposure time and gain coefficient. In this embodiment, the same exposure parameters may be determined for the first image and the second image according to the current shooting scene, which may further reduce the parameter difference between the first image and the second image and further improve the accuracy of the comparison parameters.
[0129] Figure 7 is a flowchart of an image processing method according to yet another exemplary embodiment.
[0130] In some embodiments, the process of the image processing method disclosed herein is as follows: Figure 7 As shown, it should be noted that the exposure time and gain are set according to the shooting scene, the main purpose of which is to eliminate the numerical differences caused by the exposure and gain settings and interfere with the output results.
[0131] The designated pixel area to be exposed may be the entire pixel area, the area after merging 4 adjacent pixels, or the pixels in the middle 1 / 2*1 / 2 area, etc., and the present disclosure does not limit this.
[0132] Exposure is performed again after a set interval, which can be started after the exposure of cache image 1 is completed, or after the exposure of the first line of cache image 1 is completed. The latter can further shorten the corresponding time for high-speed dynamic visual perception.
[0133] There is no limitation on the method of setting the threshold value, which can be the pixel average of cache image 1 or a set fixed value. The values 0 and 1 are mainly assigned to consider the bandwidth occupied by the image data and the transmission rate, and can provide a higher frame rate output. If the frame rate is not considered, other specified values can be assigned, and the present disclosure does not limit this.
[0134] The output event information can be aligned with the original imaging of the corresponding module. According to the corresponding relationship between pixel positions, the location where the dynamic event occurs can be marked on the original imaging, thereby realizing dynamic detection and improving the clarity of the original imaging by inserting frames at corresponding positions.
[0135] It should be noted that this solution can be applied to any camera module including but not limited to the main camera, telephoto, ultra-wide angle, front camera, etc. of electronic equipment cameras.
[0136] The image processing method provided in the embodiment of the present disclosure realizes automatic and continuous monitoring by accurately detecting image changes, locating the changed area, simplifying and optimizing the subsequent processing. The performance of dynamic image analysis and processing is improved overall. In addition, the image processing method provided in the embodiment of the present disclosure can be realized with only one camera module without taking up additional terminal space.
[0137] Compared with the related art, the present invention no longer requires a dynamic pixel structure to perceive dynamic scenes, thus avoiding the resolution problem of dynamic pixels when shooting static scenes. Moreover, the dynamic perception of the present invention and the imaging of the first image come from the same module, which has the advantage of position matching and can avoid the matching deviation caused by the optical axis deviation and the consistency difference of the camera module.
[0138] Figure 8 The diagram is a schematic diagram of an electronic device according to an exemplary embodiment.
[0139] Based on the same concept, the embodiment of the present disclosure also provides an electronic device 800. The electronic device 800 involved in the present disclosure may also be referred to as a terminal device, a terminal, a user equipment (User Equipment, UE), a mobile station (Mobile Station, MS), an electronic device 800 (Mobile Terminal, MT), etc., which is a device that provides voice and / or data connectivity to a user. For example, the electronic device 800 may be a handheld device, a vehicle-mounted device, etc. with a wireless connection function. At present, examples of the electronic device 800 may include: a smart phone (Mobile Phone), a pocket computer (Pocket Personal Computer, PPC), a handheld computer, a personal digital assistant (Personal Digital Assistant, PDA), a laptop, a tablet computer, a wearable device, or a vehicle-mounted device, etc. In addition, when it is a vehicle-to-everything (V2X) communication system, the electronic device 800 may also be a vehicle-mounted device. It should be understood that the embodiment of the present disclosure does not limit the specific technology and specific device form adopted by the electronic device 800. In the following description, the electronic device 800 is exemplified as a mobile phone for description, but the present disclosure is not limited thereto.
[0140] like Figure 8 As shown, the electronic device 800 may include a camera module 8 and a control module 9 .
[0141] The camera module 8 may include an imaging element (not shown), which may include a static pixel area, and a plurality of pixels may be arranged in the pixel area.
[0142] The control module 9 can control the camera module 8 to capture a first image and a second image. The first image can be an imaging of a first static pixel in a first static pixel area in the static pixel area, and the second image can be an imaging of a first static pixel in a second static pixel area in the static pixel area. At least a portion of the second static pixel area can overlap with the first static pixel area.
[0143] The control module may obtain a comparison parameter between the first image and the second image by comparing the first image and the second image, and may output a target image according to the comparison parameter.
[0144] In this embodiment, by collecting the first image and the second image in the static pixel area of the imaging element and comparing the difference between the two images, the occurrence of a dynamic event is determined to achieve perception of the dynamic scene, so that the dynamic scene can be further processed. Unlike the related art that uses a dynamic pixel structure, the present disclosure uses static pixels, so it can avoid the problem of resolution reduction caused by dynamic pixels when shooting static scenes.
[0145] In some embodiments, the control module 9 may further include a storage unit (not shown), which may be used to store the first image, the second image, and comparison parameters, wherein the storage unit may be disposed in the camera module 8, or the electronic device 800 may include a mainboard (not shown), and the storage unit may be disposed in the mainboard.
[0146] It should be noted that the storage unit can be set in the camera module 8. In a possible case, the storage unit can be integrated with the imaging element of the camera module 8 on the same chip. Taking the imaging element as an image sensor as an example, the storage unit can be integrated in the image sensor and electrically connected to the static pixel structure in the image sensor.
[0147] However, the present disclosure is not limited to this. In another possible case, the electronic device 800 may include a main board, and the storage unit may also be arranged on the main board. The storage unit on the main board may also be electrically connected to the static pixel structure in the image sensor.
[0148] In this embodiment, the storage unit can be arranged in the camera module 8, which can save the space inside the electronic device 800, thereby further realizing the lightness and thinness of the electronic device 800.
[0149] In some embodiments, the control module 9 may further include a comparison unit (not shown), which may be used to compare pixel values of multiple pixels of the first image with pixel values of corresponding pixels of the second image to obtain multiple difference values, wherein the comparison unit may be electrically connected to the storage unit, the comparison unit may be arranged in the camera module 8, or the comparison unit may be arranged in the main board.
[0150] It should be noted that the comparison unit can be set in the camera module 8. In a possible case, the comparison unit can be integrated with the imaging element of the camera module 8 on the same chip. Taking the imaging element as an image sensor as an example, the comparison unit can be integrated in the image sensor and electrically connected to the storage unit in the image sensor.
[0151] However, the present disclosure is not limited to this, and in another possible case, the comparison unit may also be set on the main board, and the comparison unit on the main board may also be electrically connected to the storage unit in the image sensor, or the comparison unit on the main board may also be electrically connected to the storage unit in the main board.
[0152] In some embodiments, the control module may further include a control unit (not shown), and the comparison unit may be used to transmit multiple differences to the control unit, and the control unit may adjust the first image according to the multiple differences, wherein the control unit may be electrically connected to the comparison unit, and the control unit may be arranged in the camera module 8, or the control unit may be arranged in the main board.
[0153] It should be noted that the control unit can be set in the camera module 8. In a possible case, the control unit can be integrated with the imaging element of the camera module 8 on the same chip. Taking the imaging element as an image sensor as an example, the control unit can be integrated in the image sensor and electrically connected to the comparison unit in the image sensor.
[0154] However, the present disclosure is not limited to this, and in another possible case, the control unit may also be set on the main board, and the control unit on the main board may also be electrically connected to the comparison unit in the image sensor, or the control unit on the main board may also be electrically connected to the comparison unit in the main board.
[0155] Based on the same concept, the embodiment of the present disclosure further provides an image processing device 120 .
[0156] It is understandable that the image processing device 120 provided in the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.
[0157] Fig. 9 FIG. 1 is a block diagram of an image processing device according to an exemplary embodiment. Fig. 9The image processing device 120 includes a collection module 121, a calculation module 122 and an output module 123.
[0158] The acquisition module 121 is configured to acquire a first image of a first static pixel area of the imaging element, and to acquire a second image of a second static pixel area of the imaging element, wherein at least a portion of the second static pixel area overlaps with the first static pixel area.
[0159] The calculation module 122 is configured to obtain a comparison parameter between the first image and the second image by comparing the first image and the second image.
[0160] The output module 123 is configured to output a target image according to the comparison parameters.
[0161] In some embodiments, the calculation module 122 can obtain the comparison parameters between the first image and the second image by comparing the first image and the second image in the following manner: the comparison parameters of the same pixel between the first image and the second image can be obtained based on the difference between the pixel value of each pixel of the first image and the pixel value of the same pixel of the second image.
[0162] In some embodiments, the calculation module 112 can obtain the comparison parameter between the first image and the second image by comparing the first image and the second image in the following manner: based on the difference being greater than a threshold parameter, the comparison parameter of the marked pixel is the first comparison parameter; based on the difference being less than or equal to the threshold parameter, the comparison parameter of the same pixel is marked as the second comparison parameter.
[0163] In some embodiments, the output module 123 may output the target image according to the comparison parameter in the following manner: the pixels may be adjusted according to the comparison parameter being a first comparison parameter, and the output module 123 may output the adjusted image as the target image.
[0164] In some embodiments, the adjustment unit may adjust the pixels by performing one or more operations of interpolation, image fusion, image replacement, and image enhancement on the pixels.
[0165] In some embodiments, the image processing device 120 may further include a setting unit, which may be configured to set a pixel mean value of a plurality of pixels of the first image as a threshold parameter.
[0166] In some embodiments, the comparison parameter of the image processing device 120 may be quantized into a 1-bit parameter.
[0167] In some embodiments, the image processing device 120 may further include an execution module, which may be used to determine to end the execution of the image processing method based on the fact that the first comparison parameter is included in the multiple differences between the pixel values of multiple pixels of the first image and the pixel values of corresponding pixels of the second image, and to determine to re-execute the image processing method based on the fact that the first comparison parameter is not included in the multiple differences between the pixel values of multiple pixels of the first image and the pixel values of corresponding pixels of the second image.
[0168] In some embodiments, the image processing device 120 may further include a determination module, which may be configured to determine exposure parameters of the captured image according to the shooting scene.
[0169] In some embodiments, the acquisition module 121 may leave a preset time interval between the step of acquiring a first image of a first static pixel area of an imaging element and the step of acquiring a second image of a second static pixel area of an imaging element.
[0170] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0171] Fig.10 800 is a schematic block diagram of an electronic device 800 according to any of the above embodiments, shown in accordance with an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0172] Reference Fig.10 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0173] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0174] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0175] The power component 806 provides power to the various components of the electronic device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
[0176] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0177] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0178] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0179] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0180] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0181] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0182] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0183] Fig.111 is a block diagram of a device 1100 for image processing according to an exemplary embodiment. For example, the device 1100 may be provided as a server. Fig.11 , the apparatus 1100 includes a processing component 1122, which further includes one or more processors, and a memory resource represented by a memory 1132 for storing instructions, such as applications, that can be executed by the processing component 1122. The application stored in the memory 1132 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1122 is configured to execute instructions to perform the above method.
[0184] The device 1100 may also include a power supply component 1126 configured to perform power management of the device 1100, a wired or wireless network interface 1150 configured to connect the device 1100 to a network, and an input / output (I / O) interface 1158. The device 1100 may operate based on an operating system stored in the memory 1132, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™, or the like.
[0185] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.
[0186] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.
[0187] It will be further understood that the terms “center”, “longitudinal”, “lateral”, “front”, “back”, “up”, “down”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present embodiment and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation.
[0188] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.
[0189] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0190] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.
[0191] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.
Claims
1. An image processing method, characterized in that: The method comprises: capturing a first image of a first static pixel region of an imaging element; Acquiring a second image of a second static pixel region of the imaging element, wherein at least a portion of the second static pixel region overlaps with the first static pixel region; Obtaining a comparison parameter between the first image and the second image by comparing the first image and the second image; According to the comparison parameters, a target image is output.
2. The method according to claim 1, characterized in that The obtaining a comparison parameter between the first image and the second image by comparing the first image and the second image includes: A comparison parameter of the same pixel between the first image and the second image is obtained according to a difference between a pixel value of each pixel of the first image and a pixel value of the same pixel of the second image.
3. The method according to claim 2, characterized in that Obtaining a comparison parameter of a same pixel between the first image and the second image according to a difference between a pixel value of each pixel of the first image and a pixel value of the same pixel of the second image, comprising: According to the difference being greater than a threshold parameter, the comparison parameter of the pixel is marked as a first comparison parameter, and according to the difference being less than or equal to the threshold parameter, the comparison parameter of the same pixel is marked as a second comparison parameter.
4. The method according to claim 3, characterized in that Outputting a target image according to the comparison parameter comprises: According to the comparison parameter being a first comparison parameter, adjusting the pixel; The output adjusted image is the target image.
5. The method according to claim 4, characterized in that The step of adjusting the pixel comprises: One or more operations of frame interpolation, image fusion, image replacement and image enhancement are performed on the pixels.
6. The method according to claim 3, characterized in that The method comprises: A pixel mean value of a plurality of pixels of the first image is set as a threshold parameter.
7. The method according to any one of claims 1 to 6, characterized in that: The comparison parameter is quantized into a 1-bit parameter.
8. The method according to claim 3, characterized in that The method further comprises: determining to end the execution of the image processing method according to that a plurality of differences between the pixel values of the plurality of pixels of the first image and the pixel values of the corresponding pixels of the second image include a first comparison parameter; According to the fact that the first comparison parameter is not included in the plurality of difference values between the pixel values of the plurality of pixels of the first image and the pixel values of the corresponding pixels of the second image, it is determined to re-execute the image processing method.
9. The method according to claim 1, characterized in that: The method further comprises: Determine the exposure parameters of the acquired image according to the shooting scene.
10. The method according to claim 1, characterized in that A preset time is spaced between the step of acquiring a first image of a first static pixel area of the imaging element and the step of acquiring a second image of a second static pixel area of the imaging element.
11. An electronic device, characterized in that: include: A camera module, comprising an imaging element, wherein the imaging element comprises a static pixel area, and a plurality of pixels are arranged in the pixel area; a control module, wherein the control module controls the camera module to capture a first image and a second image, wherein the first image is an image of a first static pixel of a first static pixel region in the static pixel region, and the second image is an image of a first static pixel of a second static pixel region in the static pixel region, and at least a portion of the second static pixel region overlaps with the first static pixel region. The control module obtains a comparison parameter between the first image and the second image by comparing the first image and the second image, and outputs a target image according to the comparison parameter.
12. The electronic device according to claim 11, characterized in that: The control module further includes a storage unit, and the storage unit is used to store the first image, the second image and the comparison parameter. Wherein, the storage unit is arranged in the camera module; or, The electronic device comprises a mainboard, and the storage unit is arranged on the mainboard.
13. The electronic device according to claim 12, characterized in that: The control module further includes a comparison unit, which is used to compare pixel values of a plurality of pixels of the first image with pixel values of corresponding pixels of the second image to obtain a plurality of difference values. Among them, the comparison unit is electrically connected to the storage unit, and the comparison unit is arranged in the camera module; or, the comparison unit is arranged in the main board.
14. The electronic device according to claim 13, characterized in that: The control module further includes a control unit, the comparison unit transmits the plurality of difference values to the control unit, and the control unit adjusts the first image according to the plurality of difference values. Among them, the control unit is electrically connected to the comparison unit, and the control unit is arranged in the camera module; or, the control unit is arranged in the main board.
15. An image processing device, characterized in that: The device comprises: an acquisition module, configured to acquire a first image of a first static pixel region of an imaging element, and to acquire a second image of a second static pixel region of the imaging element, wherein at least a portion of the second static pixel region overlaps with the first static pixel region; a calculation module, configured to obtain a comparison parameter between the first image and the second image by comparing the first image and the second image; The output module outputs the target image according to the comparison parameters.
16. The device according to claim 15, characterized in that The calculation module obtains a comparison parameter between the first image and the second image by comparing the first image and the second image in the following manner: A comparison parameter of the same pixel between the first image and the second image is obtained according to a difference between a pixel value of each pixel of the first image and a pixel value of the same pixel of the second image.
17. The device according to claim 16, characterized in that The calculation module obtains a comparison parameter between the first image and the second image by comparing the first image and the second image in the following manner: According to the difference being greater than a threshold parameter, the comparison parameter of the pixel is marked as a first comparison parameter, and according to the difference being less than or equal to the threshold parameter, the comparison parameter of the same pixel is marked as a second comparison parameter.
18. The device according to claim 17, characterized in that The output module outputs the target image according to the comparison parameters in the following manner: According to the comparison parameter being a first comparison parameter, adjusting the pixel; The output adjusted image is the target image.
19. The device according to claim 18, characterized in that The step of adjusting the pixel comprises: One or more operations of frame interpolation, image fusion, image replacement and image enhancement are performed on the pixels.
20. The device according to claim 17, characterized in that The device also includes: A setting unit is used to set a pixel mean value of a plurality of pixels of the first image as a threshold parameter.
21. The device according to any one of claims 15 to 20, characterized in that The comparison parameter is quantized into a 1-bit parameter.
22. The device according to claim 17, characterized in that The device also includes: an execution module, configured to determine to end the execution of the image processing method according to a plurality of differences between pixel values of the plurality of pixels of the first image and pixel values of the corresponding pixels of the second image, including a first comparison parameter; According to the fact that the first comparison parameter is not included in the plurality of difference values between the pixel values of the plurality of pixels of the first image and the pixel values of the corresponding pixels of the second image, it is determined to re-execute the image processing method.
23. The device according to claim 15, characterized in that The device also includes: The determination module is used to determine the exposure parameters of the acquired image according to the shooting scene.
24. The device according to claim 15, characterized in that The acquisition module places a preset time interval between the step of acquiring a first image of a first static pixel area of the imaging element and the step of acquiring a second image of a second static pixel area of the imaging element.
25. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: execute the image processing method as described in any one of claims 1-10.
26. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the image processing method as described in any one of claims 1 to 10.