WO2017008377A1 - 一种图像处理方法及终端 - Google Patents

一种图像处理方法及终端 Download PDF

Info

Publication number
WO2017008377A1
WO2017008377A1 PCT/CN2015/088478 CN2015088478W WO2017008377A1 WO 2017008377 A1 WO2017008377 A1 WO 2017008377A1 CN 2015088478 W CN2015088478 W CN 2015088478W WO 2017008377 A1 WO2017008377 A1 WO 2017008377A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
color
infrared
information parameter
pixel
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2015/088478
Other languages
English (en)
French (fr)
Inventor
孔令超
杨祖勇
王保磊
王陈林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Publication of WO2017008377A1 publication Critical patent/WO2017008377A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • H04N23/13Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths with multiple sensors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene

Definitions

  • the present invention relates to the field of electronic technologies, and in particular, to an image processing method and a terminal.
  • the low-light photo mode of the terminal is to limit the ISO (sensitivity) to a certain range, and the low-light photo is taken by increasing the exposure time to reduce the noise of the image under low-light shooting and improve the brightness.
  • this method is still lacking in brightness enhancement, which directly leads to the lack of clearness of the photos, so the improvement of brightness and sharpness in low light environment is generally satisfactory, and it is difficult to satisfy the user.
  • the technical problem to be solved by the embodiments of the present invention is to provide an image processing method and a terminal, which can improve the image capturing effect in a low light environment.
  • an embodiment of the present invention provides an image processing method, where the method includes:
  • the chrominance information parameter is used as a chrominance information parameter of a corresponding pixel in the output image
  • the output image is determined according to a luminance information parameter and a chrominance information parameter of each pixel in the output image.
  • an embodiment of the present invention further provides an image processing terminal, including:
  • An image acquisition module configured to acquire a color image captured by the first camera and a second image captured at the same time
  • An infrared image taken by the head, the first camera and the second camera are located on the same side of the terminal;
  • a parameter extraction module configured to separately extract color information parameters of each color point in the color image and the infrared image, where the color information parameter includes a brightness information parameter and a chromaticity information parameter;
  • a synthesizing module configured to synthesize a brightness information parameter of each pixel in the color image and a brightness information parameter of a corresponding pixel in the infrared image, to obtain a brightness information parameter of a corresponding pixel in the output image, where the color image is
  • the chrominance information parameter of each pixel point is used as a chrominance information parameter of the corresponding pixel in the output image;
  • an output image module configured to determine the output image according to a brightness information parameter and a chrominance information parameter of each pixel in the output image.
  • the color image captured by the first camera and the infrared image captured by the second camera at the same time are respectively obtained, and the color information parameters of each pixel in the color image and the infrared image are respectively extracted, and the color image is
  • the brightness information parameter of each pixel is combined with the brightness information parameter of the corresponding pixel in the infrared image to obtain a brightness information parameter of the corresponding pixel in the output image, and the chromaticity information parameter of each pixel in the color image is output.
  • the chrominance information parameter of the corresponding pixel in the image determines the output image according to the brightness information parameter and the chrominance information parameter of each pixel in the output image, thereby improving the image capturing effect in a low light environment.
  • FIG. 1 is a schematic flow chart of an image processing method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flow chart of an image processing method according to another embodiment of the present invention.
  • FIG. 3 is a schematic diagram of the composition of an image processing terminal according to an embodiment of the present invention.
  • FIG. 4 is a structural diagram of a parameter extraction module of FIG. 3 according to an embodiment of the present invention.
  • FIG. 5 is a structural diagram of the registration module of Figure 3 in the embodiment of the present invention.
  • Figure 6 is a schematic diagram of coordinate mapping in an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention.
  • the method may be implemented by an image processing terminal, and the image processing terminal may include a mobile phone, a notebook computer, a tablet computer, a digital camera, and the like.
  • the method flow in this embodiment as shown in the figure may include:
  • Step S101 acquiring a color image captured by the first camera and an infrared image captured by the second camera at the same time, where the first camera and the second camera are located on the same side of the terminal.
  • the first camera and the second camera on the same side will perform a framing photographing
  • the relative positions of the first camera and the second camera may be one up or down or It is one left and one right, and the relative distance between the two is to ensure that the shooting parameters such as the framing range and angle of the first camera and the second camera are substantially consistent during the shooting.
  • the first camera is a color camera, and a color filter that filters out infrared rays is disposed, so that only white light in the environment passes through the first camera to reach the sensor, so that the first camera captures a color image by focusing white light.
  • the second camera is an infrared camera, and the infrared filter that filters out white light can be disposed, so that only infrared rays in the environment pass through the second camera to reach the sensor, so that the second camera captures white light that is filtered out. Infrared image. Thereafter, the terminal acquires the color image captured by the first camera and the infrared image captured by the second camera for further extracting parameters of the pixel.
  • the color image and the infrared image may be respectively turned on by the first camera and the second camera to turn on the flash to illuminate the auxiliary light in the shooting direction.
  • the auxiliary light includes white light and infrared light. Due to the existence of the filter, the two kinds of light do not interfere with the captured color image and the infrared image, so the white light can only fill the first camera, and the infrared light can only fill the second camera. Improve the brightness of the shooting environment.
  • Step S102 respectively extracting color information parameters of each pixel point in the color image and the infrared image, where the color information parameter includes a brightness information parameter and a chromaticity information parameter.
  • the color image and the infrared image are each composed of a certain number of pixel points, each of the pixel points includes a color information parameter, and the color information parameter includes a brightness information parameter and a chromaticity information parameter, and the terminal
  • the method of saving and restoring by extracting the color information parameters of the respective pixel points Describe the color image and the infrared image.
  • the color information parameters of the color image and the infrared image are both YUV parameters of the YUV color space, wherein Y, U, and V are color space components of the infrared image in the YUV color space, respectively representing The luminance component Y and the chrominance components U, V of each pixel are used.
  • each pixel in the color image and the infrared image may be in an RGB color by a format conversion formula.
  • the RGB parameters of the space are converted to the YUV parameters of the YUV color space.
  • image registration may be performed on the color image and the infrared image to determine a correspondence relationship between pixel points in the color image and pixel points of the infrared image for the same shooting target position.
  • Step S103 synthesizing the brightness information parameter of each pixel in the color image and the brightness information parameter of the corresponding pixel in the infrared image to obtain a brightness information parameter of the corresponding pixel in the output image, and
  • the chrominance information parameter of the pixel is used as the chrominance information parameter of the corresponding pixel in the output image.
  • the brightness information parameter of each pixel in the color image and the brightness of the corresponding pixel in the infrared image may be The information parameter is synthesized to obtain a luminance information parameter of the corresponding pixel in the output image; on the other hand, the chrominance information parameter of each pixel in the color image may be used as a chrominance information parameter of the corresponding pixel in the output image, Therefore, the terminal can determine the brightness information parameter and the chrominance information parameter of each pixel in the output image, and save, restore, and restore according to the brightness information parameter and the chrominance information parameter of each pixel in the output image.
  • the output image is presented.
  • the infrared image is more accurate than the luminance information parameter of each pixel in the color image, and the color image is more accurate than the chrominance information parameter of each pixel in the infrared image, after the synthesis, the output image Quality can be improved.
  • Y component of each pixel of the infrared image may be Y 1 and Y-component of the corresponding pixel in the color image synthesized Y 2 Y component corresponding to the pixel of the output image Y 3, the The U and V components U 1 and V 1 of each pixel in the color image are used as U and V components U 3 and V 3 of corresponding pixel points in the output image.
  • the Y component Y 1 of a pixel in the infrared image is 95
  • the Y component Y 2 of the corresponding pixel in the color image is 42
  • the U and V components U 1 and V 1 are 54, 73, respectively.
  • the Y component Y 3 of the corresponding pixel in the output image can be synthesized to be 137
  • the U and V components U 3 and V 3 are 54, 73.
  • Step S104 according to the brightness information parameter and the chrominance information parameter of each pixel in the output image, The output image is determined.
  • the output image may be determined, saved, and restored according to the luminance information parameter and the chrominance information parameter of each pixel in the output image obtained in step S103.
  • the output picture may be stored or displayed according to an instruction of the user.
  • the color image captured by the first camera and the infrared image captured by the second camera at the same time are respectively obtained, and the color information parameters of each pixel in the color image and the infrared image are respectively extracted, and the color image is
  • the brightness information parameter of each pixel is combined with the brightness information parameter of the corresponding pixel in the infrared image to obtain a brightness information parameter of the corresponding pixel in the output image, and the chromaticity information parameter of each pixel in the color image is output.
  • the chrominance information parameter of the corresponding pixel in the image determines the output image according to the brightness information parameter and the chrominance information parameter of each pixel in the output image, thereby improving the image capturing effect in a low light environment.
  • FIG. 2 is a schematic flowchart of an image processing method according to another embodiment of the present invention. As shown in the figure, the method flow in this embodiment may include:
  • step S201 it is determined that the brightness of the shooting environment is lower than a preset brightness threshold.
  • the device such as the camera of the terminal has a photosensitive element capable of detecting the brightness around the shooting environment, so the terminal can set a brightness threshold.
  • the terminal can set a brightness threshold.
  • the low light shooting mode of the dual camera can be activated.
  • Step S202 acquiring a color image captured by the first camera and an infrared image captured by the second camera at the same time, where the first camera and the second camera are located on the same side of the terminal.
  • step S101 For the specific method, refer to step S101.
  • Step S203 determining a displacement difference vector between the color image and the infrared image.
  • the terminal extracts at least one set of reference feature point pairs by detecting similar feature points of the color image and the infrared image; and according to the reference feature point pair respectively in the color image and the infrared a reference coordinate on the image, determining a coordinate mapping relationship between the color image and the infrared image; and then converting the mapping relationship into a corresponding displacement difference vector.
  • the displacement difference vector records the spatially different distance and corresponding direction of the color image and the infrared image, and is an important parameter in translation compensation.
  • a set of reference feature point pairs of the color image and the infrared image are (1, 1) and (2, 2)
  • Step S204 performing translation compensation on the color image and the infrared image according to the displacement difference vector.
  • the terminal may perform translation compensation on the color image and the infrared image according to a direction and a distance direction of the displacement difference vector to determine that the same target position is Correspondence between pixel points in the color image and pixel points of the infrared image.
  • the color image may be image-referenced with reference to the infrared image, or the infrared image may be referenced with the color image as a reference. Image registration.
  • the color image may be compensated for translation with reference to the infrared image, that is, the infrared image remains motionless, and only the color image is translated; or conversely, the color image may be referred to Performing translation compensation on the infrared image, that is, the color image remains stationary, and only the infrared image is translated; on the other hand, a reference coordinate may also be set, and the infrared image and the color image are The reference coordinates are translationally compensated for the reference, ie both the infrared image and the color image are translated to the position of the reference coordinates. Since the first two can reduce the time and difficulty of image processing, one of the first two is selected as the translation compensation method.
  • Step S205 extracting RGB parameters of each pixel point in the RGB color space in the color image and the infrared image, respectively.
  • the color image and the infrared image are composed of a certain number of pixels.
  • the color parameters of each pixel of the unprocessed original image are RGB parameters in the RGB color space, so the terminal needs to extract the first The color image and the RGB parameters of each pixel in the infrared image.
  • R, G, and B are the color space components of the color image in the RGB color space, respectively representing the values occupied by the three primary colors of red, green, and blue in each pixel. Different R, G, and B values can represent different chromaticities, and can also reflect the difference in brightness. Therefore, by extracting the RGB parameters, the color of each pixel in the color image and the infrared image can be obtained. Degree and brightness information.
  • Step S206 the pixels in the color image and the infrared image are in the RGB color space.
  • the RGB parameters are converted into YUV parameters of the YUV color space, the Y components are luminance information parameters, and the U and V components are chrominance information parameters.
  • the conversion formula of the RGB parameter and the YUV parameter is as follows:
  • the color conversion image and the pixels in the infrared image may be used by the group conversion formula. Converting the RGB parameters in the RGB color space into YUV parameters of the YUV color space, so that the luminance information parameter and the chrominance information parameter of each pixel of the infrared image and the color image can be obtained for synthesizing the The color information parameter of the output image.
  • Step S207 performing digital operations on the YUV parameters obtained by converting the RGB parameters of each pixel in the color image and the infrared image, so that the range of the Y, U, and V components obtained by the conversion is Between 0 and 255.
  • the integer operation is faster than the floating point operation, and the logical displacement is faster than the multiplication and division operation.
  • the terminal can multiply each unit of the conversion formula by 256 into an integer, and then shift the right by 8 bits.
  • the range of the Y component can reach 0 to 255, but the range of the U component is -111.18 to 111.18, and the range of the V component is -156.825 to 156.825, so it is necessary to add 128 to the U component and the V component to make the range They are also between 0 and 255, which is convenient for the computer to perform 8-bit binary operations.
  • the V component range after the above transformation may exceed 255, which may cause overexposure of the image, so when the V component exceeds 255, the terminal automatically defaults the V component to 255.
  • the conversion formula of the RGB parameter and the YUV parameter is as follows:
  • V 256*(128+0.615*R-0.515*G-0.100*B)>>8
  • Step S208 synthesizing the brightness information parameter of each pixel in the color image and the brightness information parameter of the corresponding pixel in the infrared image to obtain a brightness information parameter of the corresponding pixel in the output image, and
  • the chrominance information parameter of the pixel is used as the chrominance information parameter of the corresponding pixel in the output image.
  • the terminal may pass the Y component of each pixel in the color image and the infrared image.
  • the Y component of the pixel corresponding to each pixel of the color image is synthesized to obtain the Y component of the corresponding pixel in the output image; on the other hand, the U of each pixel in the color image may be And a V component is used as the U and V of the corresponding pixel in the output image, so that the terminal can determine the YUV parameter of each pixel in the output image, and according to the YUV parameter of each pixel in the output image.
  • the terminal may pass the Y component of each pixel in the color image and the infrared image.
  • the infrared image is more accurate than the luminance information parameter of each pixel in the color image, and the color image is more accurate than the chrominance information parameter of each pixel in the infrared image, after the synthesis, the output image Quality can be improved.
  • the Y component Y 1 of a pixel in the infrared image is 95
  • the Y component Y 2 of the corresponding pixel in the color image is 42
  • the U and V components U 1 and V 1 are 54, 73, respectively.
  • the Y component Y 3 of the corresponding pixel in the output image can be synthesized to be 137
  • the U and V components U 3 and V 3 are 54, 73.
  • Step S209 determining the output image according to the brightness information parameter and the chrominance information parameter of each pixel in the output image.
  • the output image may be determined, saved, and restored according to the YUV parameter of each pixel in the output image obtained in step S208.
  • the output image may be stored or displayed according to an instruction of the user.
  • the color image captured by the first camera and the infrared image captured by the second camera at the same time are respectively obtained, and the color information parameters of each pixel in the color image and the infrared image are respectively extracted, and the color image is
  • the brightness information parameter of each pixel is combined with the brightness information parameter of the corresponding pixel in the infrared image to obtain a brightness information parameter of the corresponding pixel in the output image, and the chromaticity information parameter of each pixel in the color image is output.
  • the chrominance information parameter of the corresponding pixel in the image determines the output image according to the brightness information parameter and the chrominance information parameter of each pixel in the output image, thereby improving the image capturing effect in a low light environment.
  • FIG. 3 is a schematic diagram of a composition of an image processing terminal according to an embodiment of the present invention. As shown in the figure, the terminal in this embodiment may include:
  • the image acquisition module 310 is configured to acquire a color image captured by the first camera and an infrared image captured by the second camera at the same time, where the first camera and the second camera are located on the same side of the terminal.
  • the first camera and the second camera on the same side will perform a framing photographing
  • the relative positions of the first camera and the second camera may be one up or down or It is one left and one right, and the relative distance between the two is to ensure that the shooting parameters such as the framing range and angle of the first camera and the second camera are substantially consistent during the shooting.
  • the first camera is a color camera, and a color filter that filters out infrared rays is disposed, so that only white light in the environment passes through the first camera to reach the sensor, so that the first camera captures a color image by focusing white light.
  • the second camera is an infrared camera, and the infrared filter that filters out white light can be disposed, so that only infrared rays in the environment pass through the second camera to reach the sensor, so that the second camera captures white light that is filtered out. Infrared image. Thereafter, the image acquisition module 310 acquires the color image captured by the first camera and the infrared image captured by the second camera for further extracting parameters of the pixel.
  • the parameter extraction module 320 is configured to separately extract color information parameters of each color point in the color image and the infrared image, where the color information parameter includes a brightness information parameter and a chromaticity information parameter.
  • the color image and the infrared image are each composed of a certain number of pixel points, each of the pixel points includes a color information parameter, and the color information parameter includes a brightness information parameter and a chromaticity information parameter, and the terminal That is, the color image and the infrared image are saved and restored by extracting color information parameters of the respective pixel points.
  • the color information parameters of the color image and the infrared image are both YUV parameters of the YUV color space, wherein Y, U, and V are color space components of the infrared image in the YUV color space, respectively representing The luminance component Y and the chrominance components U, V of each pixel are used.
  • the parameter extraction module 320 includes: an RGB unit 321 and a YUV unit 322, as shown in FIG.
  • the RGB unit 321 is configured to respectively extract RGB parameters of the color image and each pixel point in the RGB color space in the infrared image.
  • the color image and the infrared image are composed of a certain number of pixel points.
  • the color parameters of each pixel of the raw image that is not processed are RGB parameters in the RGB color space, so the RGB unit 321 needs to be Extracting RGB parameters of each color point in the color image and the infrared image.
  • R, G, and B are the color space components of the color image in the RGB color space, respectively representing the values occupied by the three primary colors of red, green, and blue in each pixel. Different R, G, and B values can represent different chromaticities, and can also reflect the difference in brightness, so By extracting the RGB parameters, chromaticity and luminance information of each pixel in the color image and the infrared image can be obtained.
  • the YUV unit 322 is configured to convert the RGB parameters of each pixel point in the RGB color space in the color image and the infrared image into a YUV parameter of a YUV color space, where the Y component is a brightness information parameter, and the U and V are The component is a chrominance information parameter.
  • the conversion formula of the RGB parameter and the YUV parameter is as follows:
  • the YUV unit 322 can use the set of conversion formulas to use the color image and the infrared image.
  • the RGB parameters of each pixel in the RGB color space are converted into YUV parameters of the YUV color space, so that the brightness information parameter and the chrominance information parameter of each pixel of the infrared image and the color image can be obtained.
  • the color information parameters of the output image are synthesized.
  • a synthesizing module 330 configured to synthesize a brightness information parameter of each pixel in the color image and a brightness information parameter of a corresponding pixel in the infrared image to obtain a brightness information parameter of a corresponding pixel in the output image, where the color is
  • the chrominance information parameter of each pixel in the image is used as the chrominance information parameter of the corresponding pixel in the output image.
  • the brightness information parameter of each pixel in the color image and the corresponding pixel in the infrared image may be The luminance information parameter is synthesized to obtain a luminance information parameter of the corresponding pixel in the output image; on the other hand, the chrominance information parameter of each pixel in the color image may be used as the chrominance information of the corresponding pixel in the output image.
  • the synthesis module 330 can determine the brightness information parameter and the chrominance information parameter of each pixel in the output image, and save according to the brightness information parameter and the chrominance information parameter of each pixel in the output image,
  • the output image is restored and rendered.
  • the infrared image is more accurate than the luminance information parameter of each pixel in the color image, and the color image is more accurate than the chrominance information parameter of each pixel in the infrared image, after the synthesis, the output image Quality can be improved.
  • Y component of each pixel of the infrared image may be Y 1 and Y-component of the corresponding pixel in the color image synthesized Y 2 Y component corresponding to the pixel of the output image Y 3, the The U and V components U 1 and V 1 of each pixel in the color image are used as U and V components U 3 and V 3 of corresponding pixel points in the output image.
  • the Y component Y 1 of a pixel in the infrared image is 95
  • the Y component Y 2 of the corresponding pixel in the color image is 42
  • the U and V components U 1 and V 1 are 54, 73, respectively.
  • the Y component Y 3 of the corresponding pixel in the output image can be synthesized to be 137, and the U and V components U 3 and V 3 are 54, 73.
  • the output image module 340 is configured to determine the output image according to the brightness information parameter and the chrominance information parameter of each pixel in the output image.
  • the output image module 340 can determine, save, and restore the output image according to the brightness information parameter and the chrominance information parameter of each pixel in the output image obtained in the synthesis module 330.
  • the output image module 340 may perform operations such as storing or displaying the output image according to an instruction of the user.
  • the brightness module 350 is configured to determine that the brightness of the shooting environment is lower than a preset brightness threshold.
  • the device such as the camera of the terminal has a photosensitive element capable of detecting the brightness around the shooting environment, so the brightness module 350 can set a brightness threshold when the brightness value of the surrounding environment detected by the photosensitive element of the terminal is lower than the brightness threshold. , you can start the low light shooting mode of the dual camera.
  • the operation module 360 is configured to respectively perform digital operations on the YUV parameters obtained by converting the RGB parameters of each pixel point in the color image and the infrared image, so that the converted Y, U, and V components are obtained.
  • the range is between 0 and 255.
  • the integer operation is faster than the floating point operation, and the logical displacement is faster than the multiplication and division operation.
  • the operation module 360 can multiply each unit of the conversion formula by 256 into an integer, and then shift the right by 8 bits.
  • the range of the Y component can reach 0 to 255, but the range of the U component is -111.18 to 111.18, and the range of the V component is -156.825 to 156.825, so it is necessary to add 128 to the U component and the V component to make the range They are also between 0 and 255, which is convenient for the computer to perform 8-bit binary operations.
  • the V component range after the above transformation may exceed 255, which may cause overexposure of the image, so when the V component exceeds 255, the operation module 360 automatically defaults the V component to 255.
  • the conversion formula of the RGB parameter and the YUV parameter is as follows:
  • V 256*(128+0.615*R-0.515*G-0.100*B)>>8
  • a flash module 370 configured to illuminate the shooting direction with auxiliary light when the color image and the infrared image are respectively captured by the first camera and the second camera, the auxiliary light includes White light and infrared light.
  • the flash module 370 may respectively illuminate the shooting direction by the auxiliary flash when the color image and the infrared image are captured by the first camera and the second camera.
  • the auxiliary light includes white light and infrared light. Due to the existence of the filter, the two kinds of light do not interfere with the captured color image and the infrared image, so the white light can only fill the first camera, and the infrared light can only fill the second camera. Improve the brightness of the shooting environment.
  • the registration module 380 is configured to perform image registration on the color image and the infrared image to determine a correspondence relationship between pixel points in the color image and pixel points of the infrared image for the same shooting target position.
  • the color image captured by the first camera and the infrared image captured by the second camera may have a certain offset, so the color needs to be The image and the infrared image are image registered.
  • the registration module 380 includes: a displacement difference unit 381 and a compensation unit 382, as shown in FIG.
  • the displacement difference unit 381 is configured to determine a displacement difference vector between the color image and the infrared image.
  • the displacement difference unit 381 extracts at least one set of reference feature point pairs by detecting similar feature points of the color image and the infrared image; and according to the reference feature point pairs respectively in the color image and the Determining a coordinate mapping relationship between the color image and the infrared image by using reference coordinates on the infrared image; and then converting the mapping relationship into a corresponding displacement difference vector.
  • the displacement difference vector records the spatially different distance and corresponding direction of the color image and the infrared image, and is an important parameter in translation compensation. For the simplest example, as shown in FIG.
  • the compensation unit 382 is configured to perform translation compensation on the color image and the infrared image according to the displacement difference vector.
  • the compensation unit 382 may perform translation compensation on the color image and the infrared image according to the direction and the distance pointed by the displacement difference vector to determine the same target.
  • a pixel located in the color image and an image of the infrared image Correspondence between prime points.
  • the color image may be image-referenced with reference to the infrared image, or the infrared image may be referenced with the color image as a reference. Image registration.
  • the color image may be compensated for translation with reference to the infrared image, that is, the infrared image remains motionless, and only the color image is translated; or conversely, the color image may be referred to Performing translation compensation on the infrared image, that is, the color image remains stationary, and only the infrared image is translated; on the other hand, a reference coordinate may also be set, and the infrared image and the color image are The reference coordinates are translationally compensated for the reference, ie both the infrared image and the color image are translated to the position of the reference coordinates. Since the first two can reduce the time and difficulty of image processing, one of the first two is selected as the translation compensation method.
  • the color image captured by the first camera and the infrared image captured by the second camera at the same time are respectively obtained, and the color information parameters of each pixel in the color image and the infrared image are respectively extracted, and the color image is
  • the brightness information parameter of each pixel is combined with the brightness information parameter of the corresponding pixel in the infrared image to obtain a brightness information parameter of the corresponding pixel in the output image, and the chromaticity information parameter of each pixel in the color image is output.
  • the chrominance information parameter of the corresponding pixel in the image determines the output image according to the brightness information parameter and the chrominance information parameter of each pixel in the output image, thereby improving the image capturing effect in a low light environment.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

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

