WO2021104394A1 - Image processing method and apparatus, electronic device, and storage medium - Google Patents

Image processing method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2021104394A1
WO2021104394A1 PCT/CN2020/131892 CN2020131892W WO2021104394A1 WO 2021104394 A1 WO2021104394 A1 WO 2021104394A1 CN 2020131892 W CN2020131892 W CN 2020131892W WO 2021104394 A1 WO2021104394 A1 WO 2021104394A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
pixel
difference
target
difference coefficient
Prior art date
Application number
PCT/CN2020/131892
Other languages
French (fr)
Chinese (zh)
Inventor
姚坤
Original Assignee
RealMe重庆移动通信有限公司
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 RealMe重庆移动通信有限公司 filed Critical RealMe重庆移动通信有限公司
Priority to EP20891548.8A priority Critical patent/EP4053784A4/en
Publication of WO2021104394A1 publication Critical patent/WO2021104394A1/en
Priority to US17/739,963 priority patent/US20220261961A1/en

Links

Images

Classifications

    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4053Super resolution, i.e. output image resolution higher than sensor resolution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/951Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Definitions

  • the present disclosure relates to the field of image processing technology, and in particular, to an image processing method, an image processing device, an electronic device, and a computer-readable storage medium.
  • high-pixel cameras are mostly used to capture high-resolution images.
  • the purpose of the present disclosure is to provide an image processing method and device, electronic equipment, and storage medium, so as to overcome at least to a certain extent the problem of poor image quality caused by limitations and defects of related technologies.
  • an image processing method including: acquiring a first image and a second image, the resolution of the second image is greater than the resolution of the first image; determining that the second image The difference information between the target pixel point of the first image and the reference pixel point corresponding to the target pixel point in the first image; according to the difference information, the difference information is determined in a preset image that meets the resolution of the first image Perform difference processing on all pixels of, to obtain a target image that meets the resolution of the second image.
  • an image processing device including: an image acquisition module for acquiring a first image and a second image, the resolution of the second image is greater than the resolution of the first image; A value information determining module, used to determine the difference information between a target pixel in the second image and a reference pixel in the first image corresponding to the target pixel; a target image generating module, used to Perform difference processing on all pixels in the preset image that meets the resolution of the first image according to the difference information, and obtain a target image that meets the resolution of the second image.
  • an electronic device including: an image sensor; a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to obtain information from the image sensor
  • the executable instruction is executed on the image to execute the image processing method described in any one of the above.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the image processing method described in any one of the above is implemented.
  • FIG. 1 schematically shows a schematic diagram of a system architecture for implementing an image processing method in an embodiment of the present disclosure.
  • Fig. 2 schematically shows a schematic diagram of an image processing method in an embodiment of the present disclosure.
  • Fig. 3 schematically shows a flow chart of determining difference information in an embodiment of the present disclosure.
  • Fig. 4 schematically shows a flowchart of updating difference information in an embodiment of the present disclosure.
  • Fig. 5 schematically shows a flow chart of outputting a target image in an embodiment of the present disclosure.
  • Fig. 6 schematically shows a block diagram of an image processing device in an embodiment of the present disclosure.
  • Fig. 7 schematically shows a block diagram of an electronic device in an embodiment of the present disclosure.
  • FIG. 1 schematically shows a system architecture diagram for implementing the image processing method.
  • the system architecture 100 may include a first end 101, a network 102, and a second end 103.
  • the first terminal 101 may be a client, for example, various handheld devices (smart phones), desktop computers, in-vehicle devices, wearable devices, etc. that have a camera function and are equipped with multiple cameras.
  • the network 102 is used to provide the medium of the communication link between the first end 101 and the second end 103.
  • the network 102 may include various connection types, such as wired communication links, wireless communication links, etc., in the embodiments of the present disclosure.
  • the network 102 between the first end 101 and the second end 103 may be a wired communication link, for example, a communication link may be provided through a serial port cable, or may be a wireless communication link, and a communication link may be provided through a wireless network.
  • the second end 103 may be a client terminal, such as a portable computer, a desktop computer, a smart phone, and other terminal devices that have a camera function and an image processing function, and are used to synthesize images or perform other image processing. Wherein, when the first end and the second end are both clients, they may be the same client.
  • the image processing method provided by the embodiments of the present disclosure can be completely executed by the second end or the first end, or partly executed by the first end and partly executed by the second end.
  • the executive body does not make special restrictions.
  • the image processing device can be arranged in the second end 103 or in the first end 101.
  • cameras with different pixels in the client can respectively capture a first image and a second image with different resolutions, and then calculate the reference pixel points of the first image and the target pixel points of the second image.
  • the difference information can further process the preset image into a high-resolution target image based on the difference information and the low-resolution preset image. Therefore, the process of outputting high-resolution images is avoided, and the image quality is improved.
  • the target pixel in the second image and the reference pixel corresponding to the target pixel in the first image The difference information is used to perform difference processing on a preset image with the same resolution as the first image, so as to convert the preset image into a target image with a resolution of the second image. Since there is no need to obtain a high-resolution second image all the time, noise caused by high-resolution images can be avoided.
  • the target image is synthesized through low-resolution preset images and difference information, so that only low-resolution images can be used.
  • the effect of outputting high-resolution images reduces the problem of low signal-to-noise ratio caused by high resolution, reduces image noise, improves imaging effects, and improves image quality.
  • the difference information between the target pixel in the second image and the reference pixel in the first image can be determined, and the low-resolution preset
  • the image is converted into a high-resolution target image, which reduces the problem of high power consumption caused by continuous output of high-resolution images in related technologies, reduces the power consumption of the terminal device, and improves the performance and reliability of the terminal device , It also increases applicability.
  • an image processing method is provided in the embodiments of the present disclosure, which can be applied to any application scenario that uses a camera to collect images and merge images.
  • the image processing method may include step S210 to step S230, which are described in detail as follows:
  • step S210 a first image and a second image are acquired, and the resolution of the second image is greater than the resolution of the first image.
  • multiple cameras may be used to photograph the scene and the objects to be photographed in the scene.
  • the number of the multiple cameras can be two, three, four, etc., which is not limited here.
  • Multiple cameras may be provided in one terminal device.
  • the terminal device may be, for example, an electronic device that can take pictures such as a smart phone, as long as it has multiple cameras.
  • the multiple cameras may include cameras with different pixels, and may specifically include a first camera and a second camera, etc., where the first camera may be a low-pixel camera, and the second camera may be a high-pixel camera. To facilitate the distinction, the image captured by the first camera may be used as the first image, and the image captured by the second camera may be used as the second image.
  • the specific pixels of the first camera and the second camera can be determined according to actual needs, as long as the pixels of the first camera are lower than the second camera, which is not limited here.
  • the first camera may be 16 million pixels
  • the second camera may be 64 million pixels or 100 million pixels, etc., which is not limited here.
  • the second camera has a low signal-to-noise ratio in a low-light scene.
  • the signal-to-noise ratio is the ratio of signal to noise in the image signal processing system. The larger the ratio, the smaller the noise and the better the effect.
  • the first image and the second image may be obtained after shooting the same scene, for example, the first image and the second image are respectively shot at the same time or sequentially.
  • the first image and the second image may also be obtained after shooting different scenes, but the different scenes may include part of the same or corresponding specific scenes, for example, different scenes include the sky, a certain person, and so on. Since the pixels of the camera are different, and the pixels are used to describe the resolution, the resolution of the first image and the second image obtained are different. Specifically, the resolution of the first image obtained by the first camera may be smaller than the resolution of the second image.
  • both the first image and the second image may be images taken in any mode of the camera in the terminal device, for example, may be a portrait mode, a professional mode, etc., which are not limited here.
  • the format of the first image and the second image may be RAW (RAW Image Format).
  • RAW is an unprocessed and uncompressed format. RAW can be conceptualized as original image encoding data.
  • the format of the first image and the second image can also be YUV format. Y in YUV represents brightness, which is gray value; while UV represents chromaticity, which is used to describe the color and saturation of the image, and is used to specify The color of the pixel.
  • the formats of the first image and the second image are not limited.
  • the first image and the second image are used to determine the difference between different cameras, so the first image and the second image can be part of the frame images taken by each camera, such as any frame of image .
  • the first image may be a frame of image data collected by the first camera
  • the second image may be a frame of image data collected by the second camera.
  • the first camera and the second camera may be turned on first to acquire a frame of image as the first image and the second image.
  • step S220 the difference information between the target pixel in the second image and the reference pixel in the first image corresponding to the target pixel is determined.
  • the target pixel refers to a pixel in the second image.
  • each pixel in the second image may be used as the target pixel, so as to traverse the entire second image.
  • the reference pixel point in the first image corresponding to the target pixel point refers to the pixel point in the neighborhood corresponding to the target pixel point in the first image, and the target pixel point corresponding neighborhood is adjacent to the target pixel point
  • the area range may specifically be a plurality of pixels located outside the target pixel point and having an equal or unequal distance from the target pixel point in the area range.
  • reference pixels can be pixels corresponding to 4 neighborhoods, D neighborhoods, and 8 neighborhoods, and the number of reference pixels can be 4 or 8 within the range of adjacent areas, etc., and the reference pixel The more the number of points, the more accurate the difference information obtained.
  • a pixel with a 4-neighborhood reference pixel is taken as an example for description.
  • the difference information refers to the pixel deviation value or pixel deviation between the pixel value of the target pixel in the second image and the pixel value of each reference pixel in the first image. Since each pixel can be used as a target pixel, the difference information can represent the deviation of the pixel value of the entire first image and the second image.
  • Fig. 3 schematically shows a flow chart for determining the difference information, referring to Fig. 3, which mainly includes step S310 to step S340, in which:
  • each of the second images is used as the target pixel.
  • each pixel can be used as the target pixel in turn. It is also possible to randomly select a pixel in the second image as the target pixel until all the pixels are processed, which is not limited here.
  • a certain pixel f (x, y) in the second image can be used as the target pixel, where x, y represent the position coordinates of the target pixel, and f (x, y) represents the The pixel value of the target pixel.
  • step S320 the coordinates corresponding to the target pixel are determined in the first image according to the coordinates of the target pixel to determine the reference pixel in the first image.
  • the reference pixel in the first image may be determined according to the coordinates of the target pixel.
  • the adjacent coordinates of the coordinate can be determined as the coordinate corresponding to it in the first image, and then the position of the reference pixel point can be determined.
  • the target pixel in the second image is f(x, y), and the adjacent 4 pixels can be pixels located at the top, bottom, left, and right of the target pixel.
  • the calculated first pixel corresponds to the coordinates of the target pixel.
  • the coordinates of the positions of the adjacent 4 pixels in the image can be g(x,y),g(x,y+1),g(x+1,y),g(x+1,y+1) . It should be noted that the x and y in the two coordinates do not represent the same coordinate point, but only represent the coordinate position in the two images. After the coordinates of the reference pixel point are obtained, the pixel point located at the coordinate can be used as the reference pixel point in the first image according to these coordinates.
  • step S330 the difference coefficient between the pixel value of the target pixel and the pixel value of the reference pixel is obtained.
  • the pixel value of the target pixel can be obtained; at the same time, the pixel value of the reference pixel can also be obtained.
  • the difference coefficient refers to the pixel difference between each target pixel and its corresponding reference pixel. Specifically, it may be the pixel difference between the pixel value of each target pixel and the pixel value of each reference pixel.
  • the bilinear difference is a linear interpolation extension of the difference function of two variables, and its core idea is to perform a linear difference in two directions respectively.
  • the bilinear difference algorithm makes full use of the four real pixel values around the virtual point in the source image to jointly determine a pixel value in the image, so the zoom effect is better.
  • the multiple directions may be the X direction and the Y direction, and each direction may correspond to a preset difference coefficient, and the preset difference coefficients in different directions may be the same or different, which is not specifically limited.
  • the linear difference in the X direction is performed according to the combination of the X coordinate of the reference pixel, the X coordinate of the target pixel, and the respective corresponding pixel values.
  • the linear difference in the Y direction is performed according to the combination of the Y coordinate of the reference pixel, the Y coordinate of the target pixel, and the linear difference in the X direction.
  • the X-direction linear difference can be performed first, or the Y-direction linear difference can be performed first, which is not limited here.
  • a bilinear difference algorithm can be used to perform linear difference between the target pixel and its corresponding reference pixel in the X direction and the Y direction, respectively, to obtain the preset difference coefficient ⁇ in the X direction and the Y direction.
  • the preset difference coefficient ⁇ on.
  • the preset difference coefficients in multiple directions may be spliced to obtain the difference coefficient between the target pixel and the reference pixel, which may be expressed as ( ⁇ , ⁇ ), for example.
  • step S340 the difference information is generated according to the difference coefficient.
  • each pixel in the second image can be used as the target pixel in the same way, and then each pixel in the second image can be compared with each pixel in the second image.
  • a difference calculation is performed between corresponding reference pixels in the first image to obtain a difference coefficient for each pixel of the second image.
  • the difference coefficients of each pixel can be combined to generate a difference information.
  • the number of difference coefficients contained in the difference information can be the same as the number of pixels in the second image, and the difference The information can be represented by a table of difference coefficients.
  • the difference information can be correspondingly recorded as w(x, y) according to the position of each pixel in the second image.
  • step S230 performing difference processing on a preset image conforming to the resolution of the first image according to the difference information, and obtaining a target image conforming to the resolution of the second image.
  • the preset image can be any graphic with the same resolution as the first image, for example, it can be other frame images in a certain video except the first image; it can also be a continuously shot image except the first image. Frame images other than one image.
  • the preset image may be collected by the first camera after the first image.
  • the preset image may be collected by the first camera, so the resolution of the preset image may conform to the resolution of the first image, that is, low resolution.
  • the target image refers to the image obtained by adjusting the pixel value and the resolution of the preset image.
  • the resolution of the target image is different from the preset image, and the resolution of the target image is the same as the resolution of the second image. Therefore, it can be considered that the resolution of the target image is the same as that of the image captured by the second camera.
  • the execution process of step S230 may include: performing a logical operation on the pixel values of all pixels in the preset image according to the difference information, and adjusting the pixel values of all pixels to match the resolution of the second image.
  • the difference information can be fused with the preset image obtained by the first camera, and the result of the fusion between the pixel values
  • the conversion result converts the preset image that meets the resolution of the first image into an image that meets the resolution of the second image, thereby using the converted image as the target image. Since the resolution of the target image is the same as the resolution of the second image captured by the second camera, the target image can be used to replace the image captured by the second camera.
  • the difference coefficient table After the difference coefficient table is obtained, it can be calculated according to the difference coefficient table between the first image and the second image, combined with the pixel values of the pixels of the preset image whose resolution matches the first image
  • the resolution is consistent with the pixel value of the pixel in the high-definition target image of the second image, and the calculation formula may be as shown in formula (1):
  • the symbol ⁇ only means that the difference is performed by the bilinear difference method.
  • the pixel values of the pixels are converted.
  • the pixel value of multiple neighborhood pixels in each frame of the preset image can be converted into a high-resolution pixel value through the difference coefficient table . Repeat this until the pixel values of all pixels in all frames in the preset image are converted and fused, so as to obtain the corresponding pixel values according to the pixel values of all pixels in all frames in the low-resolution preset image collected by the first camera. The pixel value of the high-resolution pixel point, thereby generating the target image.
  • the target image can basically be obtained by background collection and synthesis
  • the first camera is used for continuous shooting during the shooting process, so the second camera can greatly reduce the shooting time. Power consumption.
  • the target image with the same resolution as the second image can be output, which improves the image quality.
  • the high signal-to-noise ratio will greatly improve the image effect.
  • the image quality is improved .
  • the second camera can be turned off, only the low-pixel first camera is used for shooting, and the calculated difference information between the first image and the second image is used Perform image fusion to output an image with the same resolution as that taken by the second camera. Since the second camera is only used to collect a small number of images in order to calculate the difference information and update the difference information, after collecting a frame of the second image, the second camera can be turned off to reduce the use time of the high-pixel camera. The power consumption of the terminal equipment is reduced, the risk of heat generation of the terminal equipment is also avoided, and the reliability is improved. And it can improve the quality and image quality of the captured images, obtain high-quality effects through low power consumption, and improve the user experience.
  • the second auxiliary image may be acquired through a preset period, and the difference coefficient may be updated according to the acquired second auxiliary image, so as to obtain the difference information according to the updated difference coefficient .
  • the preset period can be, for example, any suitable time interval, such as 30 seconds or 2 minutes, and so on.
  • the second auxiliary image here may be an image of another frame re-acquired by the second camera.
  • the second auxiliary image may be different from the second image, but the resolution of the second auxiliary image and the resolution of the second image are the same.
  • the second auxiliary image may be one frame of image or multiple frames of image, and whether to collect one frame of image or multiple frames of image may be specifically determined according to the reference information.
  • the reference information here may be the memory status of the terminal device and/or the CPU running status. If the reference information meets the update condition, multiple frames of second auxiliary images are collected. If it is not satisfied, only one frame of the second auxiliary image is collected.
  • the memory situation can be described by the remaining memory space, and a first threshold can be provided to evaluate the memory situation.
  • the CPU operating condition can be represented by the CPU operating speed, and a second threshold can be provided to evaluate the CPU operating condition.
  • the reference information can be determined when the memory condition is greater than the first threshold, or only when the CPU operating condition is greater than the second threshold, or when the memory condition is greater than the first threshold and the CPU operating condition is greater than the second threshold, etc. Meet the update condition to collect multiple frames of second auxiliary images. Otherwise, only one frame of the second auxiliary image is collected. Collecting the second auxiliary image at a preset period and then performing real-time correction of the difference information can make the determined difference information more accurate.
  • the target pixel can be re-determined according to the at least one frame of the second auxiliary image, and the difference coefficient can be updated according to the re-determined target pixel and the reference pixel corresponding to the re-determined target pixel.
  • a target pixel can be re-determined for each frame of the second auxiliary image.
  • step S210 determines the pixel value of the target pixel according to the method in step S210 to step S220, and the preset difference between the pixel value of the reference pixel in the first auxiliary image corresponding to the target pixel in the x direction and the y direction
  • the difference coefficient of the coefficient composition There may still be multiple reference pixels in the first auxiliary image, for example, 4 or 8, and so on. Further, it is possible to traverse all pixels in the second auxiliary image to obtain difference information corresponding to the second auxiliary image, and use the difference information to synthesize the target image.
  • Fig. 4 schematically shows a flowchart for updating the difference information, which specifically includes step S410 and step S420, where:
  • step S410 the target pixel of each frame of the second auxiliary image is re-determined, and the difference coefficient of each frame of the second auxiliary image is determined according to the re-determined target pixel of each second auxiliary image and the reference pixel corresponding to it. .
  • the second auxiliary image is a frame, which can be specifically determined according to the reference information. If the second auxiliary image is a frame, the original difference coefficients are directly updated according to the difference coefficients composed of all pixels in the second auxiliary image in multiple directions. If the second auxiliary image is multiple frames, the target pixel of each second auxiliary image can be re-determined, and in multiple directions, the target pixel of each second auxiliary image and the corresponding reference pixel are determined to conform to each frame The difference coefficient of the second auxiliary image.
  • the number of difference coefficients may be determined according to the number of frames of the second auxiliary image and the number of pixels in each frame.
  • the difference coefficient conforming to the second auxiliary image of each frame may be the pixel deviation between the pixel value of each target pixel in each frame of the second auxiliary image and the pixel value of the corresponding reference pixel.
  • step S420 the difference coefficients of each frame of the second auxiliary image are averaged to obtain an average difference coefficient, and the difference information is updated according to the average difference coefficient.
  • the difference coefficient of each frame of the second auxiliary image may be averaged to obtain the average difference coefficient.
  • the average difference coefficient may be used as the difference coefficient of each pixel in the second auxiliary image of multiple frames, so as to update the original second image according to the difference coefficient of each pixel in the second auxiliary image of the multiple frames.
  • the difference coefficient corresponding to the target pixel point realizes the dynamic update of the difference coefficient.
  • the entire difference information is updated according to the combination of the difference coefficient of each pixel.
  • the original difference information can be updated according to the updated difference coefficient to obtain the difference coefficients of all pixels corresponding to the second auxiliary image of multiple frames
  • Fig. 5 schematically shows the entire flow chart of image processing, referring to Fig. 5, it mainly includes the following steps:
  • step S510 a frame of a first image is acquired, and the pixel value of a certain pixel in the first image is g(x, y).
  • step S520 a frame of a second image is acquired, and the pixel value of a certain pixel in the second image is f(x, y).
  • step S530 the difference coefficient of each pixel is obtained to form difference information, that is, the difference coefficient table w(x, y).
  • step S540 a high-resolution target image is obtained through a bilinear difference algorithm.
  • step S550 the target image is continuously output.
  • the technical solution in Figure 5 calculates the difference coefficient of each pixel of the low-resolution and high-resolution images, and then performs the difference through the difference coefficient in the later stage to achieve high-resolution output only by shooting with a low-pixel camera.
  • the effect of the video image Since a low-pixel camera is used for shooting, the signal-to-noise ratio can be improved, so the image effect can be greatly improved. Since a low-resolution preset image is captured by a low-pixel camera, the preset image and difference information are then fused to obtain a high-resolution target image, and the synthesized target image is used as an image collected by the high-pixel camera.
  • the fusion operation can avoid the continuous shooting of high-pixel cameras, which can reduce the use time of high-pixel cameras, thereby reducing power consumption, and avoiding the signal-to-noise comparison caused by high-pixel cameras
  • the low problem reduces the noise of the image and improves the image quality.
  • an image processing device may include: an image acquisition module 601 for acquiring a first image and a second image. The resolution of is greater than the resolution of the first image; the difference information determination module 602 is used to determine the target pixel in the second image and the reference pixel in the first image corresponding to the target pixel The difference information between the points; the target image generation module 603 is configured to perform difference processing on a preset image that conforms to the resolution of the first image according to the difference information, and obtain a resolution that conforms to the resolution of the second image Target image.
  • the difference information determination module includes: a target pixel designation module, configured to use each pixel in the second image as the target pixel; and a reference pixel
  • the determining module is configured to determine the corresponding coordinates in the first image according to the coordinates of the target pixel to determine the reference pixel in the first image
  • the difference coefficient determining module is configured to obtain The difference coefficient between the pixel value of the target pixel and the pixel value of the reference pixel
  • a difference coefficient combination module for generating the difference information according to the difference coefficient.
  • the difference coefficient determination module is configured to: calculate preset difference coefficients between the pixel value of the target pixel and the pixel value of the reference pixel in multiple directions , To obtain the difference coefficient.
  • the target image generation module is configured to: perform a logical operation on the pixel values of all pixels in the preset image according to the difference information, and then combine all the pixels The pixel value of is adjusted to a pixel value that meets the resolution of the second image to obtain the target image.
  • the device further includes: a difference information update module, configured to obtain a second auxiliary image through a preset period, and compare the difference coefficient according to the second auxiliary image The update is performed to determine the difference information according to the updated difference coefficient.
  • a difference information update module configured to obtain a second auxiliary image through a preset period, and compare the difference coefficient according to the second auxiliary image The update is performed to determine the difference information according to the updated difference coefficient.
  • the difference information update module includes: an auxiliary image acquisition module, configured to acquire at least one frame of the second auxiliary image according to the reference information; The at least one frame of second auxiliary image re-determines the target pixel, updates the difference coefficient according to the re-determined target pixel and the corresponding reference pixel, and determines the difference information according to the updated difference coefficient.
  • the difference coefficient update module is configured to: re-determine the target pixel of each frame of the second auxiliary image.
  • the direction determines the difference coefficient of each frame of the second auxiliary image according to the re-determined target pixel point of each frame of the second auxiliary image and the corresponding reference pixel point; the difference coefficient of each frame of the second auxiliary image is averaged Obtain an average difference coefficient, and update the difference information according to the average difference coefficient.
  • modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory.
  • the features and functions of two or more modules or units described above may be embodied in one module or unit.
  • the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
  • an electronic device capable of implementing the above method is also provided.
  • the electronic device 700 according to this embodiment of the present disclosure will be described below with reference to FIG. 7.
  • the electronic device 700 shown in FIG. 7 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
  • the electronic device 700 is represented in the form of a general-purpose computing device.
  • the components of the electronic device 700 may include, but are not limited to: the aforementioned at least one processing unit 710, the aforementioned at least one storage unit 720, a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710), a display unit 740, and an image sensor 770
  • the image sensor 770 is used to obtain images of corresponding resolutions.
  • the storage unit stores program code, and the program code can be executed by the processing unit 710, so that the processing unit 710 executes the various exemplary methods described in the "Exemplary Method" section of this specification. Steps of implementation.
  • the processing unit 710 may perform the steps shown in FIG.
  • step S210 a first image and a second image are acquired, where the resolution of the second image is greater than the resolution of the first image;
  • step S220 determine the difference information between the target pixel in the second image and the reference pixel in the first image corresponding to the target pixel; in step S230, according to the difference
  • the value information performs difference processing on a preset image that meets the resolution of the first image, and obtains a target image that meets the resolution of the second image.
  • the storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 7201 and/or a cache storage unit 7202, and may further include a read-only storage unit (ROM) 7203.
  • RAM random access storage unit
  • ROM read-only storage unit
  • the storage unit 720 may also include a program/utility tool 7204 having a set of (at least one) program module 7205.
  • program module 7205 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
  • the bus 730 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration interface, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
  • the electronic device 700 may also communicate with one or more external devices 800 (such as keyboards, pointing devices, Bluetooth devices, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 700, and/or communicate with Any device (eg, router, modem, etc.) that enables the electronic device 700 to communicate with one or more other computing devices. This communication can be performed through an input/output (I/O) interface 750.
  • the electronic device 700 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 760. As shown in the figure, the network adapter 760 communicates with other modules of the electronic device 700 through the bus 730.
  • LAN local area network
  • WAN wide area network
  • public network such as the Internet
  • a computer-readable storage medium is also provided, on which is stored a program product capable of implementing the above-mentioned method in this specification.
  • various aspects of the present disclosure may also be implemented in the form of a program product, which includes program code.
  • the program product runs on a terminal device, the program code is used to enable the The terminal device executes the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification.
  • the program product for implementing the above method according to the embodiment of the present disclosure may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer.
  • CD-ROM portable compact disk read-only memory
  • the program product of the present disclosure is not limited thereto.
  • the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device.
  • the program product can use any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
  • the program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
  • the program code used to perform the operations of the present disclosure can be written in any combination of one or more programming languages.
  • the programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural styles. Programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
  • the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (for example, using Internet service providers). Business to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service providers for example, using Internet service providers.

Abstract

An image processing method and apparatus, an electronic device, and a storage medium, relating to the technical field of image processing. The method comprises: obtaining a first image and a second image, wherein the resolution of the second image is greater than that of the first image (S210); determining difference value information between a target pixel point in the second image and a reference pixel point, corresponding to the target pixel point, in the first image (S220); and according to the difference value information, performing difference value processing on a preset image that conforms to the resolution of the first image, so as to obtain a target image conforming to the resolution of the second image (S230). The method can obtain the target image according to the difference value information, and improve image quality.

Description

图像处理方法及装置、电子设备、存储介质Image processing method and device, electronic equipment, and storage medium
本申请要求于2019年11月28日提交的,申请号为201911194628.9,名称为“图像处理方法及装置、电子设备、存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on November 28, 2019, with the application number 201911194628.9, titled "Image processing method and device, electronic equipment, storage medium", the entire content of which is incorporated into this application by reference in.
技术领域Technical field
本公开涉及图像处理技术领域,具体而言,涉及一种图像处理方法、图像处理装置、电子设备以及计算机可读存储介质。The present disclosure relates to the field of image processing technology, and in particular, to an image processing method, an image processing device, an electronic device, and a computer-readable storage medium.
背景技术Background technique
在通过设置多个摄像头的终端设备拍摄图像和视频的过程中,为了提高拍摄效果,大多采用高像素的摄像头来拍摄高分辨率的图像。In the process of capturing images and videos through a terminal device with multiple cameras, in order to improve the shooting effect, high-pixel cameras are mostly used to capture high-resolution images.
相关技术中,在持续获取高分辨率的图像时,导致图像的成像效果以及图像质量较差。另外,获取高分辨率的图像会导致终端设备的功耗较高。In the related art, when high-resolution images are continuously acquired, the imaging effect and image quality of the images are poor. In addition, obtaining high-resolution images will lead to higher power consumption of the terminal equipment.
发明内容Summary of the invention
本公开的目的在于提供一种图像处理方法及装置、电子设备、存储介质,进而至少在一定程度上克服由于相关技术的限制和缺陷而导致的图像质量较差的问题。The purpose of the present disclosure is to provide an image processing method and device, electronic equipment, and storage medium, so as to overcome at least to a certain extent the problem of poor image quality caused by limitations and defects of related technologies.
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。Other characteristics and advantages of the present disclosure will become apparent through the following detailed description, or partly learned through the practice of the present disclosure.
根据本公开的一个方面,提供一种图像处理方法,包括:获取第一图像和第二图像,所述第二图像的分辨率大于所述第一图像的分辨率;确定所述第二图像中的目标像素点以及所述第一图像中对应于所述目标像素点的参考像素点之间的差值信息;根据所述差值信息对符合所述第一图像的分辨率的预设图像中的所有像素点进行差值处理,获取符合第二图像的分辨率的目标图像。According to one aspect of the present disclosure, there is provided an image processing method, including: acquiring a first image and a second image, the resolution of the second image is greater than the resolution of the first image; determining that the second image The difference information between the target pixel point of the first image and the reference pixel point corresponding to the target pixel point in the first image; according to the difference information, the difference information is determined in a preset image that meets the resolution of the first image Perform difference processing on all pixels of, to obtain a target image that meets the resolution of the second image.
根据本公开的一个方面,提供一种图像处理装置,包括:图像获取模块,用于获取第一图像和第二图像,所述第二图像的分辨率大于所述第一图像的分辨率;差值信息确定模块,用于确定所述第二图像中的目标像素点以及所述第一图像中对应于所述目标像素点的参考像素点之间的差值信息;目标图像生成模块,用于根据所述差值信息对符合所述第一图像的分辨率的预设图像中的所有像素点进行差值处理,获取符合第二图像的分辨率的目标图像。According to one aspect of the present disclosure, there is provided an image processing device, including: an image acquisition module for acquiring a first image and a second image, the resolution of the second image is greater than the resolution of the first image; A value information determining module, used to determine the difference information between a target pixel in the second image and a reference pixel in the first image corresponding to the target pixel; a target image generating module, used to Perform difference processing on all pixels in the preset image that meets the resolution of the first image according to the difference information, and obtain a target image that meets the resolution of the second image.
根据本公开的一个方面,提供一种电子设备,包括:图像传感器;处理器;以及存储器,用于存储所述处理器的可执行指令;其中,所述处理器配置为对所述图像传感器获取的图像执行所述可执行指令来执行上述任意一项所述的图像处理方法。According to one aspect of the present disclosure, there is provided an electronic device, including: an image sensor; a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to obtain information from the image sensor The executable instruction is executed on the image to execute the image processing method described in any one of the above.
根据本公开的一个方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一项所述的图像处理方法。According to one aspect of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the image processing method described in any one of the above is implemented.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure.
附图说明Description of the drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。The drawings herein are incorporated into the specification and constitute a part of the specification, show embodiments consistent with the disclosure, and are used together with the specification to explain the principle of the disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1示意性示出本公开实施例中用于实现图像处理方法的系统架构示意图。FIG. 1 schematically shows a schematic diagram of a system architecture for implementing an image processing method in an embodiment of the present disclosure.
图2示意性示出本公开实施例中一种图像处理方法的示意图。Fig. 2 schematically shows a schematic diagram of an image processing method in an embodiment of the present disclosure.
图3示意性示出本公开实施例中确定差值信息的流程示意图。Fig. 3 schematically shows a flow chart of determining difference information in an embodiment of the present disclosure.
图4示意性示出本公开实施例中更新差值信息的流程示意图。Fig. 4 schematically shows a flowchart of updating difference information in an embodiment of the present disclosure.
图5示意性示出本公开实施例中输出目标图像的流程示意图。Fig. 5 schematically shows a flow chart of outputting a target image in an embodiment of the present disclosure.
图6示意性示出本公开实施例中图像处理装置的框图。Fig. 6 schematically shows a block diagram of an image processing device in an embodiment of the present disclosure.
图7示意性示出本公开实施例中一种电子设备的框图。Fig. 7 schematically shows a block diagram of an electronic device in an embodiment of the present disclosure.
具体实施方式Detailed ways
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。在下面的描述中,提供许多具体细节从而给出对本公开的实施方式的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而省略所述特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知技术方案以避免喧宾夺主而使得本公开的各方面变得模糊。Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms, and should not be construed as being limited to the examples set forth herein; on the contrary, the provision of these embodiments makes the present disclosure more comprehensive and complete, and fully conveys the concept of the example embodiments To those skilled in the art. The described features, structures or characteristics can be combined in one or more embodiments in any suitable way. In the following description, many specific details are provided to give a sufficient understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be used. In other cases, the well-known technical solutions are not shown or described in detail to avoid overwhelming the crowd and obscure all aspects of the present disclosure.
此外,附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。In addition, the drawings are only schematic illustrations of the present disclosure, and are not necessarily drawn to scale. The same reference numerals in the figures denote the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in the form of software, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and/or processor devices and/or microcontroller devices.
图1中示意性示出了用于实现图像处理方法的系统架构图,如图1所示,系统架构100可以包括第一端101、网络102、第二端103。其中,第一端101可以是客户端,例如可以为各种具有拍照功能且设置多个摄像头的手持设备(智能手机)、台式计算机、 车载设备以及可穿戴设备等等。网络102用以在第一端101和第二端103之间提供通信链路的介质,网络102可以包括各种连接类型,例如有线通信链路、无线通信链路等等,在本公开实施例中,第一端101和第二端103之间的网络102可以是有线通信链路,例如可以通过串口连接线提供通信链路,也可以是无线通信链路,通过无线网络提供通信链路。第二端103可以是客户端,例如便携式计算机、台式计算机、智能手机等具有拍照功能以及具有图像处理功能的终端设备,用于对图像进行合成或者是其它图像处理。其中,当第一端和第二端均为客户端时,二者可以为同一个客户端。FIG. 1 schematically shows a system architecture diagram for implementing the image processing method. As shown in FIG. 1, the system architecture 100 may include a first end 101, a network 102, and a second end 103. Among them, the first terminal 101 may be a client, for example, various handheld devices (smart phones), desktop computers, in-vehicle devices, wearable devices, etc. that have a camera function and are equipped with multiple cameras. The network 102 is used to provide the medium of the communication link between the first end 101 and the second end 103. The network 102 may include various connection types, such as wired communication links, wireless communication links, etc., in the embodiments of the present disclosure. Among them, the network 102 between the first end 101 and the second end 103 may be a wired communication link, for example, a communication link may be provided through a serial port cable, or may be a wireless communication link, and a communication link may be provided through a wireless network. The second end 103 may be a client terminal, such as a portable computer, a desktop computer, a smart phone, and other terminal devices that have a camera function and an image processing function, and are used to synthesize images or perform other image processing. Wherein, when the first end and the second end are both clients, they may be the same client.
应该理解,图1中的第一端、网络和第二端的数目仅仅是示意性的。根据实现需要,可以具有任意数目的客户端、网络和服务器。It should be understood that the numbers of the first end, the network, and the second end in FIG. 1 are only illustrative. There can be any number of clients, networks, and servers according to implementation needs.
需要说明的是,本公开实施例所提供的图像处理方法可以完全由第二端或第一端执行,也可以部分由第一端执行,部分由第二端执行,此处对图像处理方法的执行主体不做特殊限定。相应地,图像处理装置可设置于第二端103中或设置于第一端101中。It should be noted that the image processing method provided by the embodiments of the present disclosure can be completely executed by the second end or the first end, or partly executed by the first end and partly executed by the second end. The executive body does not make special restrictions. Correspondingly, the image processing device can be arranged in the second end 103 or in the first end 101.
本公开实施例中,客户端中的不同像素的摄像头可以分别采集一张分辨率不同的第一图像和第二图像,进而对第一图像的参考像素点和第二图像的目标像素点及计算差值信息,进一步地可以根据差值信息以及低分辨率的预设图像,将预设图像处理成高分辨率的目标图像。从而避免了输出高分辨率的图像的过程,提高了图像质量。In the embodiments of the present disclosure, cameras with different pixels in the client can respectively capture a first image and a second image with different resolutions, and then calculate the reference pixel points of the first image and the target pixel points of the second image. The difference information can further process the preset image into a high-resolution target image based on the difference information and the low-resolution preset image. Therefore, the process of outputting high-resolution images is avoided, and the image quality is improved.
本公开实施例中提供的图像处理方法、图像处理装置、电子设备以及计算机可读存储介质中,通过第二图像中的目标像素点,以及第一图像中的目标像素点对应的参考像素点之间的差值信息,来对和第一图像分辨率相同的预设图像进行差值处理,以将预设图像转换为分辨率为第二图像的目标图像。由于不需要一直获取高分辨率的第二图像,因此可以避免高分辨率图像导致的噪声,通过低分辨率的预设图像以及差值信息合成目标图像,实现仅通过低分辨率的图像就能输出高分辨率图像的效果,降低了高分辨率导致的信噪比较低的问题,降低了图像噪声,能够提高成像效果,并且提高了图像质量。另一方面,由于不需要一直获取高分辨率的图像,根据第二图像中的目标像素点来确定与第一图像的参考像素点之间的差值信息,即可将低分辨率的预设图像转换为符合高分辨率的目标图像,减少了相关技术中由于持续输出高分辨率的图像所导致的高功耗的问题,降低了终端设备的功耗,提高了终端设备的性能和可靠性,也增加了适用性。In the image processing method, image processing device, electronic device, and computer-readable storage medium provided in the embodiments of the present disclosure, the target pixel in the second image and the reference pixel corresponding to the target pixel in the first image The difference information is used to perform difference processing on a preset image with the same resolution as the first image, so as to convert the preset image into a target image with a resolution of the second image. Since there is no need to obtain a high-resolution second image all the time, noise caused by high-resolution images can be avoided. The target image is synthesized through low-resolution preset images and difference information, so that only low-resolution images can be used. The effect of outputting high-resolution images reduces the problem of low signal-to-noise ratio caused by high resolution, reduces image noise, improves imaging effects, and improves image quality. On the other hand, since there is no need to always acquire high-resolution images, the difference information between the target pixel in the second image and the reference pixel in the first image can be determined, and the low-resolution preset The image is converted into a high-resolution target image, which reduces the problem of high power consumption caused by continuous output of high-resolution images in related technologies, reduces the power consumption of the terminal device, and improves the performance and reliability of the terminal device , It also increases applicability.
在上述系统架构的基础上,本公开实施例中提供了一种图像处理方法,可以应用于任何使用摄像头进行采集图像以及对图像进行融合的应用场景。参考图2中所示,该图像处理方法可以包括步骤S210至步骤S230,详细介绍如下:On the basis of the foregoing system architecture, an image processing method is provided in the embodiments of the present disclosure, which can be applied to any application scenario that uses a camera to collect images and merge images. Referring to FIG. 2, the image processing method may include step S210 to step S230, which are described in detail as follows:
在步骤S210中,获取第一图像和第二图像,所述第二图像的分辨率大于所述第一图像的分辨率。In step S210, a first image and a second image are acquired, and the resolution of the second image is greater than the resolution of the first image.
本公开实施例中,可通过多个摄像头来对场景以及场景中的待拍摄物体进行拍摄。 多个摄像头的数量可以为两个、三个或者是四个等等,此处不作限定。多个摄像头可以设置于一个终端设备中,终端设备例如可以为智能手机等可以拍照的电子设备等等,只要具有多个摄像头即可。多个摄像头中可以包括不同像素的摄像头,具体可以包括第一摄像头和第二摄像头等等,其中,第一摄像头可以为低像素的摄像头,第二摄像头可以为高像素的摄像头。为了便于区分,可以将第一摄像头拍摄得到的图像作为第一图像,将第二摄像头拍摄得到的图像作为第二图像。第一摄像头和第二摄像头的具体像素可以根据实际需要而确定,只要满足第一摄像头的像素低于第二摄像头即可,此处不作限定。例如,第一摄像头可以为1600万像素,第二摄像头可以为6400万像素或者是1亿像素等等,此处不作限定。第二摄像头在弱光场景下,其信噪比较低。信噪比是在图像信号处理系统中信号和噪声的比值,比值越大,代表噪声越小,效果越好。In the embodiments of the present disclosure, multiple cameras may be used to photograph the scene and the objects to be photographed in the scene. The number of the multiple cameras can be two, three, four, etc., which is not limited here. Multiple cameras may be provided in one terminal device. The terminal device may be, for example, an electronic device that can take pictures such as a smart phone, as long as it has multiple cameras. The multiple cameras may include cameras with different pixels, and may specifically include a first camera and a second camera, etc., where the first camera may be a low-pixel camera, and the second camera may be a high-pixel camera. To facilitate the distinction, the image captured by the first camera may be used as the first image, and the image captured by the second camera may be used as the second image. The specific pixels of the first camera and the second camera can be determined according to actual needs, as long as the pixels of the first camera are lower than the second camera, which is not limited here. For example, the first camera may be 16 million pixels, and the second camera may be 64 million pixels or 100 million pixels, etc., which is not limited here. The second camera has a low signal-to-noise ratio in a low-light scene. The signal-to-noise ratio is the ratio of signal to noise in the image signal processing system. The larger the ratio, the smaller the noise and the better the effect.
第一图像和第二图像可以是对同一场景拍摄后得到的,例如同时或者是先后分别拍摄第一图像和第二图像。第一图像和第二图像也可以是对不同场景拍摄后得到的,但是该不同场景应可以包括部分相同或相应的特定场景,例如不同场景中均包括天空,某一个人物等等。由于摄像头的像素不同,且像素是用来描述分辨率的,因此得到的第一图像和第二图像的分辨率是不同的。具体地,第一摄像头得到的第一图像的分辨率可以小于第二图像的分辨率。The first image and the second image may be obtained after shooting the same scene, for example, the first image and the second image are respectively shot at the same time or sequentially. The first image and the second image may also be obtained after shooting different scenes, but the different scenes may include part of the same or corresponding specific scenes, for example, different scenes include the sky, a certain person, and so on. Since the pixels of the camera are different, and the pixels are used to describe the resolution, the resolution of the first image and the second image obtained are different. Specifically, the resolution of the first image obtained by the first camera may be smaller than the resolution of the second image.
本公开实施例中,第一图像和第二图像均可以为采用终端设备中摄像头的任何模式拍摄的图像,例如可以为人像模式、专业模式等等,此处不做限定。第一图像和第二图像的格式可以为RAW(RAW Image Format)格式,RAW是未经处理、也未经压缩的格式,可以把RAW概念化为原始图像编码数据。第一图像和第二图像的格式也可以为YUV格式,YUV中的Y表示明亮度,也就是灰度值;而UV表示的则是色度,作用是描述影像颜色及饱和度,用于指定像素的颜色。本公开实施例中,对第一图像和第二图像的格式不作限定。In the embodiments of the present disclosure, both the first image and the second image may be images taken in any mode of the camera in the terminal device, for example, may be a portrait mode, a professional mode, etc., which are not limited here. The format of the first image and the second image may be RAW (RAW Image Format). RAW is an unprocessed and uncompressed format. RAW can be conceptualized as original image encoding data. The format of the first image and the second image can also be YUV format. Y in YUV represents brightness, which is gray value; while UV represents chromaticity, which is used to describe the color and saturation of the image, and is used to specify The color of the pixel. In the embodiments of the present disclosure, the formats of the first image and the second image are not limited.
需要说明的是,此处的第一图像和第二图像是用于确定不同摄像头之间的差别,因此第一图像和第二图像可为每个摄像头拍摄的部分帧图像,例如任意一帧图像。具体地,第一图像可以为第一摄像头采集的一帧图像数据,第二图像可为第二摄像头采集的一帧图像数据。在获取第一图像和第二图像之前,如果摄像头均未开启,则可以首先打开第一摄像头和第二摄像头以分别获取一帧图像作为第一图像和第二图像。It should be noted that the first image and the second image here are used to determine the difference between different cameras, so the first image and the second image can be part of the frame images taken by each camera, such as any frame of image . Specifically, the first image may be a frame of image data collected by the first camera, and the second image may be a frame of image data collected by the second camera. Before acquiring the first image and the second image, if the cameras are not turned on, the first camera and the second camera may be turned on first to acquire a frame of image as the first image and the second image.
在步骤S220中,确定所述第二图像中的目标像素点与所述第一图像中对应于所述目标像素点的参考像素点之间的差值信息。In step S220, the difference information between the target pixel in the second image and the reference pixel in the first image corresponding to the target pixel is determined.
本公开实施例中,目标像素点指的是第二图像中的一个像素点,例如可以将第二图像中的每一个像素点分别作为该目标像素点,以便于遍历整个第二图像。在确定目标像素点时,可以随机选择一个,也可以按照顺序依次选择,此处不作限定。第一图像中对应于所述目标像素点的参考像素点,指的是第一图像中与目标像素点对应邻域 中的像素点,目标像素点对应邻域为与该目标像素点相邻的区域范围,具体可以为位于目标像素点外侧的,到目标像素点距离相等或者是不等的区域范围的多个像素点。举例而言,参考像素点可以为4邻域、D邻域以及8邻域对应的像素点,参考像素点的数量可以为4个或者是相邻区域范围内的8个等等,且参考像素点的数量越多,得到的差值信息越准确。本公开实施例中,以参考像素点为4邻域的像素点为例进行说明。In the embodiments of the present disclosure, the target pixel refers to a pixel in the second image. For example, each pixel in the second image may be used as the target pixel, so as to traverse the entire second image. When determining the target pixel point, one can be selected randomly or selected in sequence, which is not limited here. The reference pixel point in the first image corresponding to the target pixel point refers to the pixel point in the neighborhood corresponding to the target pixel point in the first image, and the target pixel point corresponding neighborhood is adjacent to the target pixel point The area range may specifically be a plurality of pixels located outside the target pixel point and having an equal or unequal distance from the target pixel point in the area range. For example, reference pixels can be pixels corresponding to 4 neighborhoods, D neighborhoods, and 8 neighborhoods, and the number of reference pixels can be 4 or 8 within the range of adjacent areas, etc., and the reference pixel The more the number of points, the more accurate the difference information obtained. In the embodiment of the present disclosure, a pixel with a 4-neighborhood reference pixel is taken as an example for description.
差值信息指的是第二图像中的目标像素点的像素值与第一图像中的每一个参考像素点的像素值之间的像素偏离程度值或者是像素偏差。由于每一个像素点均可以作为目标像素点,因此差值信息可以表征整个第一图像与第二图像的像素值的偏差。The difference information refers to the pixel deviation value or pixel deviation between the pixel value of the target pixel in the second image and the pixel value of each reference pixel in the first image. Since each pixel can be used as a target pixel, the difference information can represent the deviation of the pixel value of the entire first image and the second image.
图3中示意性示出了确定差值信息的流程图,参考图3中所示,主要包括步骤S310至步骤S340,其中:Fig. 3 schematically shows a flow chart for determining the difference information, referring to Fig. 3, which mainly includes step S310 to step S340, in which:
在步骤S310中,将所述第二图像中的每一个分别作为所述目标像素点。例如,可以按照第二图像中像素点的排列顺序,依次将每个像素点作为目标像素点。也可以在第二图像中随机选择一个像素点作为目标像素点,直到处理完所有的像素点为止,此处不做限定。举例而言,可以将第二图像中的某个像素点f(x,y)作为目标像素点,其中x,y表示的是目标像素点的位置坐标,f(x,y)表示的是该目标像素点的像素值。In step S310, each of the second images is used as the target pixel. For example, according to the arrangement order of the pixels in the second image, each pixel can be used as the target pixel in turn. It is also possible to randomly select a pixel in the second image as the target pixel until all the pixels are processed, which is not limited here. For example, a certain pixel f (x, y) in the second image can be used as the target pixel, where x, y represent the position coordinates of the target pixel, and f (x, y) represents the The pixel value of the target pixel.
在步骤S320中,根据所述目标像素点的坐标在所述第一图像中确定与其对应的坐标,以确定所述第一图像中的所述参考像素点。In step S320, the coordinates corresponding to the target pixel are determined in the first image according to the coordinates of the target pixel to determine the reference pixel in the first image.
本公开实施例中,在确定目标像素点的坐标的基础上,可以按照目标像素点的坐标来确定第一图像中的参考像素点。具体地,可以按照目标像素点的坐标,将该坐标的相邻坐标确定为第一图像中与其对应的坐标,进而确定参考像素点的位置。例如,第二图像中的目标像素点为f(x,y),相邻4个像素点可以为位于目标像素点的上下左右的像素点,计算得到的与目标像素点的坐标对应的第一图像中的相邻4个像素点的位置的坐标可以为g(x,y),g(x,y+1),g(x+1,y),g(x+1,y+1)。需要说明的是,两个坐标中的x、y并不是表示同一坐标点,仅表示两幅图像中的坐标位置。在得到参考像素点的坐标之后,可以根据这些坐标,将位于该坐标处的像素点作为第一图像中的参考像素点。In the embodiments of the present disclosure, on the basis of determining the coordinates of the target pixel, the reference pixel in the first image may be determined according to the coordinates of the target pixel. Specifically, according to the coordinates of the target pixel point, the adjacent coordinates of the coordinate can be determined as the coordinate corresponding to it in the first image, and then the position of the reference pixel point can be determined. For example, the target pixel in the second image is f(x, y), and the adjacent 4 pixels can be pixels located at the top, bottom, left, and right of the target pixel. The calculated first pixel corresponds to the coordinates of the target pixel. The coordinates of the positions of the adjacent 4 pixels in the image can be g(x,y),g(x,y+1),g(x+1,y),g(x+1,y+1) . It should be noted that the x and y in the two coordinates do not represent the same coordinate point, but only represent the coordinate position in the two images. After the coordinates of the reference pixel point are obtained, the pixel point located at the coordinate can be used as the reference pixel point in the first image according to these coordinates.
在步骤S330中,获取所述目标像素点的像素值与所述参考像素点的像素值之间的差值系数。In step S330, the difference coefficient between the pixel value of the target pixel and the pixel value of the reference pixel is obtained.
本公开实施例中,在得到目标像素点之后,可以获取该目标像素点的像素值;与此同时也可以获取参考像素点的像素值。差值系数指的是每一个目标像素点与其对应的参考像素点的像素差值。具体可以为每一个目标像素点的像素值与每一个参考像素点的像素值之间的像素差值。In the embodiment of the present disclosure, after the target pixel is obtained, the pixel value of the target pixel can be obtained; at the same time, the pixel value of the reference pixel can also be obtained. The difference coefficient refers to the pixel difference between each target pixel and its corresponding reference pixel. Specifically, it may be the pixel difference between the pixel value of each target pixel and the pixel value of each reference pixel.
具体而言,可以采用双线性差值算法来计算。双线性差值是由两个变量的差值函数的线性插值扩展,其核心思想是在两个方向分别进行一次线性差值。双线性差值算法充分利用了源图像中虚拟点四周的四个真实存在的像素值来共同决定图像中的一个 像素值,因此缩放效果较好。Specifically, it can be calculated using a bilinear difference algorithm. The bilinear difference is a linear interpolation extension of the difference function of two variables, and its core idea is to perform a linear difference in two directions respectively. The bilinear difference algorithm makes full use of the four real pixel values around the virtual point in the source image to jointly determine a pixel value in the image, so the zoom effect is better.
基于此,可以分别根据多个方向,计算目标像素点的像素值与参考像素点的像素值在多个方向上的预设差值系数,以获取所述差值系数。其中,多个方向可以为X方向和Y方向,每一个方向均可以对应一个预设差值系数,且不同方向上的预设差值系数可以相同或不同,具体不作限定。对于X方向而言,根据参考像素点的X坐标、目标像素点的X坐标以及各自对应的像素值的组合来进行X方向的线性差值。对于Y方向而言,根据参考像素点的Y坐标、目标像素点的Y坐标以及X方向的线性差值的组合来进行Y方向的线性差值。在进行双线性差值时,可以先进行X方向线性差值,也可以先进行Y方向线性差值,此处不做限定。举例而言,可以采用双线性差值算法来对目标像素点和与其对应的参考像素点在X方向和Y方向分别进行线性差值,得到X方向上的预设差值系数α以及Y方向上的预设差值系数β。进一步地,可以将多个方向上的预设差值系数进行拼接得到目标像素点与参考像素点之间的差值系数,例如可以表示为(α,β)。Based on this, it is possible to calculate preset difference coefficients in multiple directions between the pixel value of the target pixel and the pixel value of the reference pixel according to multiple directions, so as to obtain the difference coefficient. The multiple directions may be the X direction and the Y direction, and each direction may correspond to a preset difference coefficient, and the preset difference coefficients in different directions may be the same or different, which is not specifically limited. For the X direction, the linear difference in the X direction is performed according to the combination of the X coordinate of the reference pixel, the X coordinate of the target pixel, and the respective corresponding pixel values. For the Y direction, the linear difference in the Y direction is performed according to the combination of the Y coordinate of the reference pixel, the Y coordinate of the target pixel, and the linear difference in the X direction. When performing the bilinear difference, the X-direction linear difference can be performed first, or the Y-direction linear difference can be performed first, which is not limited here. For example, a bilinear difference algorithm can be used to perform linear difference between the target pixel and its corresponding reference pixel in the X direction and the Y direction, respectively, to obtain the preset difference coefficient α in the X direction and the Y direction. The preset difference coefficient β on. Further, the preset difference coefficients in multiple directions may be spliced to obtain the difference coefficient between the target pixel and the reference pixel, which may be expressed as (α, β), for example.
在步骤S340中,根据所述差值系数生成所述差值信息。In step S340, the difference information is generated according to the difference coefficient.
本公开实施例中,在得到一个目标像素点的差值系数之后,可以按照相同的方式将第二图像中的每个像素点作为目标像素点,进而对第二图像中的每一个像素点与其对应的位于第一图像中的参考像素点之间进行差值计算,以得到针对于第二图像的每一个像素点的差值系数。进一步地,可以将每一个像素点的差值系数进行组合,生成一个差值信息,该差值信息中包含的差值系数的数量可以与第二图像中像素点的数量相同,且该差值信息可以通过一个差值系数表来表示。在目标像素点的坐标的基础上,该差值信息可以根据第二图像中每个像素点的位置对应记作w(x,y)。In the embodiment of the present disclosure, after the difference coefficient of a target pixel is obtained, each pixel in the second image can be used as the target pixel in the same way, and then each pixel in the second image can be compared with each pixel in the second image. A difference calculation is performed between corresponding reference pixels in the first image to obtain a difference coefficient for each pixel of the second image. Further, the difference coefficients of each pixel can be combined to generate a difference information. The number of difference coefficients contained in the difference information can be the same as the number of pixels in the second image, and the difference The information can be represented by a table of difference coefficients. On the basis of the coordinates of the target pixel, the difference information can be correspondingly recorded as w(x, y) according to the position of each pixel in the second image.
在步骤S230中,根据所述差值信息对符合所述第一图像的分辨率的预设图像进行差值处理,获取符合所述第二图像的分辨率的目标图像。In step S230, performing difference processing on a preset image conforming to the resolution of the first image according to the difference information, and obtaining a target image conforming to the resolution of the second image.
本公开实施例中,预设图像可以为与第一图像分辨率相同的任意图形,例如可以为某一个视频中除了第一图像之外的其他帧图像;也可以为连续拍摄的图像中除第一图像之外的其他帧图像。预设图像可以是在第一图像之后通过第一摄像头采集到。预设图像可以采用第一摄像头进行采集,因此预设图像的分辨率可以符合第一图像的分辨率,即低分辨率。目标图像指的是对预设图像进行像素值调节以及分辨率调节而得到的图像。目标图像的分辨率与预设图像不同,且目标图像的分辨率与第二图像的分辨率相同。因此,可以看作目标图像与通过第二摄像头而采集的图像的分辨率相同。In the embodiment of the present disclosure, the preset image can be any graphic with the same resolution as the first image, for example, it can be other frame images in a certain video except the first image; it can also be a continuously shot image except the first image. Frame images other than one image. The preset image may be collected by the first camera after the first image. The preset image may be collected by the first camera, so the resolution of the preset image may conform to the resolution of the first image, that is, low resolution. The target image refers to the image obtained by adjusting the pixel value and the resolution of the preset image. The resolution of the target image is different from the preset image, and the resolution of the target image is the same as the resolution of the second image. Therefore, it can be considered that the resolution of the target image is the same as that of the image captured by the second camera.
具体地,步骤S230的执行过程可以包括:根据差值信息对预设图像中的所有像素点的像素值进行逻辑操作,将所有像素点的像素值调整为符合第二图像的分辨率的像素值,以获取目标图像。本公开实施例中,在获取到第一图像和第二图像之间的差值信息后,可以将该差值信息与第一摄像头获取的预设图像进行融合,通过像素值之间的融合结果和转化结果将符合第一图像分辨率的预设图像转换为符合第二图像分辨率 的图像,从而将转化得到的图像作为目标图像。由于目标图像的分辨率与第二摄像头采集的第二图像的分辨率相同,因此可以用目标图像代替第二摄像头拍摄的图像。Specifically, the execution process of step S230 may include: performing a logical operation on the pixel values of all pixels in the preset image according to the difference information, and adjusting the pixel values of all pixels to match the resolution of the second image. To get the target image. In the embodiment of the present disclosure, after the difference information between the first image and the second image is obtained, the difference information can be fused with the preset image obtained by the first camera, and the result of the fusion between the pixel values And the conversion result converts the preset image that meets the resolution of the first image into an image that meets the resolution of the second image, thereby using the converted image as the target image. Since the resolution of the target image is the same as the resolution of the second image captured by the second camera, the target image can be used to replace the image captured by the second camera.
举例而言,得到差值系数表后,即可以根据第一图像与第二图像之间的差值系数表,结合分辨率符合第一图像的预设图像的像素点的像素值,来计算得到分辨率符合第二图像的高清的目标图像中像素点的像素值,计算公式可以如公式(1)所示:For example, after the difference coefficient table is obtained, it can be calculated according to the difference coefficient table between the first image and the second image, combined with the pixel values of the pixels of the preset image whose resolution matches the first image The resolution is consistent with the pixel value of the pixel in the high-definition target image of the second image, and the calculation formula may be as shown in formula (1):
f(x,y)=w(x,y)★{g(x,y),g(x,y+1),g(x+1,y),g(x+1,y+1)}      公式(1)f(x,y)=w(x,y)★{g(x,y),g(x,y+1),g(x+1,y),g(x+1,y+1) } Formula 1)
其中,★符号仅表示采用双线性差值的方式进行差值。Among them, the symbol ★ only means that the difference is performed by the bilinear difference method.
在对像素点进行差值处理的过程中,具体是对像素点的像素值进行转化。对于低分辨率的预设图像而言,可将预设图像中每一帧的多个邻域像素点的像素值,通过该差值系数表而转换为高分辨率的一个像素点的像素值。如此重复,直至对预设图像中所有帧的所有像素点的像素值均完成转换融合为止,以根据第一摄像头采集的低分辨率的预设图像中所有帧的所有像素点的像素值得到对应的高分辨率的像素点的像素值,从而生成目标图像。In the process of performing difference processing on pixels, specifically, the pixel values of the pixels are converted. For a low-resolution preset image, the pixel value of multiple neighborhood pixels in each frame of the preset image can be converted into a high-resolution pixel value through the difference coefficient table . Repeat this until the pixel values of all pixels in all frames in the preset image are converted and fused, so as to obtain the corresponding pixel values according to the pixel values of all pixels in all frames in the low-resolution preset image collected by the first camera. The pixel value of the high-resolution pixel point, thereby generating the target image.
本公开实施例提供的技术方案中,由于目标图像基本可以采取后台采集与合成的方式而得到,在拍摄过程中采用的是第一摄像头进行持续的拍摄,所以能够大幅降低第二摄像头拍摄时的功耗。通过第一摄像头采集的预设图像与差值信息的融合,能够输出分辨率与第二图像一致的目标图像,提高了图像质量。同时在弱光环境下,由于采用的是第一摄像头进行拍摄,高信噪比对影像效果会带来大幅的提升,在得到与第二摄像头拍摄的图像效果一致的基础上,提高了图像质量。In the technical solution provided by the embodiments of the present disclosure, since the target image can basically be obtained by background collection and synthesis, the first camera is used for continuous shooting during the shooting process, so the second camera can greatly reduce the shooting time. Power consumption. Through the fusion of the preset image collected by the first camera and the difference information, the target image with the same resolution as the second image can be output, which improves the image quality. At the same time, in a low light environment, because the first camera is used for shooting, the high signal-to-noise ratio will greatly improve the image effect. On the basis of obtaining the same image effect as the second camera, the image quality is improved .
需要补充的是,采集完第一图像和第二图像后,可以关闭第二摄像头,仅采用低像素的第一摄像头进行拍摄,并采用计算的第一图像和第二图像之间的差值信息进行图像融合,以输出与第二摄像头拍摄的分辨率相同的图像。由于第二摄像头只是用于采集少量图像以便于计算差值信息和更新差值信息,因此在采集完一帧第二图像后,可以关闭第二摄像头,以减少高像素摄像头的使用时间,从而可以降低终端设备的功耗,也避免了终端设备发热的风险,提高了可靠性。并且可以提升拍摄的图像的质量和画质,通过低功耗得到高质量的效果,提高了用户体验。What needs to be added is that after the first image and the second image are collected, the second camera can be turned off, only the low-pixel first camera is used for shooting, and the calculated difference information between the first image and the second image is used Perform image fusion to output an image with the same resolution as that taken by the second camera. Since the second camera is only used to collect a small number of images in order to calculate the difference information and update the difference information, after collecting a frame of the second image, the second camera can be turned off to reduce the use time of the high-pixel camera. The power consumption of the terminal equipment is reduced, the risk of heat generation of the terminal equipment is also avoided, and the reliability is improved. And it can improve the quality and image quality of the captured images, obtain high-quality effects through low power consumption, and improve the user experience.
进一步地,为了保证结果的准确性,可以通过预设周期获取第二辅助图像,并根据获取的第二辅助图像对差值系数进行更新,以根据更新后的差值系数获取所述差值信息。预设周期例如可以为任意合适的时间间隔,例如30秒或者是2分钟等等。此处的第二辅助图像可以为第二摄像头重新采集的其他帧的图像,第二辅助图像可以与第二图像不同,但是第二辅助图像的分辨率和第二图像的分辨率相同。例如,第二辅助图像可以为一帧图像或者是多帧图像,采集一帧图像还是多帧图像具体可以根据参考信息而确定。此处的参考信息可以为终端设备的内存情况和/或CPU运行情况。如果参考信息满足更新条件,则采集多帧第二辅助图像。如果不满足,则只采集一帧第二辅助图像。具体地,内存情况可以用剩余内存空间来描述,可以提供一个第一阈值来对 内存情况进行评估。CPU运行情况可以用CPU运行速度来表示,可以提供一个第二阈值来对CPU运行情况来进行评估。在此基础上,可以在内存情况大于第一阈值、或者是只在CPU运行情况大于第二阈值、或者是在内存情况大于第一阈值且CPU运行情况大于第二阈值等情况下,确定参考信息满足更新条件,以采集多帧第二辅助图像。否则,只采集一帧第二辅助图像。通过预设周期采集第二辅助图像,进而进行差值信息的实时校正,能使得确定的差值信息更准确。Further, in order to ensure the accuracy of the result, the second auxiliary image may be acquired through a preset period, and the difference coefficient may be updated according to the acquired second auxiliary image, so as to obtain the difference information according to the updated difference coefficient . The preset period can be, for example, any suitable time interval, such as 30 seconds or 2 minutes, and so on. The second auxiliary image here may be an image of another frame re-acquired by the second camera. The second auxiliary image may be different from the second image, but the resolution of the second auxiliary image and the resolution of the second image are the same. For example, the second auxiliary image may be one frame of image or multiple frames of image, and whether to collect one frame of image or multiple frames of image may be specifically determined according to the reference information. The reference information here may be the memory status of the terminal device and/or the CPU running status. If the reference information meets the update condition, multiple frames of second auxiliary images are collected. If it is not satisfied, only one frame of the second auxiliary image is collected. Specifically, the memory situation can be described by the remaining memory space, and a first threshold can be provided to evaluate the memory situation. The CPU operating condition can be represented by the CPU operating speed, and a second threshold can be provided to evaluate the CPU operating condition. On this basis, the reference information can be determined when the memory condition is greater than the first threshold, or only when the CPU operating condition is greater than the second threshold, or when the memory condition is greater than the first threshold and the CPU operating condition is greater than the second threshold, etc. Meet the update condition to collect multiple frames of second auxiliary images. Otherwise, only one frame of the second auxiliary image is collected. Collecting the second auxiliary image at a preset period and then performing real-time correction of the difference information can make the determined difference information more accurate.
在获取到至少一帧第二辅助图像之后,可以根据至少一帧第二辅助图像重新确定目标像素点,并根据重新确定的目标像素点以及与其对应的参考像素点对差值系数进行更新。其中,对于每一帧第二辅助图像而言,均可以重新确定一个目标像素点。在确定第二辅助图像后,可以从第一摄像头采集的图像中选取对应场景的图像作为第一辅助图像。进而根据步骤S210至步骤S220中的方法确定该目标像素点的像素值,与该目标像素点对应的第一辅助图像中的参考像素点的像素值在x方向和y方向上的预设差值系数组成的差值系数。第一辅助图像中的参考像素点依然可以为多个,例如4个或者是8个等等。进一步地,可以遍历第二辅助图像中的所有像素点,以得到对应于该第二辅助图像的差值信息,并将差值信息用于合成目标图像。After at least one frame of the second auxiliary image is acquired, the target pixel can be re-determined according to the at least one frame of the second auxiliary image, and the difference coefficient can be updated according to the re-determined target pixel and the reference pixel corresponding to the re-determined target pixel. Among them, for each frame of the second auxiliary image, a target pixel can be re-determined. After the second auxiliary image is determined, an image corresponding to the scene can be selected from the images collected by the first camera as the first auxiliary image. Then determine the pixel value of the target pixel according to the method in step S210 to step S220, and the preset difference between the pixel value of the reference pixel in the first auxiliary image corresponding to the target pixel in the x direction and the y direction The difference coefficient of the coefficient composition. There may still be multiple reference pixels in the first auxiliary image, for example, 4 or 8, and so on. Further, it is possible to traverse all pixels in the second auxiliary image to obtain difference information corresponding to the second auxiliary image, and use the difference information to synthesize the target image.
图4中示意性示出了更新差值信息的流程图,具体包括步骤S410以及步骤S420,其中:Fig. 4 schematically shows a flowchart for updating the difference information, which specifically includes step S410 and step S420, where:
在步骤S410中,重新确定每帧第二辅助图像的目标像素点,根据每帧第二辅助图像的重新确定的目标像素点以及与其对应的参考像素点确定每帧第二辅助图像的差值系数。In step S410, the target pixel of each frame of the second auxiliary image is re-determined, and the difference coefficient of each frame of the second auxiliary image is determined according to the re-determined target pixel of each second auxiliary image and the reference pixel corresponding to it. .
本公开实施例中,首先可以判断第二辅助图像是否为一帧,具体可以根据参考信息而确定。如果第二辅助图像为一帧,则直接根据该第二辅助图像中所有像素点在多个方向组成的差值系数对原本的差值系数进行更新。如果第二辅助图像为多帧,则可以重新确定每帧第二辅助图像的目标像素点,在多个方向根据每帧第二辅助图像的目标像素点以及与其对应的参考像素点确定符合每帧第二辅助图像的差值系数。此处,差值系数的数量可以根据第二辅助图像的帧数以及每帧的像素点的数量而确定。符合每帧第二辅助图像的差值系数可以为每帧第二辅助图像中每个目标像素点的像素值与其对应的参考像素点的像素值之间的像素偏差。In the embodiment of the present disclosure, firstly, it can be judged whether the second auxiliary image is a frame, which can be specifically determined according to the reference information. If the second auxiliary image is a frame, the original difference coefficients are directly updated according to the difference coefficients composed of all pixels in the second auxiliary image in multiple directions. If the second auxiliary image is multiple frames, the target pixel of each second auxiliary image can be re-determined, and in multiple directions, the target pixel of each second auxiliary image and the corresponding reference pixel are determined to conform to each frame The difference coefficient of the second auxiliary image. Here, the number of difference coefficients may be determined according to the number of frames of the second auxiliary image and the number of pixels in each frame. The difference coefficient conforming to the second auxiliary image of each frame may be the pixel deviation between the pixel value of each target pixel in each frame of the second auxiliary image and the pixel value of the corresponding reference pixel.
在步骤S420中,对所述每帧第二辅助图像的差值系数进行平均处理得到平均差值系数,并根据所述平均差值系数更新所述差值信息。In step S420, the difference coefficients of each frame of the second auxiliary image are averaged to obtain an average difference coefficient, and the difference information is updated according to the average difference coefficient.
本公开实施例中,在得到每帧第二辅助图像的差值系数后,为了提高准确性,可以对所有的差值系数进行平均处理,以得到平均差值系数。进一步地,可以将平均差值系数作为多帧第二辅助图像中每一个像素点的差值系数,以根据多帧第二辅助图像中每一个像素点的差值系数更新原本的第二图像中目标像素点对应的差值系数,实现差值系数的动态更新。进而根据每一个像素点的差值系数的组合来更新整个差值信息。 需要说明的是,在得到更新后的差值系数后,可以根据更新后的差值系数来对原本的差值信息进行更新,以得到多帧第二辅助图像对应的所有像素点的差值系数组成的差值信息w(x,y)。即,先计算各帧第二辅助图像的一个像素点的差值系数并进行平均以及组合,从而更新差值信息。除此之外,也可以在计算出各帧第二辅助图像的所有像素点的差值系数之后再进行平均处理,从而更新差值信息。通过选取多帧第二辅助图像以及选取多个邻域像素点来对差值系数进行校正更新,可以得到更准确的差值信息,进而根据准确的差值信息使得输出的目标图像的质量更高,提高了图像效果。In the embodiment of the present disclosure, after the difference coefficient of each frame of the second auxiliary image is obtained, in order to improve the accuracy, all the difference coefficients may be averaged to obtain the average difference coefficient. Further, the average difference coefficient may be used as the difference coefficient of each pixel in the second auxiliary image of multiple frames, so as to update the original second image according to the difference coefficient of each pixel in the second auxiliary image of the multiple frames. The difference coefficient corresponding to the target pixel point realizes the dynamic update of the difference coefficient. Furthermore, the entire difference information is updated according to the combination of the difference coefficient of each pixel. It should be noted that after the updated difference coefficient is obtained, the original difference information can be updated according to the updated difference coefficient to obtain the difference coefficients of all pixels corresponding to the second auxiliary image of multiple frames The difference information composed of w(x,y). That is, the difference coefficient of one pixel of the second auxiliary image of each frame is first calculated, averaged and combined, so as to update the difference information. In addition, it is also possible to perform averaging processing after calculating the difference coefficients of all pixels of the second auxiliary image of each frame, so as to update the difference information. By selecting multiple frames of second auxiliary images and selecting multiple neighborhood pixels to correct and update the difference coefficients, more accurate difference information can be obtained, and the quality of the output target image can be made higher based on the accurate difference information , Improve the image effect.
图5中示意性示出了图像处理的整个流程图,参考图5中所示,主要包括以下步骤:Fig. 5 schematically shows the entire flow chart of image processing, referring to Fig. 5, it mainly includes the following steps:
在步骤S510中,获取一帧第一图像,该第一图像中某一个像素点的像素值为g(x,y)。In step S510, a frame of a first image is acquired, and the pixel value of a certain pixel in the first image is g(x, y).
在步骤S520中,获取一帧第二图像,该第二图像中某一个像素点的像素值为f(x,y)。In step S520, a frame of a second image is acquired, and the pixel value of a certain pixel in the second image is f(x, y).
在步骤S530中,得到每个像素点的差值系数,形成差值信息,即差值系数表w(x,y)。In step S530, the difference coefficient of each pixel is obtained to form difference information, that is, the difference coefficient table w(x, y).
在步骤S540中,通过双线性差值算法得到高分辨率的目标图像。In step S540, a high-resolution target image is obtained through a bilinear difference algorithm.
在步骤S550中,目标图像持续输出。In step S550, the target image is continuously output.
图5中的技术方案,通过计算低分辨率与高分辨率图像每个像素点的差值系数,后期通过差值系数进行差值,来达到仅通过低像素的摄像头拍摄就能输出高分辨率视频图像的效果。由于采用的是低像素的摄像头进行拍摄,可以提高信噪比,因此可以对图像效果会带来大幅的提升。由于是通过低像素的摄像头拍摄低分辨率的预设图像,进而将预设图像与差值信息进行融合得到高分辨率的目标图像,以将合成的目标图像作为高像素摄像头采集的图像。在持续输出图像和视频的过程中,能够通过融合操作避免高像素摄像头一直连续拍摄的状态,能够减少高像素摄像头的使用时间,进而减少功耗,并且避免了高像素摄像头导致的信噪比较低的问题,降低了图像的噪声,提高了图像质量。The technical solution in Figure 5 calculates the difference coefficient of each pixel of the low-resolution and high-resolution images, and then performs the difference through the difference coefficient in the later stage to achieve high-resolution output only by shooting with a low-pixel camera. The effect of the video image. Since a low-pixel camera is used for shooting, the signal-to-noise ratio can be improved, so the image effect can be greatly improved. Since a low-resolution preset image is captured by a low-pixel camera, the preset image and difference information are then fused to obtain a high-resolution target image, and the synthesized target image is used as an image collected by the high-pixel camera. In the process of continuously outputting images and videos, the fusion operation can avoid the continuous shooting of high-pixel cameras, which can reduce the use time of high-pixel cameras, thereby reducing power consumption, and avoiding the signal-to-noise comparison caused by high-pixel cameras The low problem reduces the noise of the image and improves the image quality.
本公开实施例中,提供了一种图像处理装置,参考图6中所示,该图像处理装置600可以包括:图像获取模块601,用于获取第一图像和第二图像,所述第二图像的分辨率大于所述第一图像的分辨率;差值信息确定模块602,用于确定所述第二图像中的目标像素点以及所述第一图像中对应于所述目标像素点的参考像素点之间的差值信息;目标图像生成模块603,用于根据所述差值信息对符合所述第一图像的分辨率的预设图像进行差值处理,获取符合第二图像的分辨率的目标图像。In an embodiment of the present disclosure, an image processing device is provided. With reference to FIG. 6, the image processing device 600 may include: an image acquisition module 601 for acquiring a first image and a second image. The resolution of is greater than the resolution of the first image; the difference information determination module 602 is used to determine the target pixel in the second image and the reference pixel in the first image corresponding to the target pixel The difference information between the points; the target image generation module 603 is configured to perform difference processing on a preset image that conforms to the resolution of the first image according to the difference information, and obtain a resolution that conforms to the resolution of the second image Target image.
在本公开的一种示例性实施例中,差值信息确定模块包括:目标像素点指定模块,用于将所述第二图像中的每一个像素点分别作为所述目标像素点;参考像素点确定模块,用于根据所述目标像素点的坐标在所述第一图像中确定与其对应的坐标,以确定所述第一图像中的所述参考像素点;差值系数确定模块,用于获取所述目标像素点的像素值与所述参考像素点的像素值之间的差值系数;差值系数组合模块,用于根据所述差值系数生成所述差值信息。In an exemplary embodiment of the present disclosure, the difference information determination module includes: a target pixel designation module, configured to use each pixel in the second image as the target pixel; and a reference pixel The determining module is configured to determine the corresponding coordinates in the first image according to the coordinates of the target pixel to determine the reference pixel in the first image; the difference coefficient determining module is configured to obtain The difference coefficient between the pixel value of the target pixel and the pixel value of the reference pixel; a difference coefficient combination module for generating the difference information according to the difference coefficient.
在本公开的一种示例性实施例中,差值系数确定模块被配置为:计算所述目标像素点的像素值与所述参考像素点的像素值在多个方向上的预设差值系数,以获取所述差值系数。In an exemplary embodiment of the present disclosure, the difference coefficient determination module is configured to: calculate preset difference coefficients between the pixel value of the target pixel and the pixel value of the reference pixel in multiple directions , To obtain the difference coefficient.
在本公开的一种示例性实施例中,目标图像生成模块被配置为:根据所述差值信息对所述预设图像中的所有像素点的像素值进行逻辑操作,将所述所有像素点的像素值调整为符合第二图像的分辨率的像素值,以获取所述目标图像。In an exemplary embodiment of the present disclosure, the target image generation module is configured to: perform a logical operation on the pixel values of all pixels in the preset image according to the difference information, and then combine all the pixels The pixel value of is adjusted to a pixel value that meets the resolution of the second image to obtain the target image.
在本公开的一种示例性实施例中,所述装置还包括:差值信息更新模块,用于通过预设周期获取第二辅助图像,并根据所述第二辅助图像对所述差值系数进行更新,以根据更新后的差值系数确定所述差值信息。In an exemplary embodiment of the present disclosure, the device further includes: a difference information update module, configured to obtain a second auxiliary image through a preset period, and compare the difference coefficient according to the second auxiliary image The update is performed to determine the difference information according to the updated difference coefficient.
在本公开的一种示例性实施例中,差值信息更新模块包括:辅助图像获取模块,用于根据参考信息获取至少一帧所述第二辅助图像;差值系数更新模块,用于根据所述至少一帧第二辅助图像重新确定目标像素点,根据重新确定的目标像素点以及与其对应的参考像素点对差值系数进行更新,并根据更新后的差值系数确定所述差值信息。In an exemplary embodiment of the present disclosure, the difference information update module includes: an auxiliary image acquisition module, configured to acquire at least one frame of the second auxiliary image according to the reference information; The at least one frame of second auxiliary image re-determines the target pixel, updates the difference coefficient according to the re-determined target pixel and the corresponding reference pixel, and determines the difference information according to the updated difference coefficient.
在本公开的一种示例性实施例中,若所述第二辅助图像为多帧,差值系数更新模块被配置为:重新确定每帧第二辅助图像的目标像素点,在所述多个方向根据每帧第二辅助图像的重新确定的目标像素点以及与其对应的参考像素点确定每帧第二辅助图像的差值系数;对所述每帧第二辅助图像的差值系数进行平均处理得到平均差值系数,并根据所述平均差值系数更新所述差值信息。In an exemplary embodiment of the present disclosure, if the second auxiliary image is of multiple frames, the difference coefficient update module is configured to: re-determine the target pixel of each frame of the second auxiliary image. The direction determines the difference coefficient of each frame of the second auxiliary image according to the re-determined target pixel point of each frame of the second auxiliary image and the corresponding reference pixel point; the difference coefficient of each frame of the second auxiliary image is averaged Obtain an average difference coefficient, and update the difference information according to the average difference coefficient.
需要说明的是,上述图像处理装置中各模块的具体细节已经在对应的图像处理方法中进行了详细描述,因此此处不再赘述。It should be noted that the specific details of each module in the above-mentioned image processing device have been described in detail in the corresponding image processing method, and therefore will not be repeated here.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
此外,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。In addition, although the various steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that these steps must be performed in the specific order, or that all the steps shown must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution, etc.
在本公开的实施例中,还提供了一种能够实现上述方法的电子设备。In the embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
所属技术领域的技术人员能够理解,本公开的各个方面可以实现为系统、方法或程序产品。因此,本公开的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。Those skilled in the art can understand that various aspects of the present disclosure can be implemented as a system, a method, or a program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "Circuit", "Module" or "System".
下面参照图7来描述根据本公开的这种实施方式的电子设备700。图7显示的电子设备700仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。The electronic device 700 according to this embodiment of the present disclosure will be described below with reference to FIG. 7. The electronic device 700 shown in FIG. 7 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
如图7所示,电子设备700以通用计算设备的形式表现。电子设备700的组件可以包括但不限于:上述至少一个处理单元710、上述至少一个存储单元720、连接不同系统组件(包括存储单元720和处理单元710)的总线730、显示单元740以及图像传感器770,图像传感器770用于获取相应分辨率的图像。As shown in FIG. 7, the electronic device 700 is represented in the form of a general-purpose computing device. The components of the electronic device 700 may include, but are not limited to: the aforementioned at least one processing unit 710, the aforementioned at least one storage unit 720, a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710), a display unit 740, and an image sensor 770 The image sensor 770 is used to obtain images of corresponding resolutions.
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元710执行,使得所述处理单元710执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施方式的步骤。例如,所述处理单元710可以执行如图2中所示的步骤:在步骤S210中,获取第一图像和第二图像,所述第二图像的分辨率大于所述第一图像的分辨率;在步骤S220中,确定所述第二图像中的目标像素点与所述第一图像中对应于所述目标像素点的参考像素点之间的差值信息;在步骤S230中,根据所述差值信息对符合所述第一图像的分辨率的预设图像进行差值处理,获取符合所述第二图像的分辨率的目标图像。Wherein, the storage unit stores program code, and the program code can be executed by the processing unit 710, so that the processing unit 710 executes the various exemplary methods described in the "Exemplary Method" section of this specification. Steps of implementation. For example, the processing unit 710 may perform the steps shown in FIG. 2: in step S210, a first image and a second image are acquired, where the resolution of the second image is greater than the resolution of the first image; In step S220, determine the difference information between the target pixel in the second image and the reference pixel in the first image corresponding to the target pixel; in step S230, according to the difference The value information performs difference processing on a preset image that meets the resolution of the first image, and obtains a target image that meets the resolution of the second image.
存储单元720可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)7201和/或高速缓存存储单元7202,还可以进一步包括只读存储单元(ROM)7203。The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 7201 and/or a cache storage unit 7202, and may further include a read-only storage unit (ROM) 7203.
存储单元720还可以包括具有一组(至少一个)程序模块7205的程序/实用工具7204,这样的程序模块7205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。The storage unit 720 may also include a program/utility tool 7204 having a set of (at least one) program module 7205. Such program module 7205 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
总线730可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速接口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。The bus 730 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration interface, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
电子设备700也可以与一个或多个外部设备800(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备700交互的设备通信,和/或与使得该电子设备700能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口750进行。并且,电子设备700还可以通过网络适配器760与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器760通过总线730与电子设备700的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备700使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The electronic device 700 may also communicate with one or more external devices 800 (such as keyboards, pointing devices, Bluetooth devices, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 700, and/or communicate with Any device (eg, router, modem, etc.) that enables the electronic device 700 to communicate with one or more other computing devices. This communication can be performed through an input/output (I/O) interface 750. In addition, the electronic device 700 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 760. As shown in the figure, the network adapter 760 communicates with other modules of the electronic device 700 through the bus 730. It should be understood that although not shown in the figure, other hardware and/or software modules can be used in conjunction with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
在本公开的实施例中,还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本公开的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施方式的步骤。In the embodiments of the present disclosure, a computer-readable storage medium is also provided, on which is stored a program product capable of implementing the above-mentioned method in this specification. In some possible implementation manners, various aspects of the present disclosure may also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to enable the The terminal device executes the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification.
根据本公开的实施方式的用于实现上述方法的程序产品,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本公开的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The program product for implementing the above method according to the embodiment of the present disclosure may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device.
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The program product can use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。The computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。The program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言的任意组合来编写用于执行本公开操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。The program code used to perform the operations of the present disclosure can be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural styles. Programming language-such as "C" language or similar programming language. The program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on. In the case of a remote computing device, the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (for example, using Internet service providers). Business to connect via the Internet).
此外,上述附图仅是根据本公开实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。In addition, the above-mentioned drawings are merely schematic illustrations of the processing included in the method according to the embodiments of the present disclosure, and are not intended for limitation. It is easy to understand that the processing shown in the above drawings does not indicate or limit the time sequence of these processings. In addition, it is easy to understand that these processes can be executed synchronously or asynchronously in multiple modules, for example.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其他实施例。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。Those skilled in the art will easily think of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptive changes of the present disclosure. These variations, uses, or adaptive changes follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field that are not disclosed in the present disclosure. . The description and the embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.

Claims (20)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, characterized in that it comprises:
    获取第一图像和第二图像,所述第二图像的分辨率大于所述第一图像的分辨率;Acquiring a first image and a second image, the resolution of the second image is greater than the resolution of the first image;
    确定所述第二图像中的目标像素点与所述第一图像中对应于所述目标像素点的参考像素点之间的差值信息;Determining difference information between a target pixel in the second image and a reference pixel in the first image corresponding to the target pixel;
    根据所述差值信息对符合所述第一图像的分辨率的预设图像进行差值处理,获取符合所述第二图像的分辨率的目标图像。Performing difference processing on a preset image that conforms to the resolution of the first image according to the difference information, and obtains a target image that conforms to the resolution of the second image.
  2. 根据权利要求1所述的图像处理方法,其特征在于,确定所述第二图像中的目标像素点与所述第一图像中对应于所述目标像素点的参考像素点之间的差值信息包括:The image processing method according to claim 1, wherein the difference information between a target pixel in the second image and a reference pixel in the first image corresponding to the target pixel is determined include:
    将所述第二图像中的每一个像素点分别作为所述目标像素点;Use each pixel in the second image as the target pixel;
    根据所述目标像素点的坐标在所述第一图像中确定与其对应的坐标,以确定所述第一图像中的所述参考像素点;Determining the corresponding coordinates in the first image according to the coordinates of the target pixel to determine the reference pixel in the first image;
    获取所述目标像素点的像素值与所述参考像素点的像素值之间的差值系数;Obtaining a difference coefficient between the pixel value of the target pixel and the pixel value of the reference pixel;
    根据所述差值系数生成所述差值信息。The difference information is generated according to the difference coefficient.
  3. 根据权利要求2所述的图像处理方法,其特征在于,获取所述目标像素点的像素值与所述参考像素点的像素值之间的差值系数包括:The image processing method according to claim 2, wherein obtaining the difference coefficient between the pixel value of the target pixel and the pixel value of the reference pixel comprises:
    计算所述目标像素点的像素值与所述参考像素点的像素值在多个方向上的预设差值系数,以获取所述差值系数。Calculate preset difference coefficients in multiple directions between the pixel value of the target pixel and the pixel value of the reference pixel to obtain the difference coefficient.
  4. 根据权利要求3所述的图像处理方法,其特征在于,计算所述目标像素点的像素值与所述参考像素点的像素值在多个方向上的预设差值系数,以获取所述差值系数包括:The image processing method according to claim 3, wherein a preset difference coefficient in multiple directions between the pixel value of the target pixel and the pixel value of the reference pixel is calculated to obtain the difference Value factors include:
    将所述多个方向上的所述预设差值系数进行拼接,得到所述目标像素点与所述参考像素点之间的所述差值系数。The preset difference coefficients in the multiple directions are spliced to obtain the difference coefficient between the target pixel and the reference pixel.
  5. 根据权利要求2所述的图像处理方法,其特征在于,根据所述差值系数生成所述差值信息,包括:The image processing method according to claim 2, wherein generating the difference information according to the difference coefficient comprises:
    将每个像素点的差值系数进行组合,生成所述差值信息。The difference coefficient of each pixel is combined to generate the difference information.
  6. 根据权利要求1所述的图像处理方法,其特征在于,根据所述差值信息对符合所述第一图像的分辨率的预设图像进行差值处理,获取符合所述第二图像的分辨率的目标图像包括:The image processing method according to claim 1, wherein, according to the difference information, a preset image conforming to the resolution of the first image is subjected to difference processing to obtain a resolution conforming to the second image The target images include:
    根据所述差值信息对所述预设图像中的所有像素点的像素值进行逻辑操作,将所述所有像素点的像素值调整为符合第二图像的分辨率的像素值,以获取所述目标图像。Perform a logical operation on the pixel values of all pixels in the preset image according to the difference information, and adjust the pixel values of all pixels to a pixel value that meets the resolution of the second image to obtain the Target image.
  7. 根据权利要求6所述的图像处理方法,其特征在于,根据所述差值信息对所述预设图像中的所有像素点的像素值进行逻辑操作,将所述所有像素点的像素值调整为符合第二图像的分辨率的像素值,以获取所述目标图像包括:The image processing method according to claim 6, wherein the pixel values of all pixels in the preset image are logically operated according to the difference information, and the pixel values of all pixels are adjusted to The pixel values conforming to the resolution of the second image to obtain the target image include:
    将所述差值信息与所述预设图像进行融合,通过像素值之间的融合结果和转化结 果,将符合第一图像分辨率的预设图像转换为符合第二图像分辨率的图像,以获取所述目标图像。The difference information is fused with the preset image, and the preset image that meets the resolution of the first image is converted into an image that meets the resolution of the second image through the fusion result and the conversion result between pixel values. Obtain the target image.
  8. 根据权利要求2所述的图像处理方法,其特征在于,所述方法还包括:The image processing method according to claim 2, wherein the method further comprises:
    通过预设周期获取第二辅助图像,并根据所述第二辅助图像对所述差值系数进行更新,以根据更新后的差值系数确定所述差值信息。The second auxiliary image is acquired through a preset period, and the difference coefficient is updated according to the second auxiliary image, so as to determine the difference information according to the updated difference coefficient.
  9. 根据权利要求8所述的图像处理方法,其特征在于,通过预设周期获取第二辅助图像,并根据所述第二辅助图像对所述差值系数进行更新,以根据更新后的差值系数确定所述差值信息包括:8. The image processing method according to claim 8, wherein the second auxiliary image is acquired through a preset period, and the difference coefficient is updated according to the second auxiliary image, so that the difference coefficient is updated according to the updated difference coefficient. Determining the difference information includes:
    根据参考信息获取至少一帧所述第二辅助图像;Acquiring at least one frame of the second auxiliary image according to the reference information;
    根据所述至少一帧第二辅助图像重新确定目标像素点,根据重新确定的目标像素点以及与其对应的参考像素点对差值系数进行更新,并根据更新后的差值系数确定所述差值信息。The target pixel is re-determined according to the at least one frame of the second auxiliary image, the difference coefficient is updated according to the re-determined target pixel and the corresponding reference pixel, and the difference is determined according to the updated difference coefficient information.
  10. 根据权利要求9所述的图像处理方法,其特征在于,根据参考信息获取至少一帧所述第二辅助图像包括:The image processing method according to claim 9, wherein acquiring at least one frame of the second auxiliary image according to reference information comprises:
    如果所述参考信息满足更新条件,则采集多帧第二辅助图像;If the reference information satisfies the update condition, collecting multiple frames of second auxiliary images;
    如果所述参考信息不满足更新条件,则采集一帧第二辅助图像。If the reference information does not satisfy the update condition, a frame of second auxiliary image is collected.
  11. 根据权利要求9所述的图像处理方法,其特征在于,若所述第二辅助图像为一帧,根据重新确定的目标像素点以及与其对应的参考像素点对差值系数进行更新,并根据更新后的差值系数确定所述差值信息包括:The image processing method according to claim 9, wherein if the second auxiliary image is a frame, the difference coefficient is updated according to the re-determined target pixel point and the reference pixel point corresponding thereto, and the difference coefficient is updated according to the update The difference coefficient after determining the difference information includes:
    根据该第二辅助图像中所有像素点在多个方向组成的差值系数对原本的差值系数进行更新,并根据更新后的差值系数确定所述差值信息。The original difference coefficient is updated according to the difference coefficients composed of all pixels in the second auxiliary image in multiple directions, and the difference information is determined according to the updated difference coefficient.
  12. 根据权利要求9所述的图像处理方法,其特征在于,若所述第二辅助图像为多帧,根据重新确定的目标像素点以及与其对应的参考像素点对差值系数进行更新,并根据更新后的差值系数确定所述差值信息包括:The image processing method according to claim 9, wherein if the second auxiliary image is a multi-frame, the difference coefficient is updated according to the re-determined target pixel and the reference pixel corresponding to it, and the difference coefficient is updated according to the update The difference coefficient after determining the difference information includes:
    重新确定每帧第二辅助图像的目标像素点,根据每帧第二辅助图像的重新确定的目标像素点以及与其对应的参考像素点确定每帧第二辅助图像的差值系数;Re-determine the target pixel of each frame of the second auxiliary image, and determine the difference coefficient of each frame of the second auxiliary image according to the re-determined target pixel of each frame of the second auxiliary image and its corresponding reference pixel;
    对所述每帧第二辅助图像的差值系数进行平均处理得到平均差值系数,并根据所述平均差值系数更新所述差值信息。Perform averaging processing on the difference coefficients of each frame of the second auxiliary image to obtain an average difference coefficient, and update the difference information according to the average difference coefficient.
  13. 一种图像处理装置,其特征在于,包括:An image processing device, characterized in that it comprises:
    图像获取模块,用于获取第一图像和第二图像,所述第二图像的分辨率大于所述第一图像的分辨率;An image acquisition module for acquiring a first image and a second image, the resolution of the second image is greater than the resolution of the first image;
    差值信息确定模块,用于确定所述第二图像中的目标像素点以及所述第一图像中对应于所述目标像素点的参考像素点之间的差值信息;A difference information determining module, configured to determine difference information between a target pixel in the second image and a reference pixel in the first image corresponding to the target pixel;
    目标图像生成模块,用于根据所述差值信息对符合所述第一图像的分辨率的预设图像进行差值处理,获取符合第二图像的分辨率的目标图像。The target image generating module is configured to perform difference processing on a preset image conforming to the resolution of the first image according to the difference information, to obtain a target image conforming to the resolution of the second image.
  14. 根据权利要求13所述的图像处理装置,其特征在于,所述差值信息确定模块包括:The image processing device according to claim 13, wherein the difference information determining module comprises:
    目标像素点指定模块,用于将所述第二图像中的每一个像素点分别作为所述目标像素点;A target pixel designation module, configured to use each pixel in the second image as the target pixel;
    参考像素点确定模块,用于根据所述目标像素点的坐标在所述第一图像中确定与其对应的坐标,以确定所述第一图像中的所述参考像素点;A reference pixel determination module, configured to determine the corresponding coordinates in the first image according to the coordinates of the target pixel to determine the reference pixel in the first image;
    差值系数确定模块,用于获取所述目标像素点的像素值与所述参考像素点的像素值之间的差值系数;A difference coefficient determination module, configured to obtain the difference coefficient between the pixel value of the target pixel and the pixel value of the reference pixel;
    差值系数组合模块,用于根据所述差值系数生成所述差值信息。The difference coefficient combination module is used to generate the difference information according to the difference coefficient.
  15. 根据权利要求14所述的图像处理装置,其特征在于,所述差值系数确定模块被配置为:计算所述目标像素点的像素值与所述参考像素点的像素值在多个方向上的预设差值系数,以获取所述差值系数。The image processing device according to claim 14, wherein the difference coefficient determining module is configured to: calculate the difference between the pixel value of the target pixel and the pixel value of the reference pixel in multiple directions The difference coefficient is preset to obtain the difference coefficient.
  16. 根据权利要求13所述的图像处理装置,其特征在于,所述目标图像生成模块被配置为:根据所述差值信息对所述预设图像中的所有像素点的像素值进行逻辑操作,将所述所有像素点的像素值调整为符合第二图像的分辨率的像素值,以获取所述目标图像。The image processing device according to claim 13, wherein the target image generation module is configured to: perform a logical operation on the pixel values of all pixels in the preset image according to the difference information, and The pixel values of all the pixels are adjusted to match the resolution of the second image to obtain the target image.
  17. 根据权利要求14所述的图像处理装置,其特征在于,所述装置还包括:The image processing device according to claim 14, wherein the device further comprises:
    差值信息更新模块,用于通过预设周期获取第二辅助图像,并根据所述第二辅助图像对所述差值系数进行更新,以根据更新后的差值系数确定所述差值信息。The difference information update module is configured to obtain a second auxiliary image through a preset period, and update the difference coefficient according to the second auxiliary image, so as to determine the difference information according to the updated difference coefficient.
  18. 根据权利要求17所述的图像处理装置,其特征在于,所述差值信息更新模块包括:The image processing device according to claim 17, wherein the difference information update module comprises:
    辅助图像获取模块,用于根据参考信息获取至少一帧所述第二辅助图像;An auxiliary image acquisition module, configured to acquire at least one frame of the second auxiliary image according to reference information;
    差值系数更新模块,用于根据所述至少一帧第二辅助图像重新确定目标像素点,根据重新确定的目标像素点以及与其对应的参考像素点对差值系数进行更新,并根据更新后的差值系数确定所述差值信息。The difference coefficient update module is used to re-determine the target pixel according to the at least one frame of the second auxiliary image, update the difference coefficient according to the re-determined target pixel and the corresponding reference pixel, and according to the updated The difference coefficient determines the difference information.
  19. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    图像传感器;Image Sensor;
    处理器;以及Processor; and
    存储器,用于存储所述处理器的可执行指令;A memory for storing executable instructions of the processor;
    其中,所述处理器配置为对所述图像传感器获取的图像执行所述可执行指令来执行权利要求1-12任意一项所述的图像处理方法。Wherein, the processor is configured to execute the executable instruction on the image acquired by the image sensor to execute the image processing method according to any one of claims 1-12.
  20. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1-12任意一项所述的图像处理方法。A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the image processing method according to any one of claims 1-12 when the computer program is executed by a processor.
PCT/CN2020/131892 2019-11-28 2020-11-26 Image processing method and apparatus, electronic device, and storage medium WO2021104394A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20891548.8A EP4053784A4 (en) 2019-11-28 2020-11-26 Image processing method and apparatus, electronic device, and storage medium
US17/739,963 US20220261961A1 (en) 2019-11-28 2022-05-09 Method and device, electronic equipment, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911194628.9 2019-11-28
CN201911194628.9A CN110889809B9 (en) 2019-11-28 2019-11-28 Image processing method and device, electronic equipment and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/739,963 Continuation US20220261961A1 (en) 2019-11-28 2022-05-09 Method and device, electronic equipment, and storage medium

Publications (1)

Publication Number Publication Date
WO2021104394A1 true WO2021104394A1 (en) 2021-06-03

Family

ID=69749305

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/131892 WO2021104394A1 (en) 2019-11-28 2020-11-26 Image processing method and apparatus, electronic device, and storage medium

Country Status (4)

Country Link
US (1) US20220261961A1 (en)
EP (1) EP4053784A4 (en)
CN (1) CN110889809B9 (en)
WO (1) WO2021104394A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116051435A (en) * 2022-08-23 2023-05-02 荣耀终端有限公司 Image fusion method and electronic equipment

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110889809B9 (en) * 2019-11-28 2023-06-23 RealMe重庆移动通信有限公司 Image processing method and device, electronic equipment and storage medium
CN111652799A (en) * 2020-04-14 2020-09-11 北京奇艺世纪科技有限公司 Image processing method and device, electronic equipment and readable storage medium
CN113470155B (en) * 2021-09-03 2021-11-23 贝壳技术有限公司 Texture image processing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110037894A1 (en) * 2009-08-11 2011-02-17 Google Inc. Enhanced image and video super-resolution processing
CN102306374A (en) * 2011-08-30 2012-01-04 西安交通大学 Method for rebuilding super-resolution human face image by position block nonlinear mapping
US20170366747A1 (en) * 2016-06-15 2017-12-21 Qualcomm Incorporated Generating high resolution images
CN109903221A (en) * 2018-04-04 2019-06-18 华为技术有限公司 Image oversubscription method and device
CN110889809A (en) * 2019-11-28 2020-03-17 RealMe重庆移动通信有限公司 Image processing method and device, electronic device and storage medium

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011180798A (en) * 2010-03-01 2011-09-15 Sony Corp Image processing apparatus, image processing method, and program
KR101624210B1 (en) * 2010-08-27 2016-05-31 한화테크윈 주식회사 Method for reconstructing super-resolution image, and system for detecting illegally parked vehicles therewith
WO2012132183A1 (en) * 2011-03-28 2012-10-04 パナソニック株式会社 Image processing apparatus, image processing method, computer program for processing images, and recording medium
CN104103034A (en) * 2013-04-03 2014-10-15 聚晶半导体股份有限公司 Super-resolution image processing method and image processing device thereof
CN104966269A (en) * 2015-06-05 2015-10-07 华为技术有限公司 Multi-frame super-resolution imaging device and method
CN106331540B (en) * 2016-09-13 2019-09-13 首都师范大学 A kind of multi-mode cmos image sensor and its control method
CN108629733B (en) * 2017-03-17 2021-12-24 北京大学 Method and device for acquiring high-resolution image
CN108805806B (en) * 2017-04-28 2019-11-12 华为技术有限公司 Image processing method and device
CN108154514B (en) * 2017-12-06 2021-08-13 Oppo广东移动通信有限公司 Image processing method, device and equipment
CN108320263A (en) * 2017-12-29 2018-07-24 维沃移动通信有限公司 A kind of method, device and mobile terminal of image procossing
CN108259997B (en) * 2018-04-02 2019-08-23 腾讯科技(深圳)有限公司 Image correlation process method and device, intelligent terminal, server, storage medium
CN108921782B (en) * 2018-05-17 2023-04-14 腾讯科技(深圳)有限公司 Image processing method, device and storage medium
CN110062160B (en) * 2019-04-09 2021-07-02 Oppo广东移动通信有限公司 Image processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110037894A1 (en) * 2009-08-11 2011-02-17 Google Inc. Enhanced image and video super-resolution processing
CN102306374A (en) * 2011-08-30 2012-01-04 西安交通大学 Method for rebuilding super-resolution human face image by position block nonlinear mapping
US20170366747A1 (en) * 2016-06-15 2017-12-21 Qualcomm Incorporated Generating high resolution images
CN109903221A (en) * 2018-04-04 2019-06-18 华为技术有限公司 Image oversubscription method and device
CN110889809A (en) * 2019-11-28 2020-03-17 RealMe重庆移动通信有限公司 Image processing method and device, electronic device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LI FANGBIAO: "Research on Super-resolution Reconstruction of Infrared Imaging System", INFORMATION & TECHNOLOGY, CHINA DOCTORAL DISSERTATIONS FULL-TEXT DATABASE, 1 June 2018 (2018-06-01), XP055815698 *
See also references of EP4053784A4

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116051435A (en) * 2022-08-23 2023-05-02 荣耀终端有限公司 Image fusion method and electronic equipment
CN116051435B (en) * 2022-08-23 2023-11-07 荣耀终端有限公司 Image fusion method and electronic equipment

Also Published As

Publication number Publication date
CN110889809A (en) 2020-03-17
CN110889809B (en) 2023-04-21
US20220261961A1 (en) 2022-08-18
CN110889809B9 (en) 2023-06-23
EP4053784A1 (en) 2022-09-07
EP4053784A4 (en) 2023-01-04

Similar Documents

Publication Publication Date Title
WO2021104394A1 (en) Image processing method and apparatus, electronic device, and storage medium
JP5319415B2 (en) Image processing apparatus and image processing method
WO2020057198A1 (en) Image processing method and device, electronic device and storage medium
US9514525B2 (en) Temporal filtering for image data using spatial filtering and noise history
WO2021083020A1 (en) Image fusion method and apparatus, and storage medium and terminal device
CN111885312B (en) HDR image imaging method, system, electronic device and storage medium
JP2010148037A (en) Moving image playback apparatus, moving image playback method and moving image playback program
CN110855958B (en) Image adjusting method and device, electronic equipment and storage medium
TW202112138A (en) Method and system for processing input video
KR20210110679A (en) Image Fusion Processing Module
WO2020215180A1 (en) Image processing method and apparatus, and electronic device
CN110958363B (en) Image processing method and device, computer readable medium and electronic device
WO2023010751A1 (en) Information compensation method and apparatus for highlighted area of image, device, and storage medium
WO2022111208A1 (en) Video frame rate up-conversion method and apparatus, device and medium
WO2022111717A1 (en) Image processing method and apparatus, and electronic device
CN114390188B (en) Image processing method and electronic equipment
CN111988526B (en) Mobile terminal and image data processing method
JP2010152518A (en) Image processor and image processing method
CN113066020A (en) Image processing method and device, computer readable medium and electronic device
US9374526B2 (en) Providing frame delay using a temporal filter
CN109309784B (en) Mobile terminal
CN112601029B (en) Video segmentation method, terminal and storage medium with known background prior information
CN114298889A (en) Image processing circuit and image processing method
WO2023100665A1 (en) Image processing device, image processing method, and program
WO2017110192A1 (en) Information processing device, information processing method, program, and information processing system

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020891548

Country of ref document: EP

Effective date: 20220530

NENP Non-entry into the national phase

Ref country code: DE