Abstract

本发明实施公开了一种图像处理方法,所述方法包括:获取第一摄像头拍摄的彩色图像和同一时间第二摄像头拍摄的红外图像,所述第一摄像头与所述第二摄像头位于终端的同一侧;分别提取所述彩色图像和所述红外图像中各像素点的颜色信息参数,所述颜色信息参数包括亮度信息参数和色度信息参数;将所述彩色图像中各像素点的亮度信息参数与所述红外图像中对应像素点的亮度信息参数合成,得到输出图像中对应像素点的亮度信息参数,将所述彩色图像中各像素点的色度信息参数作为输出图像中对应像素点的色度信息参数;确定所述输出图像。本发明还公开了一种图像处理终端。采用本发明,可以改善弱光环境下图像的拍摄效果。

Description

一种图像处理方法及终端 技术领域
本发明涉及电子技术领域,尤其涉及一种图像处理方法及终端。
背景技术
随着电子产品和图像处理技术的发展越来越快速,使得用户对电子终端拍摄的图像的拍摄效果要求也越来越高,尤其在弱光环境下的拍摄效果更是如此,目前存在于电子终端的弱光拍照模式是通过把ISO(感光度)限制在一定范围内,通过增加曝光时间来完成弱光拍照,以减少弱光拍摄下图像的噪点,提升一点亮度。但是这种方法在提升亮度方面还是比较欠缺,这就直接导致了照片不够清晰,因此对弱光环境下的亮度和清晰度改善效果一般,很难让用户满意。
发明内容
本发明实施例所要解决的技术问题在于,提供一种图像处理方法及终端,可以改善弱光环境下图像的拍摄效果。
为了解决上述技术问题,本发明实施例提供了一种图像处理方法,所述方法包括:
获取第一摄像头拍摄的彩色图像和同一时间第二摄像头拍摄的红外图像,所述第一摄像头与所述第二摄像头位于终端的同一侧;
分别提取所述彩色图像和所述红外图像中各像素点的颜色信息参数,所述颜色信息参数包括亮度信息参数和色度信息参数;
将所述彩色图像中各像素点的亮度信息参数与所述红外图像中对应像素点的亮度信息参数合成,得到输出图像中对应像素点的亮度信息参数,将所述彩色图像中各像素点的色度信息参数作为输出图像中对应像素点的色度信息参数;
根据所述输出图像中各像素点的亮度信息参数和色度信息参数,确定所述输出图像。
相应地,本发明实施例还提供了一种图像处理终端,包括:
图像获取模块,用于获取第一摄像头拍摄的彩色图像和同一时间第二摄像 头拍摄的红外图像,所述第一摄像头与所述第二摄像头位于终端的同一侧;
参数提取模块,用于分别提取所述彩色图像和所述红外图像中各像素点的颜色信息参数,所述颜色信息参数包括亮度信息参数和色度信息参数;
合成模块,用于将所述彩色图像中各像素点的亮度信息参数与所述红外图像中对应像素点的亮度信息参数合成,得到输出图像中对应像素点的亮度信息参数,将所述彩色图像中各像素点的色度信息参数作为输出图像中对应像素点的色度信息参数;
输出图像模块,用于根据所述输出图像中各像素点的亮度信息参数和色度信息参数,确定所述输出图像。
本发明实施例通过获取第一摄像头拍摄的彩色图像和同一时间第二摄像头拍摄的红外图像,分别提取所述彩色图像和所述红外图像中各像素点的颜色信息参数,将所述彩色图像中各像素点的亮度信息参数与所述红外图像中对应像素点的亮度信息参数合成,得到输出图像中对应像素点的亮度信息参数,将所述彩色图像中各像素点的色度信息参数作为输出图像中对应像素点的色度信息参数,根据所述输出图像中各像素点的亮度信息参数和色度信息参数,确定所述输出图像,改善了弱光环境下图像的拍摄效果。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例中一种图像处理方法的流程示意图;
图2是本发明另一实施例中图像处理方法的流程示意图;
图3是本发明实施例中一种图像处理终端的组成示意图;
图4是本发明实施例中图3的参数提取模块组成结构图;
图5是本发明实施例中图3的配准模块组成结构图;
图6是本发明实施例中坐标映射的示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
图1是本发明实施例中一种图像处理方法的流程示意图,本方法流程可以由图像处理终端实施,所述图像处理终端可以包括手机、笔记本电脑、平板电脑、数码相机等。如图所示本实施例中的方法流程可以包括:
步骤S101,获取第一摄像头拍摄的彩色图像和同一时间第二摄像头拍摄的红外图像,所述第一摄像头与所述第二摄像头位于终端的同一侧。
具体的,在收到用户的拍照指令之后,所述位于同一侧的第一摄像头与第二摄像头将进行取景拍照,所述第一摄像头与所述第二摄像头的相对位置可以是一上一下或者是一左一右,且两者的相对距离要能保证在拍摄过程中,所述第一摄像头与所述第二摄像头的取景范围、角度等拍摄参数都基本保持一致。所述第一摄像头为彩色摄像头,可以通过设置滤除红外线的彩色滤光镜,仅使环境中的白光透过所述第一摄像头到达传感器,使所述第一摄像头通过聚焦白光拍摄到彩色图像;所述第二摄像头为红外摄像头,可以通过设置滤除白光的红外滤光镜,仅使环境中的红外线透过所述第二摄像头到达传感器,使所述第二摄像头拍摄到被过滤掉白光的红外图像。之后,终端获取所述第一摄像头拍摄的彩色图像和所述第二摄像头拍摄的红外图像,用于进一步提取像素点的参数。
进一步可选的,当终端感应到环境的亮度过低时,可以分别通过所述第一摄像头和所述第二摄像头拍摄所述彩色图像和所述红外图像时开启闪光灯向拍摄方向照射辅助光,所述辅助光包括白光和红外线。由于滤光镜的存在,两种光互相不会对拍摄的所述彩色图像和所述红外图像产生干扰,因此白光只可以给第一摄像头补光,红外线只可以给第二摄像头补光,以提高拍摄环境的亮度。
步骤S102,分别提取所述彩色图像和所述红外图像中各像素点的颜色信息参数,所述颜色信息参数包括亮度信息参数和色度信息参数。
具体的,所述彩色图像和所述红外图像都是由一定数量的像素点组成的,所述各像素点都包含颜色信息参数,所述颜色信息参数包括亮度信息参数和色度信息参数,终端就是通过提取所述各像素点的颜色信息参数来保存和还原所 述彩色图像和所述红外图像的。需要说明的是,这里所述彩色图像和所述红外图像的颜色信息参数均为YUV颜色空间的YUV参数,其中Y、U和V是所述红外图像在YUV颜色空间的颜色空间分量,分别代表了每个像素点的亮度分量Y和色度分量U、V。具体实施中,当获取到的所述彩色图像和所述红外图像的各像素点在RGB颜色空间中,则可以通过格式转换公式将所述彩色图像和所述红外图像中各像素点在RGB颜色空间的RGB参数转换成YUV颜色空间的YUV参数。进一步的,可以先对所述彩色图像以及所述红外图像进行图像配准,以确定针对同一拍摄目标位置在所述彩色图像中的像素点与所述红外图像的像素点的对应关系。
步骤S103,将所述彩色图像中各像素点的亮度信息参数与所述红外图像中对应像素点的亮度信息参数合成,得到输出图像中对应像素点的亮度信息参数,将所述彩色图像中各像素点的色度信息参数作为输出图像中对应像素点的色度信息参数。
具体的,根据步骤S102提取的所述彩色图像和所述红外图像中像素点的颜色信息参数,可以将所述彩色图像中各像素点的亮度信息参数与所述红外图像中对应像素点的亮度信息参数合成,得到输出图像中对应像素点的亮度信息参数;另一方面,可以将所述彩色图像中各像素点的色度信息参数作为所述输出图像中对应像素点的色度信息参数,从而所述终端就可以确定所述输出图像中各像素点的亮度信息参数和色度信息参数,并根据所述输出图像的中各像素点的亮度信息参数和色度信息参数来保存、还原和呈现所述输出图像。所述红外图像比所述彩色图像中各像素点的亮度信息参数更准确,而所述彩色图像比所述红外图像中各像素点的色度信息参数更准确,通过合成之后,所述输出图像质量就可以得到改善。具体实施中,可以将所述红外图像中各像素点的Y分量Y1与所述彩色图像中对应像素点的Y分量Y2合成得到所述输出图像中对应像素点的Y分量Y3,将所述彩色图像中各像素点的U、V分量U1、V1作为输出图像中对应像素点的U、V分量U3、V3。例如,所述红外图像中某个像素点的Y分量Y1为95,所述彩色图像中对应像素点的Y分量Y2为42,U、V分量U1、V1分别为54、73,那么就可以合成所述输出图像中对应像素点的Y分量Y3为137,U、V分量U3、V3为54、73。
步骤S104,根据所述输出图像中各像素点的亮度信息参数和色度信息参数, 确定所述输出图像。
具体的,根据步骤S103中得到的所述输出图像中各像素点的亮度信息参数和色度信息参数,可以确定、保存和还原所述输出图像。具体实施中,根据所述输出图像的YUV参数Y3、U3、V3,可以根据用户的指令将所述输出图片进行存储或显示等操作。
本发明实施例通过获取第一摄像头拍摄的彩色图像和同一时间第二摄像头拍摄的红外图像,分别提取所述彩色图像和所述红外图像中各像素点的颜色信息参数,将所述彩色图像中各像素点的亮度信息参数与所述红外图像中对应像素点的亮度信息参数合成,得到输出图像中对应像素点的亮度信息参数,将所述彩色图像中各像素点的色度信息参数作为输出图像中对应像素点的色度信息参数,根据所述输出图像中各像素点的亮度信息参数和色度信息参数,确定所述输出图像,改善了弱光环境下图像的拍摄效果。
图2是本发明另一实施例中图像处理方法的流程示意图,如图所示本实施例中的方法流程可以包括:
步骤S201,确定拍摄环境的亮度低于预设的亮度阈值。
具体的,终端的摄像头等装置都具有感光元件可以检测拍摄环境周围的亮度,因此终端可以设置一个亮度阈值,当终端的感光元件检测到的周围环境的亮度值低于所述亮度阈值时,就可以启动双摄像头的弱光拍摄模式。
步骤S202,获取第一摄像头拍摄的彩色图像和同一时间第二摄像头拍摄的红外图像,所述第一摄像头与所述第二摄像头位于终端的同一侧。
具体方法可以参考步骤S101。
步骤S203,确定所述彩色图像与所述红外图像之间的位移差矢量。
具体的,由于第一摄像头和第二摄像头之间存在一定距离,第一摄像头拍摄的所述彩色图像和第二摄像头拍摄的所述红外图像就会存在一定的偏移,因此需要对所述彩色图像和所述红外图像进行图像配准,首先就需要确定所述彩色图像与所述红外图像之间的位移差矢量。具体实施中,所述终端通过检测所述彩色图像与所述红外图像的相似特征点,提取出至少一组参考特征点对;根据所述参考特征点对分别在所述彩色图像和所述红外图像上的参考坐标,确定所述彩色图像和所述红外图像的坐标映射关系;然后将所述映射关系转换成为 相应的位移差矢量。所述位移差矢量记录了所述彩色图像和所述红外图像在空间上相差的距离大小以及对应方向,是平移补偿时的重要参数。举最简单的例子来说,如图6所示,在平面X-Y坐标系中,所述彩色图像和所述红外图像的一组参考特征点对坐标为(1,1)和(2,2),那么得到其映射关系为X2=X1+1,Y2=Y1+1,然后根据该映射关系在得到如图所示的位移差矢量。
步骤S204,根据所述位移差矢量,对所述彩色图像与所述红外图像进行平移补偿。
具体的,确定所述位移差矢量之后,所述终端就可以根据该位移差矢量指向的方向与距离大小,对所述彩色图像和所述红外图像进行平移补偿,以确定针对同一拍摄目标位置在所述彩色图像中的像素点与所述红外图像的像素点的对应关系。对所述彩色图像以及所述红外图像的图像配准,可以是以所述红外图像为参照对所述彩色图像进行图像配准,也可以是以所述彩色图像为参照对所述红外图像进行图像配准。在具体实施中,可以以所述红外图像为参照对所述彩色图像进行平移补偿,即所述红外图像保持不动,只平移所述彩色图像;或者反过来,可以以所述彩色图像为参照对所述红外图像进行平移补偿,即所述彩色图像保持不动,只平移所述红外图像;另一方面,也可以设定一个参考坐标,将所述红外图像和所述彩色图像以所述参考坐标为参照进行平移补偿,即所述红外图像和所述彩色图像均向参考坐标的位置平移。由于前两者可以减少图像处理的时间和难度,因此这里选用前两者中的一个作为平移补偿的方法即可。
步骤S205,分别提取所述彩色图像和所述红外图像中各像素点在RGB颜色空间的RGB参数。
具体的,所述彩色图像和所述红外图像由一定数量的像素点组成,一般未经加工的原始图像的各像素点的颜色参数都是在RGB颜色空间的RGB参数,因此终端需要先提取所述彩色图像和所述红外图像中各像素点的RGB参数。需要说明的是,这里R、G和B是所述彩色图像在RGB颜色空间的颜色空间分量,分别代表了红、绿、蓝三原色光在每个像素点中所占的数值。不同的R、G和B数值可以代表不同的色度,同时也能反映出亮度的区别,因此通过提取所述RGB参数,可以得到所述彩色图像和所述红外图像中的各像素点的色度和亮度信息。
步骤S206,将所述彩色图像和所述红外图像中各像素点在RGB颜色空间的 RGB参数转换成YUV颜色空间的YUV参数,所述Y分量为亮度信息参数,所述U、V分量为色度信息参数。
具体的,所述RGB参数与所述YUV参数的转换公式如下:
Y=0.299*R+0.587*G+0.114*B
U=-0.147*R-0.289*G+0.436*B
V=0.615*R-0.515*G-0.100*B
在步骤S205提取到所述彩色图像和所述红外图像中的各像素点在RGB颜色空间的RGB参数后,就可以利用该组转换公式,将所述彩色图像和所述红外图像中各像素点在RGB颜色空间的RGB参数转换成YUV颜色空间的YUV参数,这样就可以对得到所述红外图像和所述彩色图像的各像素点的亮度信息参数和色度信息参数,以用于合成所述输出图像的颜色信息参数。
步骤S207,将所述彩色图像和所述红外图像中各像素点由所述RGB参数转换得到的所述YUV参数分别进行数位运算,以使所述转换得到的Y、U、V分量的范围在0~255之间。
具体的,基于整型运算比浮点运算快,逻辑位移比乘除运算快,终端可以将转换公式的每个单元乘以256转换成整型,再右移8位。这样,Y分量的范围便可以达到0~255,但是U分量的范围是-111.18~111.18,V分量的范围是-156.825~156.825,所以需要对U分量和V分量再加上128,使其范围也都处在0~255之间,便于计算机统一进行8位二进制的运算。需要说明的是,经过上述变换的V分量范围会有可能超出255,这样会造成图像的过曝,因此当所述V分量超出255时,终端自动将所述V分量默认为255。经过数位运算后所述RGB参数与所述YUV参数的转换公式如下:
Y=256*(0.299*R+0.587*G+0.114*B)>>8
U=256*(128-0.147*R-0.289*G+0.436*B)>>8
V=256*(128+0.615*R-0.515*G-0.100*B)>>8
步骤S208,将所述彩色图像中各像素点的亮度信息参数与所述红外图像中对应像素点的亮度信息参数合成,得到输出图像中对应像素点的亮度信息参数,将所述彩色图像中各像素点的色度信息参数作为输出图像中对应像素点的色度信息参数。
具体的,根据步骤S205~S207转换和提取的所述彩色图像和所述红外图像 中各像素点的YUV参数,终端可以将所述彩色图像中各像素点的Y分量与所述红外图像中经过图像配准后与所述彩色图像各像素点一一对应的像素点的Y分量合成,得到输出图像中对应像素点的Y分量;另一方面,可以将所述彩色图像中各像素点的U、V分量作为所述输出图像中对应像素点的U、V,从而所述终端就可以确定所述输出图像中各像素点的YUV参数,并根据所述输出图像的中各像素点的YUV参数来保存、还原和呈现所述输出图像。所述红外图像比所述彩色图像中各像素点的亮度信息参数更准确,而所述彩色图像比所述红外图像中各像素点的色度信息参数更准确,通过合成之后,所述输出图像质量就可以得到改善。例如,所述红外图像中某个像素点的Y分量Y1为95,所述彩色图像中对应像素点的Y分量Y2为42,U、V分量U1、V1分别为54、73,那么就可以合成所述输出图像中对应像素点的Y分量Y3为137,U、V分量U3、V3为54、73。
步骤S209,根据所述输出图像中各像素点的亮度信息参数和色度信息参数,确定所述输出图像。
具体的,根据步骤S208中得到的所述输出图像中各像素点的YUV参数,可以确定、保存和还原所述输出图像。具体实施中,根据所述输出图像的Y分量、U分量和V分量,可以根据用户的指令将所述输出图片进行存储或显示等操作。
本发明实施例通过获取第一摄像头拍摄的彩色图像和同一时间第二摄像头拍摄的红外图像,分别提取所述彩色图像和所述红外图像中各像素点的颜色信息参数,将所述彩色图像中各像素点的亮度信息参数与所述红外图像中对应像素点的亮度信息参数合成,得到输出图像中对应像素点的亮度信息参数,将所述彩色图像中各像素点的色度信息参数作为输出图像中对应像素点的色度信息参数,根据所述输出图像中各像素点的亮度信息参数和色度信息参数,确定所述输出图像,改善了弱光环境下图像的拍摄效果。
图3是本发明实施例中一种图像处理终端的组成示意图,如图所示本实施例中的终端可以包括:
图像获取模块310,用于获取第一摄像头拍摄的彩色图像和同一时间第二摄像头拍摄的红外图像,所述第一摄像头与所述第二摄像头位于终端的同一侧。
具体的,在收到用户的拍照指令之后,所述位于同一侧的第一摄像头与第二摄像头将进行取景拍照,所述第一摄像头与所述第二摄像头的相对位置可以是一上一下或者是一左一右,且两者的相对距离要能保证在拍摄过程中,所述第一摄像头与所述第二摄像头的取景范围、角度等拍摄参数都基本保持一致。所述第一摄像头为彩色摄像头,可以通过设置滤除红外线的彩色滤光镜,仅使环境中的白光透过所述第一摄像头到达传感器,使所述第一摄像头通过聚焦白光拍摄到彩色图像;所述第二摄像头为红外摄像头,可以通过设置滤除白光的红外滤光镜,仅使环境中的红外线透过所述第二摄像头到达传感器,使所述第二摄像头拍摄到被过滤掉白光的红外图像。之后,图像获取模块310获取所述第一摄像头拍摄的彩色图像和所述第二摄像头拍摄的红外图像,用于进一步提取像素点的参数。
参数提取模块320,用于分别提取所述彩色图像和所述红外图像中各像素点的颜色信息参数,所述颜色信息参数包括亮度信息参数和色度信息参数。
具体的,所述彩色图像和所述红外图像都是由一定数量的像素点组成的,所述各像素点都包含颜色信息参数,所述颜色信息参数包括亮度信息参数和色度信息参数,终端就是通过提取所述各像素点的颜色信息参数来保存和还原所述彩色图像和所述红外图像的。需要说明的是,这里所述彩色图像和所述红外图像的颜色信息参数均为YUV颜色空间的YUV参数,其中Y、U和V是所述红外图像在YUV颜色空间的颜色空间分量,分别代表了每个像素点的亮度分量Y和色度分量U、V。
进一步的,所述参数提取模块320包括:RGB单元321和YUV单元322,如图4所示。
RGB单元321,用于分别提取所述彩色图像和所述红外图像中各像素点在RGB颜色空间的RGB参数。
具体的,所述彩色图像和所述红外图像由一定数量的像素点组成,一般未经加工的原始图像的各像素点的颜色参数都是在RGB颜色空间的RGB参数,因此RGB单元321需要先提取所述彩色图像和所述红外图像中各像素点的RGB参数。需要说明的是,这里R、G和B是所述彩色图像在RGB颜色空间的颜色空间分量,分别代表了红、绿、蓝三原色光在每个像素点中所占的数值。不同的R、G和B数值可以代表不同的色度,同时也能反映出亮度的区别,因此通 过提取所述RGB参数,可以得到所述彩色图像和所述红外图像中的各像素点的色度和亮度信息。
YUV单元322,用于将所述彩色图像和所述红外图像中各像素点在RGB颜色空间的RGB参数转换成YUV颜色空间的YUV参数,所述Y分量为亮度信息参数,所述U、V分量为色度信息参数。
具体的,所述RGB参数与所述YUV参数的转换公式如下:
Y=0.299*R+0.587*G+0.114*B
U=-0.147*R-0.289*G+0.436*B
V=0.615*R-0.515*G-0.100*B
在RGB单元321提取到所述彩色图像和所述红外图像中的各像素点在RGB颜色空间的RGB参数后,YUV单元322就可以利用该组转换公式,将所述彩色图像和所述红外图像中各像素点在RGB颜色空间的RGB参数转换成YUV颜色空间的YUV参数,这样就可以对得到所述红外图像和所述彩色图像的各像素点的亮度信息参数和色度信息参数,以用于合成所述输出图像的颜色信息参数。
合成模块330,用于将所述彩色图像中各像素点的亮度信息参数与所述红外图像中对应像素点的亮度信息参数合成,得到输出图像中对应像素点的亮度信息参数,将所述彩色图像中各像素点的色度信息参数作为输出图像中对应像素点的色度信息参数。
具体的,根据参数提取模块320提取的所述彩色图像和所述红外图像中像素点的颜色信息参数,可以将所述彩色图像中各像素点的亮度信息参数与所述红外图像中对应像素点的亮度信息参数合成,得到输出图像中对应像素点的亮度信息参数;另一方面,可以将所述彩色图像中各像素点的色度信息参数作为所述输出图像中对应像素点的色度信息参数,从而合成模块330就可以确定所述输出图像中各像素点的亮度信息参数和色度信息参数,并根据所述输出图像的中各像素点的亮度信息参数和色度信息参数来保存、还原和呈现所述输出图像。所述红外图像比所述彩色图像中各像素点的亮度信息参数更准确,而所述彩色图像比所述红外图像中各像素点的色度信息参数更准确,通过合成之后,所述输出图像质量就可以得到改善。具体实施中,可以将所述红外图像中各像素点的Y分量Y1与所述彩色图像中对应像素点的Y分量Y2合成得到所述输出图像中对应像素点的Y分量Y3,将所述彩色图像中各像素点的U、V分量U1、V1作 为输出图像中对应像素点的U、V分量U3、V3。例如,所述红外图像中某个像素点的Y分量Y1为95,所述彩色图像中对应像素点的Y分量Y2为42,U、V分量U1、V1分别为54、73,那么就可以合成所述输出图像中对应像素点的Y分量Y3为137,U、V分量U3、V3为54、73。
输出图像模块340,用于根据所述输出图像中各像素点的亮度信息参数和色度信息参数,确定所述输出图像。
具体的,根据合成模块330中得到的所述输出图像中各像素点的亮度信息参数和色度信息参数,输出图像模块340可以确定、保存和还原所述输出图像。具体实施中,根据所述输出图像的YUV参数Y3、U3、V3,输出图像模块340可以根据用户的指令将所述输出图片进行存储或显示等操作。
亮度模块350,用于确定拍摄环境的亮度低于预设的亮度阈值。
具体的,终端的摄像头等装置都具有感光元件可以检测拍摄环境周围的亮度,因此亮度模块350可以设置一个亮度阈值,当终端的感光元件检测到的周围环境的亮度值低于所述亮度阈值时,就可以启动双摄像头的弱光拍摄模式。
运算模块360,用于将所述彩色图像和所述红外图像中各像素点由所述RGB参数转换得到的所述YUV参数分别进行数位运算,以使所述转换得到的Y、U、V分量的范围在0~255之间。
具体的,基于整型运算比浮点运算快,逻辑位移比乘除运算快,运算模块360可以将转换公式的每个单元乘以256转换成整型,再右移8位。这样,Y分量的范围便可以达到0~255,但是U分量的范围是-111.18~111.18,V分量的范围是-156.825~156.825,所以需要对U分量和V分量再加上128,使其范围也都处在0~255之间,便于计算机统一进行8位二进制的运算。需要说明的是,经过上述变换的V分量范围会有可能超出255,这样会造成图像的过曝,因此当所述V分量超出255时,运算模块360自动将所述V分量默认为255。经过数位运算后所述RGB参数与所述YUV参数的转换公式如下:
Y=256*(0.299*R+0.587*G+0.114*B)>>8
U=256*(128-0.147*R-0.289*G+0.436*B)>>8
V=256*(128+0.615*R-0.515*G-0.100*B)>>8
闪光模块370,用于分别通过所述第一摄像头和所述第二摄像头拍摄所述彩色图像和所述红外图像时开启闪光灯向拍摄方向照射辅助光,所述辅助光包括 白光和红外光。
具体的,当终端感应到环境的亮度过低时,闪光模块370可以分别通过所述第一摄像头和所述第二摄像头拍摄所述彩色图像和所述红外图像时开启闪光灯向拍摄方向照射辅助光,所述辅助光包括白光和红外线。由于滤光镜的存在,两种光互相不会对拍摄的所述彩色图像和所述红外图像产生干扰,因此白光只可以给第一摄像头补光,红外线只可以给第二摄像头补光,以提高拍摄环境的亮度。
配准模块380,用于对所述彩色图像以及所述红外图像进行图像配准,以确定针对同一拍摄目标位置在所述彩色图像中的像素点与所述红外图像的像素点的对应关系。
具体的,由于第一摄像头和第二摄像头之间存在一定距离,第一摄像头拍摄的所述彩色图像和第二摄像头拍摄的所述红外图像就会存在一定的偏移,因此需要对所述彩色图像和所述红外图像进行图像配准。
进一步的,所述配准模块380包括:位移差单元381和补偿单元382,如图5所示。
位移差单元381,用于确定所述彩色图像与所述红外图像之间的位移差矢量。
具体的,所述位移差单元381通过检测所述彩色图像与所述红外图像的相似特征点,提取出至少一组参考特征点对;根据所述参考特征点对分别在所述彩色图像和所述红外图像上的参考坐标,确定所述彩色图像和所述红外图像的坐标映射关系;然后将所述映射关系转换成为相应的位移差矢量。所述位移差矢量记录了所述彩色图像和所述红外图像在空间上相差的距离大小以及对应方向,是平移补偿时的重要参数。举最简单的例子来说,如图6所示,在平面X-Y坐标系中,所述彩色图像和所述红外图像的一组参考特征点对坐标为(1,1)和(2,2),那么得到其映射关系为X2=X1+1,Y2=Y1+1,然后根据该映射关系在得到如图所示的位移差矢量。
补偿单元382,用于根据所述位移差矢量,对所述彩色图像与所述红外图像进行平移补偿。
具体的,确定所述位移差矢量之后,所述补偿单元382就可以根据该位移差矢量指向的方向与距离大小,对所述彩色图像和所述红外图像进行平移补偿,以确定针对同一拍摄目标位置在所述彩色图像中的像素点与所述红外图像的像 素点的对应关系。对所述彩色图像以及所述红外图像的图像配准,可以是以所述红外图像为参照对所述彩色图像进行图像配准,也可以是以所述彩色图像为参照对所述红外图像进行图像配准。在具体实施中,可以以所述红外图像为参照对所述彩色图像进行平移补偿,即所述红外图像保持不动,只平移所述彩色图像;或者反过来,可以以所述彩色图像为参照对所述红外图像进行平移补偿,即所述彩色图像保持不动,只平移所述红外图像;另一方面,也可以设定一个参考坐标,将所述红外图像和所述彩色图像以所述参考坐标为参照进行平移补偿,即所述红外图像和所述彩色图像均向参考坐标的位置平移。由于前两者可以减少图像处理的时间和难度,因此这里选用前两者中的一个作为平移补偿的方法即可。
本发明实施例通过获取第一摄像头拍摄的彩色图像和同一时间第二摄像头拍摄的红外图像,分别提取所述彩色图像和所述红外图像中各像素点的颜色信息参数,将所述彩色图像中各像素点的亮度信息参数与所述红外图像中对应像素点的亮度信息参数合成,得到输出图像中对应像素点的亮度信息参数,将所述彩色图像中各像素点的色度信息参数作为输出图像中对应像素点的色度信息参数,根据所述输出图像中各像素点的亮度信息参数和色度信息参数,确定所述输出图像,改善了弱光环境下图像的拍摄效果。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。

Claims (16)

  1. 一种图像处理方法,其特征在于,所述方法包括:
    获取第一摄像头拍摄的彩色图像和同一时间第二摄像头拍摄的红外图像,所述第一摄像头与所述第二摄像头位于终端的同一侧;
    分别提取所述彩色图像和所述红外图像中各像素点的颜色信息参数,所述颜色信息参数包括亮度信息参数和色度信息参数;
    将所述彩色图像中各像素点的亮度信息参数与所述红外图像中对应像素点的亮度信息参数合成,得到输出图像中对应像素点的亮度信息参数,将所述彩色图像中各像素点的色度信息参数作为输出图像中对应像素点的色度信息参数;
    根据所述输出图像中各像素点的亮度信息参数和色度信息参数,确定所述输出图像。
  2. 如权利要求1所述的图像处理方法,其特征在于,所述获取第一摄像头拍摄的彩色图像和同一时间第二摄像头拍摄的红外图像之前还包括:
    确定拍摄环境的亮度低于预设的亮度阈值。
  3. 如权利要求1所述的图像处理方法,其特征在于,所述颜色信息参数为YUV颜色空间的YUV参数;
    所述分别提取所述彩色图像和所述红外图像中各像素点的颜色信息参数包括:
    分别提取所述彩色图像和所述红外图像中各像素点在RGB颜色空间的RGB参数;
    将所述彩色图像和所述红外图像中各像素点在RGB颜色空间的RGB参数转换成YUV颜色空间的YUV参数,所述Y分量为亮度信息参数,所述U、V分量为色度信息参数。
  4. 如权利要求3所述的图像处理方法,其特征在于,所述将所述彩色图像和所述红外图像中的各像素点在RGB颜色空间的RGB参数转换成YUV颜色空间的YUV参数之后还包括:
    将所述彩色图像和所述红外图像中各像素点由所述RGB参数转换得到的所述YUV参数分别进行数位运算,以使所述转换得到的Y、U、V分量的范围在0~255之间。
  5. 如权利要求1所述的图像处理方法,其特征在于,所述方法还包括:
    分别通过所述第一摄像头和所述第二摄像头拍摄所述彩色图像和所述红外图像时开启闪光灯向拍摄方向照射辅助光,所述辅助光包括白光和红外光。
  6. 如权利要求1所述的图像处理方法,其特征在于,所述分别提取所述彩色图像和所述红外图像中的各像素点的颜色信息参数之前还包括:
    对所述彩色图像以及所述红外图像进行图像配准,以确定针对同一拍摄目标位置在所述彩色图像中的像素点与所述红外图像的像素点的对应关系。
  7. 如权利要求6所述的图像处理方法,其特征在于,所述对所述彩色图像以及所述红外图像进行图像配准包括:
    确定所述彩色图像与所述红外图像之间的位移差矢量;
    根据所述位移差矢量,对所述彩色图像与所述红外图像进行平移补偿。
  8. 如权利要求6所述的图像处理方法,其特征在于,所述对所述彩色图像以及所述红外图像进行图像配准包括:以所述红外图像为参照对所述彩色图像进行图像配准,或以所述彩色图像为参照对所述红外图像进行图像配准。
  9. 一种图像处理终端,其特征在于,所述终端包括:
    图像获取模块,用于获取第一摄像头拍摄的彩色图像和同一时间第二摄像头拍摄的红外图像,所述第一摄像头与所述第二摄像头位于终端的同一侧;
    参数提取模块,用于分别提取所述彩色图像和所述红外图像中各像素点的颜色信息参数,所述颜色信息参数包括亮度信息参数和色度信息参数;
    合成模块,用于将所述彩色图像中各像素点的亮度信息参数与所述红外图像中对应像素点的亮度信息参数合成,得到输出图像中对应像素点的亮度信息参数,将所述彩色图像中各像素点的色度信息参数作为输出图像中对应像素点 的色度信息参数;
    输出图像模块,用于根据所述输出图像中各像素点的亮度信息参数和色度信息参数,确定所述输出图像。
  10. 如权利要求9所述的图像处理终端,其特征在于,所述终端还包括:
    亮度模块,用于确定拍摄环境的亮度低于预设的亮度阈值。
  11. 如权利要求9所述的图像处理终端,其特征在于,所述颜色信息参数为YUV颜色空间的YUV参数;
    所述参数提取模块包括:
    RGB单元,用于分别提取所述彩色图像和所述红外图像中各像素点在RGB颜色空间的RGB参数;
    YUV单元,用于将所述彩色图像和所述红外图像中各像素点在RGB颜色空间的RGB参数转换成YUV颜色空间的YUV参数,所述Y分量为亮度信息参数,所述U、V分量为色度信息参数。
  12. 如权利要求11所述的图像处理终端,其特征在于,所述终端还包括:
    运算模块,用于将所述彩色图像和所述红外图像中各像素点由所述RGB参数转换得到的所述YUV参数分别进行数位运算,以使所述转换得到的Y、U、V分量的范围在0~255之间。
  13. 如权利要求9所述的图像处理终端,其特征在于,所述终端还包括:
    闪光模块,用于分别通过所述第一摄像头和所述第二摄像头拍摄所述彩色图像和所述红外图像时开启闪光灯向拍摄方向照射辅助光,所述辅助光包括白光和红外光。
  14. 如权利要求9所述的图像处理终端,其特征在于,所述终端还包括:
    配准模块,用于对所述彩色图像以及所述红外图像进行图像配准,以确定针对同一拍摄目标位置在所述彩色图像中的像素点与所述红外图像的像素点的对应关系。
  15. 如权利要求14所述的图像处理终端,其特征在于,所述配准模块包括:
    位移差单元,用于确定所述彩色图像与所述红外图像之间的位移差矢量;
    补偿单元,用于根据所述位移差矢量,对所述彩色图像与所述红外图像进行平移补偿。
  16. 如权利要求14所述的图像处理终端,其特征在于,所述对所述彩色图像以及所述红外图像进行图像配准包括:以所述红外图像为参照对所述彩色图像进行图像配准,或以所述彩色图像为参照对所述红外图像进行图像配准。
PCT/CN2015/088478 2015-07-16 2015-08-30 一种图像处理方法及终端 Ceased WO2017008377A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510418507.3A CN105554483B (zh) 2015-07-16 2015-07-16 一种图像处理方法及终端
CN201510418507.3 2015-07-16

Publications (1)

Publication Number Publication Date
WO2017008377A1 true WO2017008377A1 (zh) 2017-01-19

Family

ID=55833394

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/088478 Ceased WO2017008377A1 (zh) 2015-07-16 2015-08-30 一种图像处理方法及终端

Country Status (2)

Country Link
CN (1) CN105554483B (zh)
WO (1) WO2017008377A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113747046A (zh) * 2020-05-29 2021-12-03 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106197683B (zh) * 2016-08-17 2019-03-29 湖北南邦创电科技有限公司 一种便携智能红外测温系统
CN106572246B (zh) * 2016-10-31 2020-11-17 太仓市昊博技术服务有限公司 一种摄像头开启装置、终端及摄像头开启方法
CN106454123B (zh) * 2016-11-25 2019-02-22 盐城丝凯文化传播有限公司 一种拍照对焦的方法及移动终端
CN107871346B (zh) * 2016-12-19 2020-10-27 珠海市杰理科技股份有限公司 行车记录仪
CN107872616B (zh) * 2016-12-19 2021-03-19 珠海市杰理科技股份有限公司 行车记录方法及装置
CN109040534A (zh) * 2017-06-12 2018-12-18 杭州海康威视数字技术股份有限公司 一种图像处理方法及图像采集设备
CN107483811A (zh) * 2017-07-28 2017-12-15 广东欧珀移动通信有限公司 成像方法和电子装置
TWI637352B (zh) 2017-08-23 2018-10-01 緯創資通股份有限公司 影像處理裝置和方法
CN107566746B (zh) * 2017-09-12 2020-09-04 广东小天才科技有限公司 一种拍照方法及用户终端
CN109729256B (zh) * 2017-10-31 2020-10-23 比亚迪股份有限公司 车辆中双摄像装置的控制方法和装置
CN108416333B (zh) * 2018-03-30 2020-01-17 百度在线网络技术(北京)有限公司 图像处理的方法和装置
CN111970432A (zh) * 2019-05-20 2020-11-20 华为技术有限公司 一种图像处理方法及图像处理装置
CN118264914A (zh) * 2020-03-20 2024-06-28 华为技术有限公司 一种摄像装置
CN111479075B (zh) * 2020-04-02 2022-07-19 青岛海信移动通信技术股份有限公司 拍照终端及其图像处理方法
CN113874909A (zh) * 2020-04-03 2021-12-31 深圳市大疆创新科技有限公司 图像处理方法及设备、摄像装置、可移动设备、计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067710A (zh) * 2006-01-20 2007-11-07 红外线解决方案公司 具有可见光与红外图像混合的相机
WO2009133931A1 (ja) * 2008-04-30 2009-11-05 コニカミノルタオプト株式会社 撮像装置及び撮像素子
CN101727665A (zh) * 2008-10-27 2010-06-09 广州飒特电力红外技术有限公司 红外图像和可见光图像融合的方法及装置
CN102461156A (zh) * 2009-06-03 2012-05-16 弗莱尔系统公司 用于双传感器应用的红外相机系统和方法
CN103986874A (zh) * 2014-05-29 2014-08-13 宇龙计算机通信科技(深圳)有限公司 一种图像获取装置、图像获取方法及终端

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI504253B (zh) * 2013-01-10 2015-10-11 Realtek Semiconductor Corp 使用場景偵測之白平衡調整方法及其裝置
CN104661008B (zh) * 2013-11-18 2017-10-31 深圳中兴力维技术有限公司 低照度条件下彩色图像质量提升的处理方法和装置
CN104217413A (zh) * 2014-09-11 2014-12-17 昆明云锗高新技术有限公司 可见光图像上叠加红外光图像的方法
CN104573811A (zh) * 2015-01-08 2015-04-29 杭州天迈网络有限公司 一种红外图像和彩色图像融合的人流量统计方法
CN104751432B (zh) * 2015-03-09 2017-06-16 电子科技大学 一种基于图像重构的可见光与红外图像融合方法
CN104780313A (zh) * 2015-03-26 2015-07-15 广东欧珀移动通信有限公司 一种图像处理的方法及移动终端

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067710A (zh) * 2006-01-20 2007-11-07 红外线解决方案公司 具有可见光与红外图像混合的相机
WO2009133931A1 (ja) * 2008-04-30 2009-11-05 コニカミノルタオプト株式会社 撮像装置及び撮像素子
CN101727665A (zh) * 2008-10-27 2010-06-09 广州飒特电力红外技术有限公司 红外图像和可见光图像融合的方法及装置
CN102461156A (zh) * 2009-06-03 2012-05-16 弗莱尔系统公司 用于双传感器应用的红外相机系统和方法
CN103986874A (zh) * 2014-05-29 2014-08-13 宇龙计算机通信科技(深圳)有限公司 一种图像获取装置、图像获取方法及终端

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113747046A (zh) * 2020-05-29 2021-12-03 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备

Also Published As

Publication number Publication date
CN105554483B (zh) 2018-05-15
CN105554483A (zh) 2016-05-04

Similar Documents

Publication Publication Date Title
CN105554483B (zh) 一种图像处理方法及终端
CN105578063B (zh) 一种图像处理方法和终端
US10645268B2 (en) Image processing method and apparatus of terminal, and terminal
JP4008778B2 (ja) 撮像装置
US8948505B2 (en) Image processing apparatus, image processing method, program and imaging apparatus
CN105049718A (zh) 一种图像处理方法及终端
CN105874786B (zh) 图像处理装置、图像处理方法和计算机可读记录介质
CN104469191B (zh) 图像降噪的方法及其装置
US12262156B2 (en) White balance processing method and electronic device
CN108012078A (zh) 图像亮度处理方法、装置、存储介质和电子设备
CN102572286A (zh) 摄影装置、摄影方法和程序
CN107911683A (zh) 图像白平衡处理方法、装置、存储介质和电子设备
CN104660905A (zh) 拍照处理方法及装置
CN107911682A (zh) 图像白平衡处理方法、装置、存储介质和电子设备
KR20110016505A (ko) 컬러 조정
WO2023151210A1 (zh) 图像处理方法、电子设备及计算机可读存储介质
CN111866369B (zh) 图像处理方法及装置
CN107948617A (zh) 图像处理方法、装置、计算机可读存储介质和计算机设备
CN107948511A (zh) 图像亮度处理方法、装置、存储介质和电子设备
US12052516B2 (en) Flexible region of interest color processing for cameras
KR20140106221A (ko) 다수 이미지 센서를 이용한 촬영방법 및 장치
JP2021182672A (ja) 画像処理装置、画像処理方法、及びプログラム
CN107682611B (zh) 对焦的方法、装置、计算机可读存储介质和电子设备
CN107920205B (zh) 图像处理方法、装置、存储介质和电子设备
US20100079582A1 (en) Method and System for Capturing and Using Automatic Focus Information

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15898104

Country of ref document: EP

Kind code of ref document: A1