WO2016044983A1 - Image processing method and apparatus and electronic device - Google Patents

Image processing method and apparatus and electronic device Download PDF

Info

Publication number
WO2016044983A1
WO2016044983A1 PCT/CN2014/087131 CN2014087131W WO2016044983A1 WO 2016044983 A1 WO2016044983 A1 WO 2016044983A1 CN 2014087131 W CN2014087131 W CN 2014087131W WO 2016044983 A1 WO2016044983 A1 WO 2016044983A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
roi
display
frame
user operation
Prior art date
Application number
PCT/CN2014/087131
Other languages
French (fr)
Chinese (zh)
Inventor
朱聪超
罗巍
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2014/087131 priority Critical patent/WO2016044983A1/en
Publication of WO2016044983A1 publication Critical patent/WO2016044983A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/81Camera processing pipelines; Components thereof for suppressing or minimising disturbance in the image signal generation

Definitions

  • the present invention relates to the field of image processing, and in particular, to an image processing method, apparatus, and electronic device.
  • the ratio of the maximum value to the minimum value of the brightness of the visible area of the image is the dynamic range of the image (Dynamic Range). If the dynamic range of the image is too small, the details of the dark or bright areas of the image will be lost, resulting in poorer image quality.
  • the dynamic range of the image is fixed without artificial editing of the image, and the difference between the pixels in the image is fixed.
  • the user often only views the image of one area in the whole image.
  • the area is the area of interest to the user, and define the area image as the Region Of Interest (ROI) image of the user.
  • the user can enlarge the image to display only the ROI image.
  • the ROI image is enlarged, the brightness value of each pixel in the ROI image is constant, and the relative brightness between the pixels is not As a result, the dynamic range of the ROI image has not been improved and the display quality is poor.
  • the embodiment of the present application provides an image processing method, device, and electronic device for solving the problem of poor display quality of a ROI image of a user's region of interest.
  • an embodiment of the present application provides an image processing method, where the method includes:
  • Performing dynamic range processing on the ROI image, and obtaining a display quality of the processed image is better than a display quality of the ROI image;
  • the processed image is displayed.
  • the display image is a low dynamic range image LDRI compressed by a high dynamic range image HDRI
  • the dynamic range of the ROI image is performed Processing, including:
  • determining, by the user, the area of interest ROI image from the display image includes:
  • a user operation is detected, and the ROI image is determined from the display image according to the user operation.
  • detecting a user operation determining the ROI image from the display image according to the user operation, including :
  • Detecting the user operation determining that an image portion corresponding to the user operation in the display image is the ROI image, and the user operation includes any one of a zoom operation, a drag operation, and a selection operation.
  • determining, by the user, the area of interest ROI image from the display image includes:
  • Determining that the image portion of the display image including the preset feature image is the ROI image.
  • an embodiment of the present application provides an image processing method, where the method includes:
  • an exposure time of any two of the at least two frames of images is different.
  • determining a ROI image of the user region of interest on each of the at least two frames of images includes:
  • Detecting a user operation determining an ROI image on each of the at least two frames of images according to the user operation;
  • detecting a user operation determining, according to the user operation, each frame image of the at least two frames of images ROI images, including:
  • Detecting the user operation determining that an image portion corresponding to the user operation in the first frame image is an ROI image of the first frame image; and the user operation includes a zoom operation, a drag operation, and a selection operation Any kind of operation;
  • Determining, in each frame other than the first frame image, the area image corresponding to the ROI image position in the first frame image in the at least two frames of images is an ROI image.
  • an image processing apparatus including:
  • a determining module configured to determine a ROI image of the user's region of interest from the display image
  • An image processing module configured to perform dynamic range processing on the ROI image, and obtain a display quality of the processed image that is better than a display quality of the ROI image;
  • a display module for displaying the processed image.
  • the display image is a low dynamic range image LDRI compressed by a high dynamic range image HDRI
  • the image processing module is specifically configured to: determine And outputting an area image corresponding to the location of the ROI image in the HDRI; and performing dynamic range compression on the determined area image, and obtaining a compressed image as the processed image, where a dynamic range of the compressed image is greater than Or equal to the dynamic range of the ROI image.
  • the determining module is specifically configured to: detect a user operation, according to the user operation The ROI image is determined on the display image.
  • the determining module is specifically configured to: detect the user operation, determine a location in the display image
  • the image portion corresponding to the user operation is the ROI image, and the user operation includes any one of a zoom operation, a drag operation, and a selected operation.
  • the determining module is specifically configured to: determine that the display image includes a preset feature image The image portion is the ROI image.
  • an image processing apparatus including:
  • a determining module configured to determine a ROI image of a user region of interest on each of the at least two frames of images when displaying the first frame image of the at least two frames of images for the same scene;
  • a determining module configured to determine whether there is a second frame image in the at least two frames of images, where the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image included in the first frame image;
  • a display module configured to switch from displaying the first frame image to displaying an ROI image in the second frame image when the second frame image is present.
  • an exposure time of any two of the at least two frames of images is different.
  • the determining module is specifically configured to: detect a user operation, and determine, according to the user operation, each frame image of the at least two frames of images The ROI image; or determining that the image portion of the at least two frames of the image including the preset feature image is an ROI image.
  • the determining module is specifically configured to: detect the user operation, determine that the first frame image is The image portion corresponding to the user operation is an ROI image of the first frame image;
  • the user operation includes any one of a zoom operation, a drag operation, and a selected operation; and is configured to determine an image of the first frame in each frame except the first frame image in the at least two frames of images
  • the area image corresponding to the ROI image position in the middle is an ROI image.
  • an electronic device including:
  • a memory for storing instructions
  • a processor configured to execute the instruction, determine a ROI image of a region of interest of the user from the display image; perform dynamic range processing on the ROI image, and obtain a display quality of the processed image that is better than display of the ROI image Quality; display the processed image;
  • An output device for displaying an image according to an indication of the processor.
  • the display image is a low dynamic range image LDRI compressed by a high dynamic range image HDRI
  • the processor is configured to use the ROI image Performing dynamic range processing, specifically: determining an area image corresponding to the ROI image position in the HDRI; performing dynamic range compression on the determined area image, and obtaining the compressed image as the processed image,
  • the dynamic range of the compressed image is greater than or equal to the dynamic range of the ROI image.
  • the processor is configured to determine, by using a display image, a ROI image of a user's region of interest, specifically To: detect a user operation, and determine the ROI image from the display image according to the user operation.
  • the processor is configured to detect a user operation, and determine, according to the user operation, the display image
  • the ROI image is specifically configured to: detect the user operation, determine that an image portion corresponding to the user operation in the display image is the ROI image, and the user operation includes a zoom operation, a drag operation, and a selection operation. Any kind of operation.
  • the processor is configured to determine, by using a display image, a ROI image of a user's region of interest, specifically a method for determining that an image portion of the display image that includes a preset feature image is The ROI image is described.
  • an electronic device including:
  • a memory for storing instructions
  • a processor configured to execute, when displaying the first frame image of the at least two frames of images for the same scene, determining a ROI image of the user region of interest on each of the at least two frames of images; Determining whether there is a second frame image in the at least two frames of images, wherein the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image included in the first frame image; if present, Displaying that the first frame image is switched to display an ROI image in the second frame image;
  • An output device for displaying an image according to an indication of the processor.
  • an exposure time of any two of the at least two frames of images is different.
  • the processor is configured to determine a ROI image of a user region of interest on each of the at least two frames of images, specifically: detecting a user operation, determining, according to the user operation, an ROI image on each of the at least two frames of images; or determining that an image portion of each of the at least two frames of images that includes the preset feature image is ROI image.
  • the processor is specifically configured to detect a user operation, and determine the at least two frames of images according to the user operation
  • the ROI image on each frame of the image is specifically: detecting the user operation, determining that the image portion corresponding to the user operation in the first frame image is an ROI image of the first frame image;
  • the user operation includes any one of a zoom operation, a drag operation, and a selected operation; determining an ROI in each frame other than the first frame image and the first frame image in the at least two frames of images
  • the area image corresponding to the image position is an ROI image.
  • the electronic device can determine the ROI image in the display image and compare the ROI The image is subjected to dynamic range processing. Since the obtained dynamic range of the processed image is larger, or the brightness value of the pixel in the processed image is more reasonable, the display quality of the processed image is superior to the ROI image in the LDRI. The user can view an image of a region of interest that displays better quality.
  • FIG. 1 is a schematic diagram of main processes of an image processing method in Embodiment 1 of the present application.
  • FIG. 2 is a schematic diagram of a refinement process of an image processing method in Embodiment 1 of the present application;
  • FIG. 3 is a schematic flowchart of another refinement of an image processing method in Embodiment 1 of the present application.
  • FIG. 5 is a schematic flowchart of an image processing method in Embodiment 2 of the present application.
  • FIG. 6 is a schematic flowchart of application example 2 in an embodiment of the present application.
  • FIG. 7 is a schematic block diagram showing the structure of an image processing apparatus in Embodiment 3 of the present application.
  • FIG. 8 is a schematic block diagram showing the structure of an image processing apparatus according to Embodiment 4 of the present application.
  • FIG. 9 is a schematic block diagram showing the main structure of an electronic device in Embodiment 5 of the present application.
  • FIG. 10 is a schematic block diagram showing a detailed structure of an electronic device in Embodiment 5 of the present application.
  • FIG. 11 is a schematic block diagram showing the main structure of an electronic device in Embodiment 6 of the present application.
  • FIG. 12 is a schematic block diagram showing the detailed structure of an electronic device in Embodiment 6 of the present application.
  • the dynamic range of display devices is very small, generally around 100:1, even so-called high dynamics
  • the range display device has a dynamic range of only 500:1, while the High Dynamic Range Imaging (HDRI) has a dynamic range of 216:1. Therefore, to display the HDRI on the display device, dynamic range compression of the HDRI is required to obtain a Low Dynamic Range Imaging (LDRI) that the display device can display.
  • LDRI Low Dynamic Range Imaging
  • the hHDR mapping technique is usually used to compress the HDRI into LDRI.
  • the gradation mapping technology specifically includes a global mapping algorithm and a local mapping algorithm.
  • the global mapping algorithm treats the entire HDRI image as a whole, and uses the same luminance mapping for each pixel, and can be divided into a linear mapping algorithm and a nonlinear mapping algorithm.
  • the local mapping algorithm should take into account the positional features of the pixels and the influence between the pixels, and take different treatments for the pixels in different regions.
  • the display quality of the whole image is considered. Therefore, the gradation mapping algorithm used is for the whole image, and there is no image specifically for the user's region of interest in the image. Therefore, the image of the user's region of interest in the HDRI has a low display quality of the compressed image obtained under the gradation mapping algorithm.
  • the display quality of the ROI image is not good.
  • the display device displays the brightness of an image with 8-bit data
  • the brightness value of the pixel having the highest brightness in the displayed LDRI is 255
  • the brightness value of the pixel having the smallest brightness is 0.
  • the luminance value of the pixel with the highest brightness in the ROI image of the user in the LDRI is 200
  • the brightness value of the pixel with the smallest brightness is 50
  • the dynamic range of the ROI image is only 200:50.
  • An embodiment of the present application provides an image processing method, after determining an ROI image that is of interest to a user from a display image, performing dynamic range processing on the ROI image, so that the dynamic range of the processed image is improved, or The brightness value of the image is more reasonable, and the ROI image is improved. Quality is displayed to meet the needs of users to view ROI images with high display quality.
  • FIG. 1 is a schematic flowchart diagram of an image processing method according to Embodiment 1 of the present application, where the process includes the following steps:
  • Step 101 Determine a ROI image of a region of interest of the user from the display image.
  • Step 102 Perform dynamic range processing on the ROI image, and obtain a display quality of the processed image that is better than a display quality of the ROI image.
  • Step 103 Display the processed image.
  • the image processing method in the embodiment of the present application is applicable to an electronic device having a display unit and capable of displaying an image, such as a digital camera, a smart phone, a tablet computer, a notebook computer, a smart watch, a smart TV, and the like.
  • the electronic device may determine the ROI image from the displayed image in various manners, including but not limited to the following manners:
  • Mode 1 detecting a user operation, and determining an ROI image from the display image according to a user operation.
  • the electronic device When the electronic device displays an image, the user can operate on the image, and after detecting the user operation, the electronic device determines that the image portion corresponding to the user operation in the display image is an ROI image, wherein the user operation may include a zoom operation, Drag operation, select any one of the operations.
  • the electronic device When the electronic device displays an image, the user can perform an enlargement operation on the image, and the electronic device, in response to the zooming operation, displays an image of a partial region in the currently displayed image, which is a local region to be displayed in response to the zoom-in operation.
  • the image corresponds to the user's zoom operation ROI image.
  • the electronic device displays the first partial area image of an image
  • the user may perform an enlargement operation on the image
  • the electronic device displays an image of a partial area in the first partial area image in response to the zooming operation.
  • the image of the local area to be displayed in response to the enlargement operation is the ROI image corresponding to the user's enlargement operation.
  • the electronic device when the electronic device displays the first partial area image of an image, the user may perform a zoom-out operation on the image, and the electronic device, in response to the zoom-out operation, displays the second image in the electronic device including the first partial area image.
  • Partial area image or whole image when the reduction operation is sufficiently large, the electronic device will display the entire image in response to the reduction operation), the second partial area image or the entire image to be displayed in response to the reduction operation This is the ROI image corresponding to the user's zoom out operation.
  • the display screen When the electronic device displays an image that is enlarged to a certain ratio, the display screen only displays the first partial region image of the entire image, and the user can perform a drag operation on the image, and the electronic device responds to the drag operation.
  • the current zoom ratio is maintained, and the first partial area image is switched to display the second partial area image.
  • the second partial area to be displayed in response to the drag operation is the ROI image corresponding to the user drag operation.
  • an electronic device displays an image
  • the electronic device displays an area image in the entire image on the display screen in response to the user operation (wherein When the user performs a reduction operation with a sufficiently large reduction, the electronic device will display the entire image), and the ROI image is the image of the area to be displayed.
  • the zoom operation and the drag operation are specifically limited by the user, which may be a method of touching a touch screen or a touch panel, or an external input device such as a mouse or a somatosensory device. the way.
  • the zoom operation it can be realized by scrolling the mouse wheel, or by changing the distance between the touch points when the touch screen is touched at two points;
  • the drag operation by moving the mouse when the left button is pressed, It can be realized by moving the touch point when single-touching.
  • the user can perform a selection operation to make a partial region image in the image in a selected state, and the image portion in the selected state is an ROI image corresponding to the selected state.
  • the manner in which the user specifically performs the selection operation is not limited, and the method may be a manner in which the user touches the touch screen or the touch panel, or may be an external input device such as a mouse or a somatosensory device.
  • the user can use a mouse movement or a finger to slide on the touch screen to form a closed trajectory, and the electronic device causes the image portion within the closed trajectory to be in a selected state.
  • the electronic device can combine the image analysis technology to determine the image body of the enclosed trajectory or the area enclosed by the semi-closed trajectory, so that the image body is in the selected state.
  • an image includes a person and a cat
  • the user draws a semi-closed circular trajectory in the image of the cat
  • the graphic analysis module of the electronic device determines that the image body included in the trajectory is a cat corresponding The image portion, therefore, even if a part of the cat's image is outside the trajectory, and the trajectory may include an image of an object other than the cat image, the electronic device can still determine that the image subject for the user operation is a cat corresponding
  • the image is such that the corresponding image portion of the cat is selected.
  • the user can also perform long-pressing operations such as long-pressing operations and double-click operations on an image subject in the image, and the electronic device can determine the image body targeted by the user operation by using image analysis technology, so that the image portion of the image body is selected. status.
  • the electronic device automatically recognizes the ROI image.
  • the electronic device can recognize the preset feature image included in the current display image, and determine that the image portion of the display image that includes the preset feature image is an ROI image. For example, the electronic device recognizes that the image includes the person image by using image recognition technology, and further determines that the image portion including the person is an ROI image.
  • the specific content of the preset feature image is not limited, and may be an image of a person, an image of an animal, a facial image of a person, a scene image, and a text.
  • the image of the word, etc. can be personalized according to the user's actual needs and usage habits.
  • the electronic device automatically recognizes that the ROI image in the current display image may be automatically performed by the electronic device when displaying the current image, or may perform the recognition after acquiring the trigger instruction of the user, and the triggering instruction may be
  • the embodiment of the present application is not limited by the virtual button generated by the user touching the display screen, or the physical button on the electronic device is generated, or the electronic device is generated by shaking or shaking.
  • step 102 after determining the ROI image on the display image, the electronic device performs dynamic range processing on the ROI image, and the brightness value of the pixel in the processed image is more reasonable, and the display quality of the image is relative to the processing. The previous ROI image will be improved.
  • the embodiments of the present application provide two ways to process the dynamic range of the ROI image to obtain an image of a user's sensing area with better display quality, as follows:
  • the ROI image is directly subjected to dynamic range expansion processing.
  • the brightness value of the brightest pixel in the processed image is greater than the brightness value of the brightest pixel in the ROI image, or the darkest pixel in the processed image is made.
  • the brightness value is smaller than the brightness value of the darkest pixel point in the ROI image, or even the bright part of the ROI image is brighter, and the dark part of the ROI image is darker, so that the dynamic range of the processed image will be larger than the ROI image in the LDRI image. Dynamic range.
  • the brightness value of the pixel with the highest brightness in the ROI image is increased to the maximum brightness value that the display screen can display, and the brightness value of the pixel with the smallest brightness in the ROI image is reduced to the minimum displayable by the display screen.
  • the brightness value, the brightness value of the pixel between the brightest point and the darkest point in the ROI is correspondingly changed.
  • the same luminance mapping may be used for each pixel in the ROI image, specifically including a linear mapping and a nonlinear mapping.
  • different brightness mappings can be performed on pixel points located at different positions in combination with the positional parameters of the pixel points, so that the brightness value of the pixel points in the processed image is more reasonable and the display effect is better.
  • the dynamic range of the processed image becomes larger, the light and dark details of the image are more abundant, and the display quality is improved.
  • the dynamic range compression is re-based based on the HDRI.
  • step 102 performing dynamic range processing on the ROI image, and the obtained display image has better display quality than the ROI image display quality, and includes the following steps in the process of performing:
  • Step 1021 Determine an area image corresponding to the ROI image position in the HDRI.
  • the electronic device first acquires a position parameter of the ROI image in the LDRI, and then maps the position parameter to the HDRI, thereby determining an area image corresponding to the ROI image position in the HDRI.
  • the HDRI may be an image collected by another device stored locally by the electronic device, or may be collected by the electronic device itself; when the electronic device itself is collected, multiple frames of different exposure images may be used for fusion. You can use the direct acquisition method of dedicated hardware.
  • Step 1022 Perform dynamic range compression on the determined area image, and obtain the compressed image as the processed image, and the dynamic range of the compressed image is greater than or equal to the dynamic range of the ROI image in the LDRI.
  • the electronic device performs dynamic range compression on the determined region image corresponding to the ROI image position in the HDRI to obtain a compressed image, and the dynamic range of the compressed image is greater than or equal to the dynamic range of the ROI image.
  • the dynamic range of the compressed image is greater than the dynamic range of the ROI image, including the following three cases: the brightness value of the brightest pixel of the compressed image is greater than the brightness value of the brightest pixel in the ROI image, or the darkest pixel of the compressed image.
  • the brightness value is less than the brightness value of the darkest pixel point in the ROI image, or both of the above conditions are met.
  • the dynamic range of the compressed image is larger than the dynamic range of the ROI image, the brightness and darkness of the compressed image will be richer and the display quality will be higher than that of the ROI image.
  • the display device displays the brightness of an image with 8-bit data
  • the brightness value of the pixel having the highest brightness in the displayed LDRI is 255
  • the brightness value of the pixel having the smallest brightness is 0.
  • the brightness of the pixel with the highest brightness in the ROI image of interest to the user in the LDRI is 200
  • the image with the smallest brightness If the luminance value of the prime point is 50, the dynamic range of the ROI image is only 200:50.
  • the area image is compressed into a compressed image by using a global mapping algorithm, and the brightness value of the brightest pixel of the area image is 255, and the brightness value of the darkest pixel in the area image is 0, and the area image is The brightness of the pixel between the brightest pixel and the darkest pixel is between 0 and 255.
  • the luminance value in the area image is close to the brightest pixel due to the compression of the luminance value range.
  • the brightness value of some pixels after compression may be the same as 255.
  • the brightness value of the partial pixel of the area image with the brightness value close to the darkest pixel may be 0).
  • the dynamic range of the compressed image obtained in step 1022 is 256:1, which is much larger than the dynamic range of the ROI image in the LDRI, and the display quality of the compressed image is better than the display quality of the ROI image.
  • the step 1022 performs dynamic range compression on the region image in the HDRI, the image compression gradation mapping algorithm is determined for the region image, and the algorithm is more targeted, and the obtained luminance value distribution of the pixel in the compressed image is more reasonable.
  • the compression algorithm is determined according to the display quality of the entire image, and the appropriate algorithm is not specifically selected for the region image in the HDRI, so the display quality of the obtained ROI image in the LDRI does not reach the step 1022. The display quality of the compressed image obtained in .
  • the dynamic range of the compressed image obtained in step 1022 is the maximum dynamic range that the display device can respond to, so that the compressed image presents as detailed detail as possible, providing the user with an image of the region of interest with excellent display quality.
  • the specific compression algorithm for compressing the area image in the HDRI into a compressed image is also not limited in the embodiment of the present application, and may be a global mapping algorithm or a local mapping algorithm.
  • the compression algorithm may be the same as or different from the algorithm for compressing HDRI into LDRI.
  • step 103 when displaying the processed image, the electronic device may display in all display areas of the display screen, or may perform in a partial display area of the display screen.
  • the following situations may be specifically:
  • the LDRI is still displayed in the image display area, but the ROI image in the LDRI Replace with the processed image.
  • the electronic device can keep the display state of the image portion other than the ROI image in the current image display area unchanged, and Replace the ROI image with a compressed image.
  • Step 3 while the area image is subjected to dynamic range compression in step 1022, the same compression algorithm is compressed on the portion other than the area image in the HDRI, that is, the entire HDRI image is recompressed to obtain the second LDRI.
  • the compressed image has both the brightest pixel and the darkest pixel of the second LDRI, which is equal to the dynamic range of the second LDRI.
  • Step 103 is performed to display the second LDRI.
  • step 103 in the embodiment of the present application may adopt any one of the above three situations.
  • the electronic device can determine the ROI image in the display image, and perform dynamic range processing on the ROI image, because the obtained dynamic range of the processed image is larger, or the pixel in the processed image The brightness value of the point is more reasonable, so that the display quality of the processed image is better than the ROI image in the LDRI, enabling the user to view the image of the region of interest with better display quality.
  • FIG. 3 it is another refinement flowchart of the image processing method in the embodiment of the present application, where the process includes:
  • Step 201 Determine a ROI image of a region of interest of the user from the display image.
  • Step 202 Determine whether the dynamic range of the ROI image is smaller than the dynamic range of the display image; if yes, execute step 203, otherwise, perform step 205;
  • Step 203 Perform dynamic range processing on the ROI image, and the obtained display image has better display quality than the ROI image.
  • Step 204 Display the processed image.
  • Step 205 Display the ROI image.
  • step 201 After determining the ROI image in step 201, first compare the dynamic range of the ROI image. The size of the dynamic range of the entire image is displayed. When the dynamic range of the ROI image is smaller than the dynamic range of the displayed image, steps 203-204 are performed.
  • the implementation of the step 201 is the same as that of the step 101.
  • the implementation of the steps 203-204 is the same as that of the steps 102-103.
  • step 202 the brightest point and the darkest point in the display image and the ROI image are respectively searched, and the brightness value of the brightest point of the ROI image is smaller than the brightness value of the brightest point of the displayed image, or the brightness value of the darkest point of the ROI image. It is greater than the brightness value of the darkest point of the displayed image to determine whether the dynamic range of the ROI image is smaller than the dynamic range of the displayed image.
  • the dynamic range of the displayed image is the maximum dynamic range that the display can respond to. Therefore, it is only necessary to calculate the dynamic range of the ROI image and then compare it with the dynamic range of the display.
  • step 202 if it is determined that the ROI image dynamic range is smaller than the display image dynamic range, then steps 203 to 204 are performed to perform dynamic range processing on the ROI image to display an image with a larger dynamic range and better display quality for the user.
  • step 202 if it is determined that the ROI image dynamic range is equal to the display image dynamic range, it may be determined that the ROI image has the maximum dynamic range that the current display device can display, and has a good display effect, and the ROI image can be directly displayed. Provide users with images with better display quality.
  • the corresponding processing is performed for the ROI images of different dynamic ranges, and when the dynamic range of the ROI image can be improved, the dynamic range expansion processing of the ROI graphics is performed, thereby providing the user with a larger dynamic range and better display quality.
  • a good image when the dynamic range of the ROI image reaches the threshold that the display device can display, the ROI image is directly displayed, thereby avoiding waste of system resources caused by dynamic range processing and reducing the response time of the electronic device displaying the image.
  • the dynamic range compression is performed on the ROI image by using an appropriate algorithm.
  • the display quality of the obtained compressed image can still be superior to the display quality of the ROI image in LDRI.
  • FIG. 4 it is a schematic flowchart of an image processing method in Application Example 1, which includes:
  • Step 301 Collect 3 frames of images for the same scene, wherein one frame is shortly exposed, one frame is long exposed, and one frame is normally exposed;
  • Step 302 align the three frames of images, and convert the three frames of images into the irradiation domain image according to a Camera Response Function (CRF);
  • CRF Camera Response Function
  • Step 303 Weighting and merging the obtained 3-frame irradiation domain image to obtain an HDRI
  • Step 304 When the HDRI is turned on, the HDRI is compressed by the tone scale mapping into an LDRI that the display screen can respond to, and the entire image of the LDRI is displayed;
  • Step 305 detecting a zoom operation of the user, and determining an ROI image from the LDRI according to the zooming operation;
  • Step 306 Determine an area image corresponding to the ROI image position in the HDRI
  • Step 307 compress the determined area image into a compressed image by using a tone scale mapping, and obtain a dynamic range of the compressed image to reach a maximum dynamic range that the display device can display;
  • Step 308 Display the obtained compressed image.
  • the dynamic range compression of the region image corresponding to the ROI image position in the HDRI is performed, not only obtaining the dynamic range of the compressed image but also the dynamic range of the ROI image, and
  • the compression algorithm of the area image, the obtained brightness value of the pixel in the compressed image will be more reasonable, the display quality of the compressed image is better than the display quality of the ROI image, and the user needs to view the image of the region of interest with better display quality.
  • HDRI can be obtained by using dedicated image acquisition hardware, or it can also use a chip with strong computing power to perform fusion of multiple frames of different exposure images.
  • the hardware requirements of the device are high. Some devices cannot obtain HDRI and can only obtain a single device. Image of exposure time, but image acquisition with a single exposure time will result in partial loss of image detail. Therefore, when displaying an image acquired at a single exposure time, if the user wants to view a ROI image of a user's region of interest in a single exposure time image, It will be difficult to guarantee the display quality of the ROI image.
  • Embodiment 2 of the present application provides an image processing method.
  • FIG. 5 it is a schematic flowchart of the image processing method. The process includes the following steps:
  • Step 401 Determine, when displaying the first frame image of the at least two frames of images for the same scene, the ROI image of the user region of interest on each of the at least two frames of images;
  • Step 402 determining whether there is a second frame image in at least two frames of images, the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image included in the first frame image; if yes, step 403 is performed;
  • Step 403 Switch from displaying the first frame image to displaying the ROI image in the second frame image.
  • step 401 when the display screen of the electronic device (including an external display device, such as a projector) displays the first frame image of the at least two frames of images, the user sense in the currently displayed first frame image can be determined.
  • Interest area ROI image In the embodiment of the present application, the implementation manner of determining the ROI image from the first frame image is the same as the implementation manner of determining the ROI image from the display image in the step 101, and the related description of the implementation manner of the step 101 in the embodiment of the present application. .
  • the ROI image in each of the other frames in the at least two frames of images is determined. Specifically, since at least two frames of images are for the same scene, the ROI image positions of any two of the at least two frames of images correspond to each other.
  • the region corresponding to the position of the ROI image in the first frame can be determined in each of the other frames.
  • the image, the determined area image is the ROI image of the frame in which it is located.
  • the exposure time of any two of the at least two frames of the image in step 401 is different, so that each frame image contains different brightness and dark details of the collected scene, for example, long exposure time collection.
  • the details of the dark parts in the image frame are rich, and the details of the highlights in the images acquired during the short exposure time are rich.
  • a second frame image is searched for in an image other than the first frame, and the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image of the first frame.
  • the display quality of the ROI image can be measured by image parameters.
  • the image parameter may be any one of a plurality of parameters such as a dynamic range, a brightness value, and a saturation, or a combination of any two or more of two or more.
  • the image display quality is larger as the image dynamic range is larger; the image display quality is better when the image saturation is larger only when the saturation is considered; the brightness of the metric image can be compared only when the brightness is considered.
  • index For example, the average brightness indicator of an image can be calculated from a Gaussian function:
  • W is an index that characterizes the average brightness of the ROI image
  • I i,j is the brightness value of the pixel at position (I, j) in the ROI image, and the brightness value is mapped to the interval [0, 1], that is, the brightest pixel
  • the brightness value of the point is 1, and the brightness value of the darkest pixel is 0
  • A is the correlation coefficient, which can be taken as 12.5.
  • the ROI image in the second frame image is switched to display the image of the user's region of interest with better display quality. Specifically, when the ROI image in the second frame image is displayed, only the ROI image in the second frame image may be displayed, or the entire second frame image may be displayed.
  • the ROI image included in at least two frames of images is searched for the best image frame, and in step 403, the frame image is displayed to display the best image quality of the included ROI image, thereby enabling the user to View to show the best quality ROI image.
  • step 401 includes the following two implementation manners:
  • the user operation is first detected to determine that the image portion corresponding to the user operation in the first frame image is the ROI image of the first frame image; and the user operation includes any one of a zoom operation, a drag operation, and a selected operation.
  • the embodiment is the same as the mode 1 of the step 101 in the first embodiment, and the present application will not be described in detail herein.
  • an area image corresponding to the ROI image position in the first frame image in each of the at least two frames of the first frame image is an ROI image. That is, the pixel position parameter of the ROI image in the first frame image is acquired, mapped to the remaining frames, and the area image corresponding to the ROI image position in the first frame image in the remaining frames is determined, and the area image is The ROI image corresponding to the frame.
  • an image portion of the at least two frames of the image including the preset feature image is an ROI image.
  • the ROI image in the first frame may be determined first, and then the ROI image in the remaining frames is determined by using the above location mapping manner, and the same ROI image automatic recognition rule may be used, and automatically in at least two frames of images.
  • the ROI image identifying each frame is identified.
  • how to determine the image portion in which the preset feature image is included is an ROI image, which is the same as the mode 2 of step 101 in the first embodiment.
  • step 401 displaying a first frame image of at least two frames of images for the same scene, including:
  • the determined first frame image is displayed.
  • the storage device of the electronic device stores at least two frames of images for the same scene, and at least two frames of images may be associated with the same file name.
  • the electronic device searches for at least two frames of images.
  • the display quality is not the worst one frame image, and the frame image is used as the first frame image to display the user, so that the user can view the image with good overall display quality of the scene.
  • the manner of comparing the display quality of different frame images is the same as the manner of comparing the display quality of the ROI image described above.
  • a frame with the best display quality is searched from at least two frames of images as the first frame, and displayed, thereby providing the user with an image frame with the best overall display quality.
  • FIG. 6 is a schematic flowchart of an image processing method in Application Example 2, the process includes:
  • Step 501 Collect 3 frames of images for the same scene, wherein one frame is shortly exposed, one frame is long exposed, and one frame is normally exposed;
  • Step 502 Store 3 frames of images, and associate 3 frames of images with the same file name
  • Step 503 When opening the file corresponding to the file name, determining that one frame of the normal exposure is the one with the best display quality, and displaying the normal exposure frame;
  • Step 504 detecting that the user selects a face image of the person in the normal exposure frame, and determines that the ROI image of the normal exposure frame is the selected face image of the person;
  • Step 505 Determine an area image corresponding to the ROI image position in the normal exposure frame in the other two frames as the ROI image corresponding to the ROI image;
  • Step 506 Determine whether the ROI image display quality of one frame in the other two frames is better than the display quality of the ROI image of the normal exposure frame.
  • Step 507 It is determined that the display quality of the ROI image of the long exposure frame is better than the display quality of the ROI image of the normal exposure frame, and the ROI image of the long exposure frame is displayed.
  • the electronic device stores a multi-frame single-exposure image for the same scene.
  • a certain frame image is displayed, if the user-sensing region in the image is determined, whether the user included in one frame in the remaining frames is compared is compared.
  • the display quality of the region of interest is better, and if there is, an image showing the region of interest of the user with better quality is displayed, providing the user with a better experience of viewing the image.
  • the embodiment of the present application provides an image processing apparatus.
  • the apparatus includes: a determining module 601, an image processing module 602, and a display module 603.
  • the determining module 601 is configured to determine a ROI image of the user's region of interest from the displayed image.
  • the image processing module 602 is configured to perform dynamic range processing on the ROI image, and obtain the processed The display quality of the image is better than the display quality of the ROI image;
  • the display module 603 is for displaying the processed image.
  • the display image is a low dynamic range image LDRI compressed by the high dynamic range image HDRI
  • the image processing module 602 is specifically configured to determine an area image corresponding to the ROI image position in the HDRI; and determine the determined area image.
  • the dynamic range compression is performed, and the obtained compressed image is used as the processed image, and the dynamic range of the compressed image is greater than or equal to the dynamic range of the ROI image in the LDRI.
  • the determining module 601 is specifically configured to detect a user operation, and determine an ROI image from the displayed image according to a user operation.
  • the determining module 601 is specifically configured to detect a user operation, determine that the image portion corresponding to the user operation in the display image is an ROI image, and the user operation includes any one of a zoom operation, a drag operation, and a selected operation.
  • the determining module 601 is specifically configured to determine that the image portion of the display image that includes the preset feature image is an ROI image.
  • the embodiment of the present application provides an image processing apparatus.
  • the apparatus includes: a determining module 701, a determining module 702, and a display module 703.
  • the determining module 701 is configured to: when displaying the first frame image of the at least two frames of images for the same scene, determine a ROI image of the user region of interest on each of the at least two frames of images;
  • the determining module 702 is configured to determine whether there is a second frame image in the at least two frames of images, and the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image included in the first frame image;
  • the display module 703 is configured to switch from displaying the first frame image to displaying the ROI image in the second frame image when the second frame image is present.
  • the exposure time of any two of the at least two frames of images is different.
  • the determining module 701 is specifically configured to detect a user operation, determine an ROI image on each of the at least two frames of images according to a user operation, or determine each frame in the at least two frames of images.
  • the image portion of the image containing the preset feature image is an ROI image.
  • the determining module 701 is specifically configured to detect a user operation, and determine that the image portion corresponding to the user operation in the first frame image is an ROI image of the first frame image; the user operation includes a zoom operation, a drag operation, and a selected operation. Any one of the operations; and determining that the area image corresponding to the ROI image position in the first frame image in each of the at least two frames of the first frame image is an ROI image.
  • the embodiment of the present application provides an electronic device.
  • the electronic device includes a memory 801, a processor 802, and an output device 803 connected to the same bus 800.
  • the memory 801 is used to store instructions.
  • the processor 802 is configured to execute an instruction to determine a ROI image of a region of interest of the user from the display image; perform dynamic range processing on the ROI image, and obtain a display quality of the processed image that is better than a display quality of the ROI image; Image; output device 803 is configured to display an image in accordance with an indication by processor 802.
  • the display image is a low dynamic range image LDRI compressed by the high dynamic range image HDRI
  • the processor 802 is configured to perform dynamic range processing on the ROI image, specifically: determining an area corresponding to the ROI image position in the HDRI. Image; the determined area image is subjected to dynamic range compression, and the obtained compressed image is used as the processed image, and the dynamic range of the compressed image is greater than or equal to the dynamic range of the ROI image in the LDRI.
  • the processor 802 is configured to determine a ROI image of the user's region of interest from the display image, specifically: detecting a user operation, and determining an ROI image from the display image according to a user operation.
  • the processor 802 is configured to detect a user operation, and determine an ROI image from the display image according to a user operation, specifically: detecting a user operation, determining that an image portion corresponding to the user operation in the display image is an ROI image, and the user operates It includes any one of zoom operation, drag operation, and selected operation.
  • the processor 802 is configured to determine a ROI image of the user's region of interest from the display image, specifically: determining that the image portion of the display image that includes the preset feature image is an ROI image.
  • the electronic device further includes: an image acquisition unit configured to acquire an image; an image storage unit configured to store the image, and the image storage unit may be the same memory as the memory 801, or may be different.
  • the electronic device further includes: a touch unit, where the user acquires a touch operation of the user.
  • the processor 802 is further configured to generate a corresponding instruction in response to the obtained user operation.
  • FIG. 10 is a specific schematic diagram of an electronic device according to Embodiment 5 of the present application.
  • the electronic device includes an output device 803, a processor 802, an input device 804, a random access memory 801, a read only memory 805, and a bus 800.
  • the processor 802 is coupled to the output device 803, the input device 804, the random access memory 801, and the read only memory 805 via the bus 800.
  • the basic input/output system booting system in the read only memory 805 is booted to boot the image processing apparatus into a normal operating state.
  • the processor 802 in FIG. 9 is the same component as the processor 802 in FIG. 10.
  • the bus 800 in FIG. 9 is the same component as the bus 800 in FIG. 10, the output device 803 in FIG. 9 and the output device 803 in FIG.
  • the output device 803 is the same component
  • the memory 801 in FIG. 9 is the same component as the random access memory 801 in FIG.
  • the application and operating system are run in the random access memory 801.
  • Input device 804 is used for image acquisition, wherein input device 804 can include a camera, dual camera, etc. device having an image capture function.
  • the output device 803 is for displaying a result image, wherein the output device 803 can include a touch screen, a display, a printer, and the like.
  • an embodiment of the present application provides an electronic device.
  • the electronic device includes a memory 901, a processor 902, and an output device 903 connected to the same bus 900.
  • the memory 901 is used to store instructions.
  • the processor 902 is configured to execute an instruction, when displaying the first frame image of the at least two frames of images for the same scene, determining each of the at least two frames of images a ROI image of the user's region of interest on the frame image; determining whether there is a second frame image in at least two frames of images, and the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image included in the first frame image; If present, switching from displaying the first frame image to displaying the ROI image in the second frame image.
  • the output device 903 is for displaying an image according to an instruction of the processor.
  • the exposure time of any two of the at least two frames of images is different.
  • the processor 902 is configured to determine a ROI image of the user region of interest on each of the at least two frames of images, specifically: detecting a user operation, and determining each frame image of the at least two frames according to a user operation.
  • the processor 902 is specifically configured to detect a user operation, and determine, according to a user operation, an ROI image on each of the at least two frames of images, specifically: detecting a user operation, determining that the first frame image corresponds to a user operation.
  • the image portion is an ROI image of the first frame image;
  • the user operation includes any one of a zoom operation, a drag operation, and a selected operation; determining each frame of the at least two frames of the image other than the first frame image
  • the area image corresponding to the ROI image position in one frame image is an ROI image.
  • the electronic device further includes: an image acquisition unit configured to acquire an image; an image storage unit configured to store the image, and the image storage unit may be the same memory as the memory 901, or may be different.
  • the electronic device further includes: a touch unit, configured to acquire a touch operation of the user.
  • the processor 802 is further configured to generate a corresponding instruction in response to the obtained user operation.
  • FIG. 12 is a detailed schematic diagram of an electronic device according to Embodiment 6 of the present invention.
  • the electronic device includes an output device 903, a processor 902, an input device 904, a random access memory 901, a read only memory 905, and a bus 900.
  • the processor 902 is coupled to the input device 904, the output device 903, the random access memory 901, and the read-only memory 905 via the bus 900.
  • the basic input/output system booting system in the read only memory 905 is booted to boot the image processing apparatus into a normal operating state.
  • the processor 902 in FIG. 11 is the same component as the processor 902 in FIG.
  • the bus 900 is the same component as the bus 900 of FIG. 12, the output device 903 of FIG. 11 and the output device 903 of FIG. 12 are the same component, and the memory 901 of FIG. 11 is the same as the random access memory 901 of FIG. component.
  • the application and operating system are run in the random access memory 901.
  • Input device 904 is used for image acquisition, wherein input device 904 can include a camera, dual camera, etc. device having image capture functionality.
  • the output device 903 is for displaying a result image, wherein the output device 903 may include a touch screen, a display, a printer, and the like.
  • the electronic device can determine the ROI image in the display image, and perform dynamic range processing on the ROI image, because the obtained dynamic range of the processed image is larger, or the brightness of the pixel in the processed image.
  • the value is more reasonable, so that the display quality of the processed image is better than the ROI image in the LDRI, enabling the user to view the image of the region of interest with better display quality.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • all or part of the technical solution of the present application may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, A server, or network device, or the like, or a processor, performs all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

Disclosed are an image processing method and apparatus and an electronic device, which are used to solve the technical problem of poor display quality of a region of interest image of a user. The image processing method comprises: determining a region of interest (ROI) image of a user from a displayed image; processing the dynamic range of the ROI image so that the display quality of the obtained processed image is better than the display quality of the ROI image; and displaying the processed image.

Description

一种图像处理方法、装置及电子设备Image processing method, device and electronic device 技术领域Technical field
本发明涉及图像处理领域,尤其涉及一种图像处理方法、装置及电子设备。The present invention relates to the field of image processing, and in particular, to an image processing method, apparatus, and electronic device.
背景技术Background technique
图像可见区域亮度的最大值与最小值的比值为图像的动态范围(Dynamic Range)。如果图像的动态范围太小,图像的暗部区域或者亮部区域的细节将会丢失,导致图像的显示质量较差。The ratio of the maximum value to the minimum value of the brightness of the visible area of the image is the dynamic range of the image (Dynamic Range). If the dynamic range of the image is too small, the details of the dark or bright areas of the image will be lost, resulting in poorer image quality.
现有技术中,电子设备在显示一张图像时,在不对图像进行人为编辑的情况下,图像的动态范围是固定的,图像中像素点间的明暗差异是固定不变的。而实际情况中,用户经常会只查看整幅图像中一个区域的图像,我们可以认为该区域为用户感兴趣的区域,将该区域图像定义为用户感兴趣区域(Region Of Interest,ROI)图像。用户能够通过放大图像来使显示屏只显示ROI图像,这种情况下,虽然ROI图像被放大,但是ROI图像中每个像素点的亮度值是不变的,像素点间的相对明暗程度也是不变的,ROI图像的动态范围没有得到提升,显示质量不佳。In the prior art, when an electronic device displays an image, the dynamic range of the image is fixed without artificial editing of the image, and the difference between the pixels in the image is fixed. In the actual situation, the user often only views the image of one area in the whole image. We can think that the area is the area of interest to the user, and define the area image as the Region Of Interest (ROI) image of the user. The user can enlarge the image to display only the ROI image. In this case, although the ROI image is enlarged, the brightness value of each pixel in the ROI image is constant, and the relative brightness between the pixels is not As a result, the dynamic range of the ROI image has not been improved and the display quality is poor.
发明内容Summary of the invention
本申请实施例提供一种图像处理方法、装置及电子设备,用于解决用户感兴趣区域ROI图像的显示质量不佳的问题。The embodiment of the present application provides an image processing method, device, and electronic device for solving the problem of poor display quality of a ROI image of a user's region of interest.
第一方面,本申请实施例提供一种图像处理方法,所述方法包括:In a first aspect, an embodiment of the present application provides an image processing method, where the method includes:
从显示图像上确定出用户感兴趣区域ROI图像;Determining an ROI image of a region of interest of the user from the display image;
对所述ROI图像进行动态范围处理,获得的处理后的图像的显示质量优于所述ROI图像的显示质量;Performing dynamic range processing on the ROI image, and obtaining a display quality of the processed image is better than a display quality of the ROI image;
显示所述处理后的图像。 The processed image is displayed.
结合第一方面,在第一方面的第一种可能的实现方式中,所述显示图像为由高动态范围图像HDRI压缩而成的低动态范围图像LDRI,所述对所述ROI图像进行动态范围处理,包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, the display image is a low dynamic range image LDRI compressed by a high dynamic range image HDRI, and the dynamic range of the ROI image is performed Processing, including:
确定出所述HDRI中与所述ROI图像位置对应的区域图像;Determining an area image corresponding to the ROI image position in the HDRI;
针对确定出的所述区域图像进行动态范围压缩,得到的压缩图像作为所述处理后的图像,所述压缩图像的动态范围大于或等于所述ROI图像的动态范围。And performing dynamic range compression on the determined area image, and the obtained compressed image is used as the processed image, and the dynamic range of the compressed image is greater than or equal to a dynamic range of the ROI image.
结合第一方面或第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,从显示图像上确定出用户感兴趣区域ROI图像,包括:With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, determining, by the user, the area of interest ROI image from the display image includes:
检测用户操作,根据所述用户操作从所述显示图像上确定出所述ROI图像。A user operation is detected, and the ROI image is determined from the display image according to the user operation.
结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,检测用户操作,根据所述用户操作从所述显示图像上确定出所述ROI图像,包括:In conjunction with the second possible implementation of the first aspect, in a third possible implementation of the first aspect, detecting a user operation, determining the ROI image from the display image according to the user operation, including :
检测所述用户操作,确定所述显示图像中的与所述用户操作对应的图像部分为所述ROI图像,所述用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作。Detecting the user operation, determining that an image portion corresponding to the user operation in the display image is the ROI image, and the user operation includes any one of a zoom operation, a drag operation, and a selection operation.
结合第一方面或第一方面的第一种可能的实现方式,在第一方面的第四种可能的实现方式中,从显示图像上确定出用户感兴趣区域ROI图像,包括:With reference to the first aspect or the first possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, determining, by the user, the area of interest ROI image from the display image includes:
确定所述显示图像中包含预设特征图像的图像部分为所述ROI图像。Determining that the image portion of the display image including the preset feature image is the ROI image.
第二方面,本申请实施例提供一种图像处理方法,所述方法包括:In a second aspect, an embodiment of the present application provides an image processing method, where the method includes:
在显示针对同一场景的至少两帧图像中的第一帧图像时,确定所述至少两帧图像中的每一帧图像上的用户感兴趣区域ROI图像;Determining a user region ROI image on each of the at least two frames of images when displaying the first frame image of the at least two frames of images for the same scene;
判断所述至少两帧图像中是否存在第二帧图像,所述第二帧图像包含的ROI图像的显示质量优于所述第一帧图像中包含的ROI图像的显示质量;Determining whether there is a second frame image in the at least two frames of images, and the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image included in the first frame image;
若存在,则从显示所述第一帧图像切换为显示所述第二帧图像中的ROI图像。 If present, switching from displaying the first frame image to displaying the ROI image in the second frame image.
结合第二方面,在第二方面的第一种可能的实现方式中,所述至少两帧图像中的任意两帧图像的曝光时间不同。In conjunction with the second aspect, in a first possible implementation of the second aspect, an exposure time of any two of the at least two frames of images is different.
结合第二方面,在第二方面的第二种可能的实现方式中,确定所述至少两帧图像中的每一帧图像上的用户感兴趣区域ROI图像,包括:With reference to the second aspect, in a second possible implementation manner of the second aspect, determining a ROI image of the user region of interest on each of the at least two frames of images includes:
检测用户操作,根据所述用户操作确定所述至少两帧图像中的每一帧图像上的ROI图像;或者Detecting a user operation, determining an ROI image on each of the at least two frames of images according to the user operation; or
确定所述至少两帧图像中的每一帧图像中包含预设特征图像的图像部分为ROI图像。Determining, in each of the at least two frames of images, an image portion including a preset feature image as an ROI image.
结合第二方面的第二种可能的实现方式,在第二方面的第三种可能的实现方式中,检测用户操作,根据所述用户操作确定所述至少两帧图像中的每一帧图像上的ROI图像,包括:With reference to the second possible implementation of the second aspect, in a third possible implementation manner of the second aspect, detecting a user operation, determining, according to the user operation, each frame image of the at least two frames of images ROI images, including:
检测所述用户操作,确定所述第一帧图像中与所述用户操作对应的图像部分为所述第一帧图像的ROI图像;所述用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作;Detecting the user operation, determining that an image portion corresponding to the user operation in the first frame image is an ROI image of the first frame image; and the user operation includes a zoom operation, a drag operation, and a selection operation Any kind of operation;
确定所述至少两帧图像中所述第一帧图像之外的每一帧中与所述第一帧图像中的ROI图像位置对应的区域图像为ROI图像。Determining, in each frame other than the first frame image, the area image corresponding to the ROI image position in the first frame image in the at least two frames of images is an ROI image.
第三方面,本申请实施例提供一种图像处理装置,包括:In a third aspect, an embodiment of the present application provides an image processing apparatus, including:
确定模块,用于从显示图像上确定出用户感兴趣区域ROI图像;a determining module, configured to determine a ROI image of the user's region of interest from the display image;
图像处理模块,用于对所述ROI图像进行动态范围处理,获得的处理后的图像的显示质量优于所述ROI图像的显示质量;An image processing module, configured to perform dynamic range processing on the ROI image, and obtain a display quality of the processed image that is better than a display quality of the ROI image;
显示模块,用于显示所述处理后的图像。a display module for displaying the processed image.
结合第三方面,在第三方面的第一种可能的实现方式中,所述显示图像为由高动态范围图像HDRI压缩而成的低动态范围图像LDRI,所述图像处理模块具体用于:确定出所述HDRI中与所述ROI图像位置对应的区域图像;并针对确定出的所述区域图像进行动态范围压缩,得到的压缩图像作为所述处理后的图像,所述压缩图像的动态范围大于或等于所述ROI图像的动态范围。 With reference to the third aspect, in a first possible implementation manner of the third aspect, the display image is a low dynamic range image LDRI compressed by a high dynamic range image HDRI, and the image processing module is specifically configured to: determine And outputting an area image corresponding to the location of the ROI image in the HDRI; and performing dynamic range compression on the determined area image, and obtaining a compressed image as the processed image, where a dynamic range of the compressed image is greater than Or equal to the dynamic range of the ROI image.
结合第三方面或第三方面的第一种可能的实现方式,在第三方面的第二种可能的实现方式中,所述确定模块具体用于:检测用户操作,根据所述用户操作从所述显示图像上确定出所述ROI图像。With reference to the third aspect, or the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the determining module is specifically configured to: detect a user operation, according to the user operation The ROI image is determined on the display image.
结合第三方面的第二种可能的实现方式,在第三方面的第三种可能的实现方式中,所述确定模块具体用于:检测所述用户操作,确定所述显示图像中的与所述用户操作对应的图像部分为所述ROI图像,所述用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作。In conjunction with the second possible implementation of the third aspect, in a third possible implementation manner of the third aspect, the determining module is specifically configured to: detect the user operation, determine a location in the display image The image portion corresponding to the user operation is the ROI image, and the user operation includes any one of a zoom operation, a drag operation, and a selected operation.
结合第三方面或第三方面的第一种可能的实现方式,在第三方面的第四种可能的实现方式中,所述确定模块具体用于:确定所述显示图像中包含预设特征图像的图像部分为所述ROI图像。With the third aspect or the first possible implementation manner of the third aspect, in a fourth possible implementation manner of the third aspect, the determining module is specifically configured to: determine that the display image includes a preset feature image The image portion is the ROI image.
第四方面,本申请实施例提供一种图像处理装置,包括:In a fourth aspect, an embodiment of the present application provides an image processing apparatus, including:
确定模块,用于在显示针对同一场景的至少两帧图像中的第一帧图像时,确定所述至少两帧图像中的每一帧图像上的用户感兴趣区域ROI图像;a determining module, configured to determine a ROI image of a user region of interest on each of the at least two frames of images when displaying the first frame image of the at least two frames of images for the same scene;
判断模块,用于判断所述至少两帧图像中是否存在第二帧图像,所述第二帧图像包含的ROI图像的显示质量优于所述第一帧图像中包含的ROI图像的显示质量;a determining module, configured to determine whether there is a second frame image in the at least two frames of images, where the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image included in the first frame image;
显示模块,用于在存在所述第二帧图像时从显示所述第一帧图像切换为显示所述第二帧图像中的ROI图像。And a display module, configured to switch from displaying the first frame image to displaying an ROI image in the second frame image when the second frame image is present.
结合第四方面,在第四方面的第一种可能的实现方式中,所述至少两帧图像中的任意两帧图像的曝光时间不同。In conjunction with the fourth aspect, in a first possible implementation manner of the fourth aspect, an exposure time of any two of the at least two frames of images is different.
结合第四方面,在第四方面的第二种可能的实现方式中,所述确定模块具体用于:检测用户操作,根据所述用户操作确定所述至少两帧图像中的每一帧图像上的ROI图像;或者确定所述至少两帧图像中的每一帧图像中包含预设特征图像的图像部分为ROI图像。With reference to the fourth aspect, in a second possible implementation manner of the fourth aspect, the determining module is specifically configured to: detect a user operation, and determine, according to the user operation, each frame image of the at least two frames of images The ROI image; or determining that the image portion of the at least two frames of the image including the preset feature image is an ROI image.
结合第四方面的第二种可能的实现方式,在第四方面的第三种可能的实现方式中,所述确定模块具体用于:检测所述用户操作,确定所述第一帧图像中与所述用户操作对应的图像部分为所述第一帧图像的ROI图像;所述用 户操作包括缩放操作、拖动操作、选中操作中的任意一种操作;以及用于确定所述至少两帧图像中所述第一帧图像之外的每一帧中与所述第一帧图像中的ROI图像位置对应的区域图像为ROI图像。With reference to the second possible implementation manner of the fourth aspect, in a third possible implementation manner of the fourth aspect, the determining module is specifically configured to: detect the user operation, determine that the first frame image is The image portion corresponding to the user operation is an ROI image of the first frame image; The user operation includes any one of a zoom operation, a drag operation, and a selected operation; and is configured to determine an image of the first frame in each frame except the first frame image in the at least two frames of images The area image corresponding to the ROI image position in the middle is an ROI image.
第五方面,本申请实施例提供一种电子设备,包括:In a fifth aspect, an embodiment of the present application provides an electronic device, including:
存储器,用于存储指令;a memory for storing instructions;
处理器,用于执行所述指令,从显示图像上确定出用户感兴趣区域ROI图像;对所述ROI图像进行动态范围处理,获得的处理后的图像的显示质量优于所述ROI图像的显示质量;显示所述处理后的图像;a processor, configured to execute the instruction, determine a ROI image of a region of interest of the user from the display image; perform dynamic range processing on the ROI image, and obtain a display quality of the processed image that is better than display of the ROI image Quality; display the processed image;
输出设备,用于根据所述处理器的指示显示图像。An output device for displaying an image according to an indication of the processor.
结合第五方面,在第五方面的第一种可能的实现方式中,所述显示图像为由高动态范围图像HDRI压缩而成的低动态范围图像LDRI,所述处理器用于对所述ROI图像进行动态范围处理,具体为:确定出所述HDRI中与所述ROI图像位置对应的区域图像;针对确定出的所述区域图像进行动态范围压缩,得到的压缩图像作为所述处理后的图像,所述压缩图像的动态范围大于或等于所述ROI图像的动态范围。With reference to the fifth aspect, in a first possible implementation manner of the fifth aspect, the display image is a low dynamic range image LDRI compressed by a high dynamic range image HDRI, and the processor is configured to use the ROI image Performing dynamic range processing, specifically: determining an area image corresponding to the ROI image position in the HDRI; performing dynamic range compression on the determined area image, and obtaining the compressed image as the processed image, The dynamic range of the compressed image is greater than or equal to the dynamic range of the ROI image.
结合第五方面或第五方面的第一种可能的实现方式,在第五方面的第二种可能的实现方式中,所述处理器用于从显示图像上确定出用户感兴趣区域ROI图像,具体为:检测用户操作,根据所述用户操作从所述显示图像上确定出所述ROI图像。With reference to the fifth aspect, or the first possible implementation manner of the fifth aspect, in a second possible implementation manner of the fifth aspect, the processor is configured to determine, by using a display image, a ROI image of a user's region of interest, specifically To: detect a user operation, and determine the ROI image from the display image according to the user operation.
结合第五方面的第二种可能的实现方式,在第五方面的第三种可能的实现方式中,所述处理器用于检测用户操作,根据所述用户操作从所述显示图像上确定出所述ROI图像,具体为:检测所述用户操作,确定所述显示图像中的与所述用户操作对应的图像部分为所述ROI图像,所述用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作。With reference to the second possible implementation manner of the fifth aspect, in a third possible implementation manner of the fifth aspect, the processor is configured to detect a user operation, and determine, according to the user operation, the display image The ROI image is specifically configured to: detect the user operation, determine that an image portion corresponding to the user operation in the display image is the ROI image, and the user operation includes a zoom operation, a drag operation, and a selection operation. Any kind of operation.
结合第五方面或第五方面的第一种可能的实现方式,在第五方面的第四种可能的实现方式中,所述处理器用于从显示图像上确定出用户感兴趣区域ROI图像,具体为:确定所述显示图像中包含预设特征图像的图像部分为所 述ROI图像。With reference to the fifth aspect, or the first possible implementation manner of the fifth aspect, in a fourth possible implementation manner of the fifth aspect, the processor is configured to determine, by using a display image, a ROI image of a user's region of interest, specifically a method for determining that an image portion of the display image that includes a preset feature image is The ROI image is described.
第六方面,本申请实施例提供一种电子设备,包括:In a sixth aspect, an embodiment of the present application provides an electronic device, including:
存储器,用于存储指令;a memory for storing instructions;
处理器,用于执行所述指令,在显示针对同一场景的至少两帧图像中的第一帧图像时,确定所述至少两帧图像中的每一帧图像上的用户感兴趣区域ROI图像;判断所述至少两帧图像中是否存在第二帧图像,所述第二帧图像包含的ROI图像的显示质量优于所述第一帧图像中包含的ROI图像的显示质量;若存在,则从显示所述第一帧图像切换为显示所述第二帧图像中的ROI图像;a processor, configured to execute, when displaying the first frame image of the at least two frames of images for the same scene, determining a ROI image of the user region of interest on each of the at least two frames of images; Determining whether there is a second frame image in the at least two frames of images, wherein the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image included in the first frame image; if present, Displaying that the first frame image is switched to display an ROI image in the second frame image;
输出设备,用于根据所述处理器的指示显示图像。An output device for displaying an image according to an indication of the processor.
结合第六方面,在第六方面的第一种可能的实现方式中,所述至少两帧图像中的任意两帧图像的曝光时间不同。In conjunction with the sixth aspect, in a first possible implementation manner of the sixth aspect, an exposure time of any two of the at least two frames of images is different.
结合第六方面,在第六方面的第二种可能的实现方式中,所述处理器用于确定所述至少两帧图像中的每一帧图像上的用户感兴趣区域ROI图像,具体为:检测用户操作,根据所述用户操作确定所述至少两帧图像中的每一帧图像上的ROI图像;或者确定所述至少两帧图像中的每一帧图像中包含预设特征图像的图像部分为ROI图像。With reference to the sixth aspect, in a second possible implementation manner of the sixth aspect, the processor is configured to determine a ROI image of a user region of interest on each of the at least two frames of images, specifically: detecting a user operation, determining, according to the user operation, an ROI image on each of the at least two frames of images; or determining that an image portion of each of the at least two frames of images that includes the preset feature image is ROI image.
结合第六方面的第二种可能的实现方式,在第六方面的第三种可能的实现方式中,所述处理器具体用于检测用户操作,根据所述用户操作确定所述至少两帧图像中的每一帧图像上的ROI图像,具体为:检测所述用户操作,确定所述第一帧图像中与所述用户操作对应的图像部分为所述第一帧图像的ROI图像;所述用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作;确定所述至少两帧图像中所述第一帧图像之外的每一帧中与所述第一帧图像中的ROI图像位置对应的区域图像为ROI图像。With reference to the second possible implementation manner of the sixth aspect, in a third possible implementation manner of the sixth aspect, the processor is specifically configured to detect a user operation, and determine the at least two frames of images according to the user operation The ROI image on each frame of the image is specifically: detecting the user operation, determining that the image portion corresponding to the user operation in the first frame image is an ROI image of the first frame image; The user operation includes any one of a zoom operation, a drag operation, and a selected operation; determining an ROI in each frame other than the first frame image and the first frame image in the at least two frames of images The area image corresponding to the image position is an ROI image.
申请实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点:One or more technical solutions provided in the application embodiments have at least the following technical effects or advantages:
本申请实施例中,电子设备能够确定出显示图像中的ROI图像,并对ROI 图像进行动态范围处理,由于获得的处理后的图像的动态范围更大,或者处理后的图像中像素点的亮度值更加合理,使得处理后的图像的显示质量优于LDRI中的ROI图像,使用户能够查看到显示质量更好的感兴趣区域的图像。In the embodiment of the present application, the electronic device can determine the ROI image in the display image and compare the ROI The image is subjected to dynamic range processing. Since the obtained dynamic range of the processed image is larger, or the brightness value of the pixel in the processed image is more reasonable, the display quality of the processed image is superior to the ROI image in the LDRI. The user can view an image of a region of interest that displays better quality.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention, Those skilled in the art can also obtain other drawings based on these drawings without paying for inventive labor.
图1为本申请实施例1中的图像处理方法的主要流程示意图;1 is a schematic diagram of main processes of an image processing method in Embodiment 1 of the present application;
图2为本申请实施例1中图像处理方法的细化流程的示意图;2 is a schematic diagram of a refinement process of an image processing method in Embodiment 1 of the present application;
图3为本申请实施例1中图像处理方法的另一细化流程示意图;3 is a schematic flowchart of another refinement of an image processing method in Embodiment 1 of the present application;
图4为本申请实施例中应用实例1的流程示意图;4 is a schematic flowchart of application example 1 in an embodiment of the present application;
图5为本申请实施例2中图像处理方法的流程示意图;5 is a schematic flowchart of an image processing method in Embodiment 2 of the present application;
图6为本申请实施例中应用实例2的流程示意图;FIG. 6 is a schematic flowchart of application example 2 in an embodiment of the present application;
图7为本申请实施例3中图像处理装置的结构示意框图;7 is a schematic block diagram showing the structure of an image processing apparatus in Embodiment 3 of the present application;
图8为本申请实施例4中图像处理装置的结构示意框图;8 is a schematic block diagram showing the structure of an image processing apparatus according to Embodiment 4 of the present application;
图9为本申请实施例5中电子设备的主要结构示意框图;9 is a schematic block diagram showing the main structure of an electronic device in Embodiment 5 of the present application;
图10为本申请实施例5中电子设备的详细结构示意框图;10 is a schematic block diagram showing a detailed structure of an electronic device in Embodiment 5 of the present application;
图11为本申请实施例6中电子设备的主要结构示意框图;11 is a schematic block diagram showing the main structure of an electronic device in Embodiment 6 of the present application;
图12为本申请实施例6中电子设备的详细结构示意框图。FIG. 12 is a schematic block diagram showing the detailed structure of an electronic device in Embodiment 6 of the present application.
具体实施方式detailed description
在具体介绍本申请实施例中的技术方案之前,为了让本发明所属技术领域的技术人员能够更好地理解本申请实施例中的技术方案,下面,先对相关技术进行描述。Before the technical solutions in the embodiments of the present application are specifically described, in order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the related technologies will be described below.
目前,显示设备的动态范围很小,一般在100:1左右,即使所谓的高动态 范围显示设备的动态范围也只有500:1,而高动态范围图像(High Dynamic Range Imaging,HDRI)的动态范围能够达到216:1。因此,要在显示设备上显示HDRI,需要对HDRI的动态范围压缩,获得显示设备能够显示的低动态范围图像(Low Dynamic Range Imaging,LDRI)。At present, the dynamic range of display devices is very small, generally around 100:1, even so-called high dynamics The range display device has a dynamic range of only 500:1, while the High Dynamic Range Imaging (HDRI) has a dynamic range of 216:1. Therefore, to display the HDRI on the display device, dynamic range compression of the HDRI is required to obtain a Low Dynamic Range Imaging (LDRI) that the display device can display.
通常采用色阶映射技术将HDRI压缩为LDRI,色阶映射技术具体包括全局映射算法和局部映射算法。其中,全局映射算法将HDRI整幅图像看作一个整体,对其中的每一个像素使用相同的亮度映射,具体又可以分为线性映射算法和非线性映射算法。而局部映射算法要兼顾像素点的位置特征以及像素点之间的影响,对不同区域的像素采取不同的处理。The hHDR mapping technique is usually used to compress the HDRI into LDRI. The gradation mapping technology specifically includes a global mapping algorithm and a local mapping algorithm. Among them, the global mapping algorithm treats the entire HDRI image as a whole, and uses the same luminance mapping for each pixel, and can be divided into a linear mapping algorithm and a nonlinear mapping algorithm. The local mapping algorithm should take into account the positional features of the pixels and the influence between the pixels, and take different treatments for the pixels in different regions.
在采用色阶映射技术将HDRI压缩为LDRI时,考虑的是整幅图像的显示质量,因此采用的色阶映射算法是针对整幅图像的,没有专门针对图像中的用户感兴趣区域的图像,因此HDRI中的用户感兴趣区域的图像在该色阶映射算法下获得的压缩图像的显示质量不高。When using hue mapping technology to compress HDRI into LDRI, the display quality of the whole image is considered. Therefore, the gradation mapping algorithm used is for the whole image, and there is no image specifically for the user's region of interest in the image. Therefore, the image of the user's region of interest in the HDRI has a low display quality of the compressed image obtained under the gradation mapping algorithm.
不仅如此,当用户通过放大图像操作只查看LDRI中的ROI图像时,虽然ROI图像被放大,但是ROI图像中每个像素点的亮度值是不变的,像素点间的相对明暗程度也是不变的,ROI图像的动态范围没有得到提升,ROI图像的显示质量不佳。Moreover, when the user only views the ROI image in the LDRI by enlarging the image operation, although the ROI image is enlarged, the luminance value of each pixel in the ROI image is constant, and the relative brightness between the pixels is also unchanged. The dynamic range of the ROI image has not been improved, and the display quality of the ROI image is not good.
例如,显示设备以8位数据来显示图像的亮度时,显示的LDRI中亮度最大的像素点的亮度值为255,亮度最小的像素点的亮度值为0。而LDRI中的用户感兴趣的ROI图像中亮度最大的像素点的亮度值为200,亮度最小的像素点的亮度值为50,则该ROI图像的动态范围只有200:50。在用户将ROI图像的显示面积放大时,ROI图像中像素点的亮度值保持不变,ROI图像的动态范围保持不变,处于较小的水平,小于显示设备能够显示的动态范围,ROI图像的显示质量不高。For example, when the display device displays the brightness of an image with 8-bit data, the brightness value of the pixel having the highest brightness in the displayed LDRI is 255, and the brightness value of the pixel having the smallest brightness is 0. The luminance value of the pixel with the highest brightness in the ROI image of the user in the LDRI is 200, and the brightness value of the pixel with the smallest brightness is 50, and the dynamic range of the ROI image is only 200:50. When the user enlarges the display area of the ROI image, the brightness value of the pixel in the ROI image remains unchanged, and the dynamic range of the ROI image remains unchanged, at a small level, less than the dynamic range that the display device can display, and the ROI image. The display quality is not high.
本申请实施例提出一种图像处理方法,在从显示图像中确定出用户感兴趣的ROI图像后,对ROI图像重新进行动态范围处理,使处理后的图像的动态范围得到提升,或者使处理后的图像的亮度值更合理,提高ROI图像的显 示质量,满足用户查看显示质量较高的ROI图像的需求。An embodiment of the present application provides an image processing method, after determining an ROI image that is of interest to a user from a display image, performing dynamic range processing on the ROI image, so that the dynamic range of the processed image is improved, or The brightness value of the image is more reasonable, and the ROI image is improved. Quality is displayed to meet the needs of users to view ROI images with high display quality.
下面通过附图以及具体实施例对本发明技术方案做详细的说明,应当理解本申请实施例以及实施例中的具体特征是对本发明技术方案的详细的说明,而不是对本发明技术方案的限定,在不冲突的情况下,本申请实施例以及实施例中的技术特征可以相互组合。The technical solutions of the present invention are described in detail below with reference to the accompanying drawings and specific embodiments. It is understood that the specific features of the embodiments and the embodiments of the present invention are a detailed description of the technical solutions of the present invention, and are not limited to the technical solutions of the present invention. In the case of no conflict, the technical features in the embodiments of the present application and the embodiments may be combined with each other.
实施例1Example 1
参见图1,为本申请实施例1提供的一种图像处理方法的流程示意图,该流程包括如下步骤:FIG. 1 is a schematic flowchart diagram of an image processing method according to Embodiment 1 of the present application, where the process includes the following steps:
步骤101:从显示图像上确定出用户感兴趣区域ROI图像;Step 101: Determine a ROI image of a region of interest of the user from the display image.
步骤102:对ROI图像进行动态范围处理,获得的处理后的图像的显示质量优于ROI图像的显示质量;Step 102: Perform dynamic range processing on the ROI image, and obtain a display quality of the processed image that is better than a display quality of the ROI image.
步骤103:显示处理后的图像。Step 103: Display the processed image.
具体的,本申请实施例中的图像处理方法适用于具有显示单元、能够显示图像的电子设备,具体如数码相机、智能手机、平板电脑、笔记本电脑、智能手表、智能电视,等等。Specifically, the image processing method in the embodiment of the present application is applicable to an electronic device having a display unit and capable of displaying an image, such as a digital camera, a smart phone, a tablet computer, a notebook computer, a smart watch, a smart TV, and the like.
步骤101中,电子设备可以通过多种方式从显示图像中确定出ROI图像,包括但不限于以下几种方式:In step 101, the electronic device may determine the ROI image from the displayed image in various manners, including but not limited to the following manners:
方式1,检测用户操作,根据用户操作从显示图像中确定出ROI图像。Mode 1, detecting a user operation, and determining an ROI image from the display image according to a user operation.
在电子设备显示一图像时,用户可以针对该图像进行操作,电子设备在检测到用户操作后,确定显示图像中的与用户操作对应的图像部分为ROI图像,其中,用户操作可以包括缩放操作、拖动操作、选中操作中的任意一种操作。When the electronic device displays an image, the user can operate on the image, and after detecting the user operation, the electronic device determines that the image portion corresponding to the user operation in the display image is an ROI image, wherein the user operation may include a zoom operation, Drag operation, select any one of the operations.
针对上述几种用户操作对应的情形,下面分别予以说明。The corresponding situations for the above several user operations are described below.
(1)缩放操作以及拖动操作对应的情形。(1) The scaling operation and the corresponding situation of the drag operation.
电子设备在显示一图像时,用户可以针对该图像进行放大操作,电子设备在响应该放大操作时,将显示当前显示图像中的一个局部区域的图像,这个在响应放大操作时即将显示的局部区域的图像即为与用户放大操作对应的 ROI图像。When the electronic device displays an image, the user can perform an enlargement operation on the image, and the electronic device, in response to the zooming operation, displays an image of a partial region in the currently displayed image, which is a local region to be displayed in response to the zoom-in operation. The image corresponds to the user's zoom operation ROI image.
同理,电子设备在显示一图像的第一局部区域图像时,用户可以针对该图像进行放大操作,电子设备在响应该放大操作时,将显示第一局部区域图像中的一个局部区域的图像,这个在响应放大操作时即将显示的局部区域的图像即为与用户放大操作对应的ROI图像。Similarly, when the electronic device displays the first partial area image of an image, the user may perform an enlargement operation on the image, and the electronic device displays an image of a partial area in the first partial area image in response to the zooming operation. The image of the local area to be displayed in response to the enlargement operation is the ROI image corresponding to the user's enlargement operation.
对应的,电子设备在显示一图像的第一局部区域图像时,用户可以针对该图像进行缩小操作,电子设备在响应该缩小操作时,将显示电子设备中的包含第一局部区域图像的第二局部区域图像或者整幅图像(在缩小操作的缩小幅度足够大时,电子设备在响应缩小操作时将显示整幅图像),这个在响应缩小操作时即将显示的第二局部区域图像或者整幅图像即为与用户缩小操作对应的ROI图像。Correspondingly, when the electronic device displays the first partial area image of an image, the user may perform a zoom-out operation on the image, and the electronic device, in response to the zoom-out operation, displays the second image in the electronic device including the first partial area image. Partial area image or whole image (when the reduction operation is sufficiently large, the electronic device will display the entire image in response to the reduction operation), the second partial area image or the entire image to be displayed in response to the reduction operation This is the ROI image corresponding to the user's zoom out operation.
而当电子设备在显示一放大到一定比例的图像时,显示屏只显示了整幅图像的第一局部区域图像,用户可以针对该图像进行拖动操作,电子设备在响应该拖动操作时,保持当前的放大比例,从显示第一局部区域图像切换至显示第二局部区域图像,这个在响应拖动操作时即将显示的第二局部区域即为与用户拖动操作对应的ROI图像。When the electronic device displays an image that is enlarged to a certain ratio, the display screen only displays the first partial region image of the entire image, and the user can perform a drag operation on the image, and the electronic device responds to the drag operation. The current zoom ratio is maintained, and the first partial area image is switched to display the second partial area image. The second partial area to be displayed in response to the drag operation is the ROI image corresponding to the user drag operation.
综上,电子设备在显示一幅图像时,如果用户针对该图像进行缩放操作或者拖动操作,电子设备在响应用户操作时即将在显示屏上显示整幅图像中的一个区域图像(其中,在用户进行缩小幅度足够大的缩小操作时,电子设备将显示整幅图像),ROI图像即为这个即将显示的区域图像。In summary, when an electronic device displays an image, if the user performs a zoom operation or a drag operation on the image, the electronic device displays an area image in the entire image on the display screen in response to the user operation (wherein When the user performs a reduction operation with a sufficiently large reduction, the electronic device will display the entire image), and the ROI image is the image of the area to be displayed.
本申请实施例中,不限定用户具体采用何种方式进行缩放操作以及拖动操作,具体可以为通过触控触摸屏或触控板的方式,也可以为通过操作鼠标、体感设备等外部输入设备的方式。例如,对于缩放操作,可以通过滚动鼠标滚轮实现,也可以通过在两点触控触摸屏时改变触控点间距离实现;对于拖动操作,可以通过在左键被按下时移动鼠标实现,也可以通过单点触控时移动触控点实现。In the embodiment of the present application, the zoom operation and the drag operation are specifically limited by the user, which may be a method of touching a touch screen or a touch panel, or an external input device such as a mouse or a somatosensory device. the way. For example, for the zoom operation, it can be realized by scrolling the mouse wheel, or by changing the distance between the touch points when the touch screen is touched at two points; for the drag operation, by moving the mouse when the left button is pressed, It can be realized by moving the touch point when single-touching.
(2)选中操作对应的情形。 (2) Select the corresponding situation of the operation.
当电子设备在显示一图像时,用户可以进行选中操作,使图像中一个局部区域图像处于选中状态,这个处于选中状态的图像部分即为与选中状态对应的ROI图像。When the electronic device displays an image, the user can perform a selection operation to make a partial region image in the image in a selected state, and the image portion in the selected state is an ROI image corresponding to the selected state.
本申请实施例中,不限定用户具体采用何种方式实现选中操作,具体可以为用户通过触控触摸屏或触控板的方式,也可以为通过操作鼠标、体感设备等外部输入设备的方式。In the embodiment of the present application, the manner in which the user specifically performs the selection operation is not limited, and the method may be a manner in which the user touches the touch screen or the touch panel, or may be an external input device such as a mouse or a somatosensory device.
例如,用户可以利用鼠标移动或者手指在触摸屏上滑动形成一封闭轨迹,电子设备使封闭轨迹内的图像部分处于选中状态。For example, the user can use a mouse movement or a finger to slide on the touch screen to form a closed trajectory, and the electronic device causes the image portion within the closed trajectory to be in a selected state.
或者,在用户在图像上画出封闭轨迹或半封闭轨迹时,电子设备能够结合图像分析技术,确定出封闭轨迹或者半封闭轨迹所包含区域的图像主体,使该图像主体处于选中状态。比如,一幅图像中包含有一个人和一只猫,用户在图像中猫的部分划了一个半封闭的圆形轨迹,电子设备的图形分析模块确定出该轨迹所包含的图像主体为猫对应的图像部分,因此,即使猫的图像中有一部分在该轨迹之外,且该轨迹中可能包括猫图像之外的其他物体的图像,电子设备仍然能够确定出该用户操作针对的图像主体为猫对应的图像,使该猫对应的图像部分处于选中状态。Alternatively, when the user draws a closed trajectory or a semi-closed trajectory on the image, the electronic device can combine the image analysis technology to determine the image body of the enclosed trajectory or the area enclosed by the semi-closed trajectory, so that the image body is in the selected state. For example, an image includes a person and a cat, and the user draws a semi-closed circular trajectory in the image of the cat, and the graphic analysis module of the electronic device determines that the image body included in the trajectory is a cat corresponding The image portion, therefore, even if a part of the cat's image is outside the trajectory, and the trajectory may include an image of an object other than the cat image, the electronic device can still determine that the image subject for the user operation is a cat corresponding The image is such that the corresponding image portion of the cat is selected.
同理,用户也可以针对图像中的一图像主体进行长按操作、双击操作等常用选中操作,电子设备能够利用图像分析技术确定出用户操作针对的图像主体,使该图像主体的图像部分处于选中状态。Similarly, the user can also perform long-pressing operations such as long-pressing operations and double-click operations on an image subject in the image, and the electronic device can determine the image body targeted by the user operation by using image analysis technology, so that the image portion of the image body is selected. status.
如何利用图像分析技术确定出图像中用户操作针对的图像主体也可以参考现有技术,本申请实施例在此不予详述。How to use the image analysis technology to determine the image body for the user operation in the image can also refer to the prior art. The embodiments of the present application are not described in detail herein.
方式2,电子设备自动识别出ROI图像。Mode 2, the electronic device automatically recognizes the ROI image.
利用图像识别技术,电子设备能够识别出当前显示图像中包含的预设特征图像,确定显示图像中包含预设特征图像的图像部分为ROI图像。例如,电子设备利用图像识别技术识别出图像中包含有人物图像,进而可以确定包含人物的图像部分为ROI图像。本申请实施例中,不限定预设特征图像的具体内容,其可以是人物的图像、动物的图像、人物面部图像、景物图像、文 字的图像,等等,可以根据用户的实际需求及使用习惯进行个性化的设置。Using the image recognition technology, the electronic device can recognize the preset feature image included in the current display image, and determine that the image portion of the display image that includes the preset feature image is an ROI image. For example, the electronic device recognizes that the image includes the person image by using image recognition technology, and further determines that the image portion including the person is an ROI image. In the embodiment of the present application, the specific content of the preset feature image is not limited, and may be an image of a person, an image of an animal, a facial image of a person, a scene image, and a text. The image of the word, etc., can be personalized according to the user's actual needs and usage habits.
另外,本申请实施例中,电子设备自动识别出当前显示图像中的ROI图像可以是电子设备在显示当前图像时自动进行,也可以是在获取到用户的触发指令后才执行识别,触发指令可以通过用户触摸显示屏上的虚拟按钮生成,或者按压电子设备上的实体按键生成,或者甩动、摇晃电子设备生成,本申请实施例不予限定。In addition, in the embodiment of the present application, the electronic device automatically recognizes that the ROI image in the current display image may be automatically performed by the electronic device when displaying the current image, or may perform the recognition after acquiring the trigger instruction of the user, and the triggering instruction may be The embodiment of the present application is not limited by the virtual button generated by the user touching the display screen, or the physical button on the electronic device is generated, or the electronic device is generated by shaking or shaking.
具体的,步骤102中,在确定出显示图像上的ROI图像后,电子设备将针对ROI图像进行动态范围处理,处理后的图像中像素点的亮度值将更加合理,图像的显示质量相对于处理前的ROI图像将得到提高。Specifically, in step 102, after determining the ROI image on the display image, the electronic device performs dynamic range processing on the ROI image, and the brightness value of the pixel in the processed image is more reasonable, and the display quality of the image is relative to the processing. The previous ROI image will be improved.
本申请实施例提供两种方式来对ROI图像的动态范围进行处理,以获得显示质量更好的用户感兴区域的图像,两种方式如下:The embodiments of the present application provide two ways to process the dynamic range of the ROI image to obtain an image of a user's sensing area with better display quality, as follows:
方式一,直接对ROI图像进行动态范围扩幅处理。In the first method, the ROI image is directly subjected to dynamic range expansion processing.
具体来讲,对ROI图像进行动态范围扩幅时,使得处理后的图像中最亮像素点的亮度值大于ROI图像中最亮像素点的亮度值,或者使处理后的图像中最暗像素点的亮度值小于ROI图像中最暗像素点的亮度值,或者既使ROI图像的亮部更亮,又使ROI图像的暗部更暗,这样,处理后的图像的动态范围将大于LDRI中ROI图像的动态范围。Specifically, when the ROI image is dynamically expanded, the brightness value of the brightest pixel in the processed image is greater than the brightness value of the brightest pixel in the ROI image, or the darkest pixel in the processed image is made. The brightness value is smaller than the brightness value of the darkest pixel point in the ROI image, or even the bright part of the ROI image is brighter, and the dark part of the ROI image is darker, so that the dynamic range of the processed image will be larger than the ROI image in the LDRI image. Dynamic range.
优选的,将ROI图像中的亮度最大的像素点的亮度值增大至显示屏能够显示的最大亮度值,将ROI图像中的亮度最小的像素点的亮度值减小至显示屏能够显示的最小亮度值,ROI中介于最亮点和最暗点之间的像素点的亮度值做对应的变化。Preferably, the brightness value of the pixel with the highest brightness in the ROI image is increased to the maximum brightness value that the display screen can display, and the brightness value of the pixel with the smallest brightness in the ROI image is reduced to the minimum displayable by the display screen. The brightness value, the brightness value of the pixel between the brightest point and the darkest point in the ROI is correspondingly changed.
本申请实施例中,可以对ROI图像中的每一个像素使用相同的亮度映射,具体包括线性映射和非线性映射。另外,也可以结合像素点的位置参数,对位于不同位置的像素点进行不同的亮度映射,这样处理后的图像中像素点的亮度值更加合理,显示效果更好。In this embodiment of the present application, the same luminance mapping may be used for each pixel in the ROI image, specifically including a linear mapping and a nonlinear mapping. In addition, different brightness mappings can be performed on pixel points located at different positions in combination with the positional parameters of the pixel points, so that the brightness value of the pixel points in the processed image is more reasonable and the display effect is better.
通过将ROI图像进行动态范围扩幅处理,处理后的图像的动态范围变大,图像的明暗细节将会更加丰富,显示质量得到提高。 By performing dynamic range expansion processing on the ROI image, the dynamic range of the processed image becomes larger, the light and dark details of the image are more abundant, and the display quality is improved.
方式二,在当前显示的图像为由HDRI压缩而成的LDRI时,基于HDRI重新进行动态范围压缩。In the second mode, when the currently displayed image is an LDRI compressed by HDRI, the dynamic range compression is re-based based on the HDRI.
具体的,参见图2,步骤102:对ROI图像进行动态范围处理,获得的处理后的图像的显示质量优于ROI图像的显示质量,在执行的过程中包括如下步骤:Specifically, referring to FIG. 2, step 102: performing dynamic range processing on the ROI image, and the obtained display image has better display quality than the ROI image display quality, and includes the following steps in the process of performing:
步骤1021:确定出HDRI中与ROI图像位置对应的区域图像。Step 1021: Determine an area image corresponding to the ROI image position in the HDRI.
具体来讲,由于LDRI由HDRI压缩而来,因此LDRI与HDRI二者位置对应的图像区域对应于现实世界中的同一场景。步骤1021实施时,电子设备首先获取ROI图像在LDRI中的位置参数,然后将该位置参数映射至HDRI中,进而确定出HDRI中与ROI图像位置对应的区域图像。Specifically, since the LDRI is compressed by the HDRI, the image regions corresponding to the positions of the LDRI and the HDRI correspond to the same scene in the real world. When the step 1021 is implemented, the electronic device first acquires a position parameter of the ROI image in the LDRI, and then maps the position parameter to the HDRI, thereby determining an area image corresponding to the ROI image position in the HDRI.
另外,本申请实施例中,HDRI可以为电子设备本地存储的由其他设备采集的图像,也可以是由该电子设备自身采集;电子设备自身采集时可以使用多帧不同曝光图像融合的方式,也可以使用专用硬件直接采集的方式。In addition, in the embodiment of the present application, the HDRI may be an image collected by another device stored locally by the electronic device, or may be collected by the electronic device itself; when the electronic device itself is collected, multiple frames of different exposure images may be used for fusion. You can use the direct acquisition method of dedicated hardware.
步骤1022:针对确定出的区域图像进行动态范围压缩,得到的压缩图像作为处理后的图像,该压缩图像的动态范围大于或等于LDRI中ROI图像的动态范围。Step 1022: Perform dynamic range compression on the determined area image, and obtain the compressed image as the processed image, and the dynamic range of the compressed image is greater than or equal to the dynamic range of the ROI image in the LDRI.
具体来讲,电子设备将针对确定出的HDRI中与ROI图像位置对应的区域图像进行动态范围压缩,得到压缩图像,压缩图像的动态范围大于或等于ROI图像的动态范围。Specifically, the electronic device performs dynamic range compression on the determined region image corresponding to the ROI image position in the HDRI to obtain a compressed image, and the dynamic range of the compressed image is greater than or equal to the dynamic range of the ROI image.
首先,压缩图像的动态范围大于ROI图像的动态范围包括如下三种情况:压缩图像的最亮像素点的亮度值大于ROI图像中最亮像素点的亮度值,或者压缩图像的最暗像素点的亮度值小于ROI图像中最暗像素点的亮度值,或者上面两个条件都满足。在压缩图像的动态范围大于ROI图像的动态范围时,与ROI图像相比,压缩图像的明暗细节将会更加丰富,显示质量更高。First, the dynamic range of the compressed image is greater than the dynamic range of the ROI image, including the following three cases: the brightness value of the brightest pixel of the compressed image is greater than the brightness value of the brightest pixel in the ROI image, or the darkest pixel of the compressed image. The brightness value is less than the brightness value of the darkest pixel point in the ROI image, or both of the above conditions are met. When the dynamic range of the compressed image is larger than the dynamic range of the ROI image, the brightness and darkness of the compressed image will be richer and the display quality will be higher than that of the ROI image.
例如,显示设备以8位数据来显示图像的亮度时,显示的LDRI中亮度最大的像素点的亮度值为255,亮度最小的像素点的亮度值为0。而LDRI中的用户感兴趣的ROI图像中亮度最大的像素点的亮度值为200,亮度最小的像 素点的亮度值为50,则该ROI图像的动态范围只有200:50。执行步骤1022时,采用全局映射算法将区域图像压缩为压缩图像,区域图像的最亮像素点压缩后的亮度值为255,区域图像中最暗像素点压缩后的亮度值为0,区域图像中亮度介于最亮像素点与最暗像素点之间的像素点压缩后的亮度值介于0~255之间(实际情况中,由于亮度值范围压缩,区域图像中亮度值接近最亮像素点的部分像素点压缩后的亮度值可能同为255,同理,区域图像中亮度值接近最暗像素点的部分像素点压缩后的亮度值可能同为0)。步骤1022中获得的压缩图像的动态范围为256:1,远大于LDRI中ROI图像的动态范围,压缩图像的显示质量优于ROI图像的显示质量。For example, when the display device displays the brightness of an image with 8-bit data, the brightness value of the pixel having the highest brightness in the displayed LDRI is 255, and the brightness value of the pixel having the smallest brightness is 0. The brightness of the pixel with the highest brightness in the ROI image of interest to the user in the LDRI is 200, and the image with the smallest brightness If the luminance value of the prime point is 50, the dynamic range of the ROI image is only 200:50. When step 1022 is performed, the area image is compressed into a compressed image by using a global mapping algorithm, and the brightness value of the brightest pixel of the area image is 255, and the brightness value of the darkest pixel in the area image is 0, and the area image is The brightness of the pixel between the brightest pixel and the darkest pixel is between 0 and 255. In actual cases, the luminance value in the area image is close to the brightest pixel due to the compression of the luminance value range. The brightness value of some pixels after compression may be the same as 255. Similarly, the brightness value of the partial pixel of the area image with the brightness value close to the darkest pixel may be 0). The dynamic range of the compressed image obtained in step 1022 is 256:1, which is much larger than the dynamic range of the ROI image in the LDRI, and the display quality of the compressed image is better than the display quality of the ROI image.
其次,由于步骤1022对HDRI中的区域图像进行动态范围压缩时,将针对区域图像确定图像压缩的色阶映射算法,算法更具有针对性,获得的压缩图像中像素点的亮度值分布将更加合理。而在将HDRI压缩为LDRI时,根据整幅图像的显示质量确定压缩算法,并未专门针对HDRI中的区域图像选择合适的算法,因此获得的LDRI中的ROI图像的显示质量达不到步骤1022中获得的压缩图像的显示质量。Secondly, since the step 1022 performs dynamic range compression on the region image in the HDRI, the image compression gradation mapping algorithm is determined for the region image, and the algorithm is more targeted, and the obtained luminance value distribution of the pixel in the compressed image is more reasonable. . When the HDRI is compressed into LDRI, the compression algorithm is determined according to the display quality of the entire image, and the appropriate algorithm is not specifically selected for the region image in the HDRI, so the display quality of the obtained ROI image in the LDRI does not reach the step 1022. The display quality of the compressed image obtained in .
优选的,步骤1022中获得的压缩图像的动态范围为显示设备能够响应的最大动态范围,使得压缩图像呈现尽可能详细的明暗细节,为用户提供显示质量优异的感兴趣区域的图像。Preferably, the dynamic range of the compressed image obtained in step 1022 is the maximum dynamic range that the display device can respond to, so that the compressed image presents as detailed detail as possible, providing the user with an image of the region of interest with excellent display quality.
本申请实施例中同样不限定将HDRI中的区域图像压缩为压缩图像的具体压缩算法,其可以为全局映射算法,也可以为局部映射算法。另外,该压缩算法可以与将HDRI压缩为LDRI的算法相同,也可以不同。The specific compression algorithm for compressing the area image in the HDRI into a compressed image is also not limited in the embodiment of the present application, and may be a global mapping algorithm or a local mapping algorithm. In addition, the compression algorithm may be the same as or different from the algorithm for compressing HDRI into LDRI.
具体的,步骤103中,电子设备在显示处理后的图像时,可以在显示屏的全部显示区域进行显示,也可以在显示屏的一个局部显示区域进行。而步骤103实施过程中,具体可以有以下情形:Specifically, in step 103, when displaying the processed image, the electronic device may display in all display areas of the display screen, or may perform in a partial display area of the display screen. In the implementation process of step 103, the following situations may be specifically:
情形1,在图像显示区域只显示处理后的图像,处理后的图像占满用于显示图片的显示区域。In case 1, only the processed image is displayed in the image display area, and the processed image fills the display area for displaying the picture.
情形2,仍然在图像显示区域显示LDRI,但是,将LDRI中的ROI图像 替换为处理后的图像。例如,在用户采用选中操作从LDRI中确定出ROI时,在执行步骤1021~步骤1022获得压缩图像之后,电子设备可以保持当前图像显示区域中ROI图像之外的图像部分的显示状态不变,并将ROI图像替换为压缩图像。Case 2, the LDRI is still displayed in the image display area, but the ROI image in the LDRI Replace with the processed image. For example, after the user determines the ROI from the LDRI by using the selected operation, after performing the steps 1021 to 1022 to obtain the compressed image, the electronic device can keep the display state of the image portion other than the ROI image in the current image display area unchanged, and Replace the ROI image with a compressed image.
情形3,在步骤1022中将区域图像进行动态范围压缩的同时,对HDRI中区域图像之外的部分进行相同压缩算法的压缩,即将整幅HDRI图像重新进行压缩,获得第二LDRI。其中,压缩图像同时具有第二LDRI的最亮像素点和最暗像素点,与第二LDRI的动态范围相等。步骤103实施时显示第二LDRI即可。Case 3, while the area image is subjected to dynamic range compression in step 1022, the same compression algorithm is compressed on the portion other than the area image in the HDRI, that is, the entire HDRI image is recompressed to obtain the second LDRI. The compressed image has both the brightest pixel and the darkest pixel of the second LDRI, which is equal to the dynamic range of the second LDRI. Step 103 is performed to display the second LDRI.
在不冲突的情况下,本申请实施例中步骤103的实现方式可以采用上述三种情形中任意一种。In the case of no conflict, the implementation of step 103 in the embodiment of the present application may adopt any one of the above three situations.
本申请实施例上述技术方案中,电子设备能够确定出显示图像中的ROI图像,并对ROI图像进行动态范围处理,由于获得的处理后的图像的动态范围更大,或者处理后的图像中像素点的亮度值更加合理,使得处理后的图像的显示质量优于LDRI中的ROI图像,使用户能够查看到显示质量更好的感兴趣区域的图像。In the above technical solution of the embodiment of the present application, the electronic device can determine the ROI image in the display image, and perform dynamic range processing on the ROI image, because the obtained dynamic range of the processed image is larger, or the pixel in the processed image The brightness value of the point is more reasonable, so that the display quality of the processed image is better than the ROI image in the LDRI, enabling the user to view the image of the region of interest with better display quality.
可选的,针对步骤101~步骤103的技术方案,本申请实施例提供了一种变形方案,参见图3,为本申请实施例中图像处理方法的另一细化流程示意图,该流程包括:Optionally, for the technical solution of the step 101 to the step 103, the embodiment of the present application provides a modification. Referring to FIG. 3, it is another refinement flowchart of the image processing method in the embodiment of the present application, where the process includes:
步骤201:从显示图像上确定出用户感兴趣区域ROI图像;Step 201: Determine a ROI image of a region of interest of the user from the display image.
步骤202:判断ROI图像的动态范围是否小于显示图像的动态范围;若是,则执行步骤203,否则,执行步骤205;Step 202: Determine whether the dynamic range of the ROI image is smaller than the dynamic range of the display image; if yes, execute step 203, otherwise, perform step 205;
步骤203:对ROI图像进行动态范围处理,获得的处理后的图像的显示质量优于ROI图像的显示质量;Step 203: Perform dynamic range processing on the ROI image, and the obtained display image has better display quality than the ROI image.
步骤204:显示处理后的图像。Step 204: Display the processed image.
步骤205:显示ROI图像。Step 205: Display the ROI image.
具体的,在步骤201确定出ROI图像以后,首先比较ROI图像的动态范 围与显示图像整幅图像的动态范围的大小,在ROI图像的动态范围小于显示图像的动态范围时,执行步骤203~204。其中,步骤201的实现方式与步骤101相同,步骤203~204的实现方式与步骤102~103相同,本申请实施例不再详述。Specifically, after determining the ROI image in step 201, first compare the dynamic range of the ROI image. The size of the dynamic range of the entire image is displayed. When the dynamic range of the ROI image is smaller than the dynamic range of the displayed image, steps 203-204 are performed. The implementation of the step 201 is the same as that of the step 101. The implementation of the steps 203-204 is the same as that of the steps 102-103.
步骤202中,分别搜索显示图像与ROI图像中的最亮点与最暗点,在ROI图像的最亮点的亮度值小于显示图像的最亮点的亮度值,或者在ROI图像的最暗点的亮度值大于显示图像的最暗点的亮度值,即可确定出ROI图像的动态范围是否小于显示图像的动态范围。In step 202, the brightest point and the darkest point in the display image and the ROI image are respectively searched, and the brightness value of the brightest point of the ROI image is smaller than the brightness value of the brightest point of the displayed image, or the brightness value of the darkest point of the ROI image. It is greater than the brightness value of the darkest point of the displayed image to determine whether the dynamic range of the ROI image is smaller than the dynamic range of the displayed image.
另外,通常情况下,显示图像的动态范围为显示屏能够响应的最大动态范围,因此,只需要计算ROI图像的动态范围,然后与显示屏的动态范围比较即可。In addition, in general, the dynamic range of the displayed image is the maximum dynamic range that the display can respond to. Therefore, it is only necessary to calculate the dynamic range of the ROI image and then compare it with the dynamic range of the display.
在步骤202中,如果确定ROI图像动态范围小于显示图像动态范围时,则执行步骤203~步骤204,对ROI图像进行动态范围处理,为用户显示动态范围更大、显示质量更好的图像。In step 202, if it is determined that the ROI image dynamic range is smaller than the display image dynamic range, then steps 203 to 204 are performed to perform dynamic range processing on the ROI image to display an image with a larger dynamic range and better display quality for the user.
而如果在步骤202中,如果确定ROI图像动态范围等于显示图像动态范围时,则可确定ROI图像已具有当前显示设备能够显示的最大动态范围,已经具有良好的显示效果,直接显示ROI图像即可为用户提供显示质量较好的图像。However, if in step 202, if it is determined that the ROI image dynamic range is equal to the display image dynamic range, it may be determined that the ROI image has the maximum dynamic range that the current display device can display, and has a good display effect, and the ROI image can be directly displayed. Provide users with images with better display quality.
通过上述变形方案,针对不同动态范围的ROI图像,进行对应的处理,在ROI图像的动态范围还可以提高时,对ROI图形进行动态范围扩幅处理,为用户提供动态范围更大、显示质量更好的图像;而在ROI图像的动态范围达到显示设备能够显示的阈值时,则直接显示ROI图像,避免动态范围处理引起的系统资源浪费,减小了电子设备显示图片的响应时间。Through the above variant, the corresponding processing is performed for the ROI images of different dynamic ranges, and when the dynamic range of the ROI image can be improved, the dynamic range expansion processing of the ROI graphics is performed, thereby providing the user with a larger dynamic range and better display quality. A good image; when the dynamic range of the ROI image reaches the threshold that the display device can display, the ROI image is directly displayed, thereby avoiding waste of system resources caused by dynamic range processing and reducing the response time of the electronic device displaying the image.
需要说明的是,实际情况中,在当前显示图像为由HDRI压缩而成的LDRI时,即使LDRI中ROI图像的动态范围等于LDRI的动态范围,采用合适的算法针对ROI图像重新进行动态范围压缩,获得的压缩图像的显示质量仍然能够优于LDRI中ROI图像的显示质量。这是因为在将HDRI压缩为LDRI时, 需要兼顾整幅图像的显示质量选择色阶映射的算法,而在将区域图像压缩为压缩图像时,能够选择更适合区域图像的压缩算法,因此,即使获得的压缩图像与原LDRI中的ROI图像的动态范围相同,但是由于压缩时的算法更适合,获得的压缩图像中像素点的亮度值将更加合理,显示质量优于LDRI中ROI图像的显示质量,能够提供给用户更好的观看体验。本申请实施例步骤101~步骤103的技术方案中即包含这一处理方式。It should be noted that, in the actual situation, when the current display image is an LDRI compressed by HDRI, even if the dynamic range of the ROI image in the LDRI is equal to the dynamic range of the LDRI, the dynamic range compression is performed on the ROI image by using an appropriate algorithm. The display quality of the obtained compressed image can still be superior to the display quality of the ROI image in LDRI. This is because when compressing HDRI to LDRI, It is necessary to select the algorithm of the gradation mapping in consideration of the display quality of the entire image, and when compressing the area image into a compressed image, it is possible to select a compression algorithm that is more suitable for the area image, and therefore, even the obtained compressed image and the ROI image in the original LDRI The dynamic range is the same, but because the algorithm is better when compressing, the brightness value of the pixel points in the obtained compressed image will be more reasonable, and the display quality is better than the display quality of the ROI image in LDRI, which can provide a better viewing experience for the user. This processing method is included in the technical solutions of steps 101 to 103 in the embodiment of the present application.
为了更清楚的理解本发明,通过具体应用实例对本申请实施例提供的上述图像处理方法进行详细描述。For the purpose of more clearly understanding the present invention, the above image processing method provided by the embodiments of the present application is described in detail by using specific application examples.
参见图4,为应用实例1中图像处理方法的流程示意图,该流程包括:Referring to FIG. 4, it is a schematic flowchart of an image processing method in Application Example 1, which includes:
步骤301:针对同一场景采集3帧图像,其中一帧短曝光,一帧长曝光,一帧正常曝光;Step 301: Collect 3 frames of images for the same scene, wherein one frame is shortly exposed, one frame is long exposed, and one frame is normally exposed;
步骤302:将3帧图像对齐配准,并根据相机响应函数(Camera Response Function,CRF)将3帧图像转换为辐照域图像;Step 302: align the three frames of images, and convert the three frames of images into the irradiation domain image according to a Camera Response Function (CRF);
步骤303:将获得的3帧辐照域图像加权融合,获得HDRI;Step 303: Weighting and merging the obtained 3-frame irradiation domain image to obtain an HDRI;
步骤304:在打开HDRI时,通过色阶映射将HDRI压缩为显示屏能够响应的LDRI,显示LDRI整幅图像;Step 304: When the HDRI is turned on, the HDRI is compressed by the tone scale mapping into an LDRI that the display screen can respond to, and the entire image of the LDRI is displayed;
步骤305:检测到用户的放大操作,根据放大操作从LDRI中确定出ROI图像;Step 305: detecting a zoom operation of the user, and determining an ROI image from the LDRI according to the zooming operation;
步骤306:确定出HDRI中与ROI图像位置对应的区域图像;Step 306: Determine an area image corresponding to the ROI image position in the HDRI;
步骤307:通过色阶映射将确定出的区域图像压缩为压缩图像,获得的压缩图像的动态范围达到显示设备能够显示的最大动态范围;Step 307: compress the determined area image into a compressed image by using a tone scale mapping, and obtain a dynamic range of the compressed image to reach a maximum dynamic range that the display device can display;
步骤308:显示获得的压缩图像。Step 308: Display the obtained compressed image.
应用实例1中,针对LDRI中的ROI图像,重新对HDRI中与ROI图像位置对应的区域图像进行动态范围压缩,不仅获得压缩图像的动态范围大于ROI图像的动态范围,而且由于重新压缩时采用针对区域图像的压缩算法,获得的压缩图像中像素点的亮度值将更加合理,压缩图像的显示质量优于ROI图像的显示质量,满足用户查看显示质量更好的感兴趣区域的图像的需求。 In the application example 1, for the ROI image in the LDRI, the dynamic range compression of the region image corresponding to the ROI image position in the HDRI is performed, not only obtaining the dynamic range of the compressed image but also the dynamic range of the ROI image, and The compression algorithm of the area image, the obtained brightness value of the pixel in the compressed image will be more reasonable, the display quality of the compressed image is better than the display quality of the ROI image, and the user needs to view the image of the region of interest with better display quality.
实施例2Example 2
HDRI的获取可以采用专用的图像采集硬件,或者也可以采用具有较强运算能力的芯片来执行多帧不同曝光图像的融合,对设备硬件要求较高,有些设备不能获取HDRI,只能获取到单一曝光时间的图像,但是采用单一曝光时间进行图像采集将导致图像部分细节损失,因此,在显示单一曝光时间获取的图像时,如果用户要查看单一曝光时间图像中某一用户感兴趣区域ROI图像,将难以保障该ROI图像的显示质量。HDRI can be obtained by using dedicated image acquisition hardware, or it can also use a chip with strong computing power to perform fusion of multiple frames of different exposure images. The hardware requirements of the device are high. Some devices cannot obtain HDRI and can only obtain a single device. Image of exposure time, but image acquisition with a single exposure time will result in partial loss of image detail. Therefore, when displaying an image acquired at a single exposure time, if the user wants to view a ROI image of a user's region of interest in a single exposure time image, It will be difficult to guarantee the display quality of the ROI image.
针对上述问题,本申请实施例2提供了一种图像处理方法,参见图5,为该图像处理方法的流程示意图,该流程包括如下步骤:For the above problem, Embodiment 2 of the present application provides an image processing method. Referring to FIG. 5, it is a schematic flowchart of the image processing method. The process includes the following steps:
步骤401:在显示针对同一场景的至少两帧图像中的第一帧图像时,确定至少两帧图像中的每一帧图像上的用户感兴趣区域ROI图像;Step 401: Determine, when displaying the first frame image of the at least two frames of images for the same scene, the ROI image of the user region of interest on each of the at least two frames of images;
步骤402:判断至少两帧图像中是否存在第二帧图像,第二帧图像包含的ROI图像的显示质量优于第一帧图像中包含的ROI图像的显示质量;若存在,则执行步骤403;Step 402: determining whether there is a second frame image in at least two frames of images, the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image included in the first frame image; if yes, step 403 is performed;
步骤403:从显示第一帧图像切换为显示第二帧图像中的ROI图像。Step 403: Switch from displaying the first frame image to displaying the ROI image in the second frame image.
具体的,步骤401中,当电子设备的显示屏(包括外接显示装置,例如投影仪)显示至少两帧图像中的第一帧图像时,能够确定出当前显示的第一帧图像中的用户感兴趣区域ROI图像。本申请实施例中,从第一帧图像中确定出ROI图像的实现方式与步骤101中从显示图像中确定ROI图像的实现方式相同,可参见本申请实施例中对步骤101实现方式的相关描述。Specifically, in step 401, when the display screen of the electronic device (including an external display device, such as a projector) displays the first frame image of the at least two frames of images, the user sense in the currently displayed first frame image can be determined. Interest area ROI image. In the embodiment of the present application, the implementation manner of determining the ROI image from the first frame image is the same as the implementation manner of determining the ROI image from the display image in the step 101, and the related description of the implementation manner of the step 101 in the embodiment of the present application. .
然后,确定至少两帧图像中其他各帧中的ROI图像。具体的,由于至少两帧图像针对同一场景,因此,至少两帧图像中的任意两帧图像的ROI图像位置对应。通过将第一帧图像中ROI图像的位置参数映射至至少两帧图像中第一帧之外的其他各帧中,即可在其他各帧中确定出与第一帧中ROI图像位置对应的区域图像,确定出的区域图像即为所在帧的ROI图像。Then, the ROI image in each of the other frames in the at least two frames of images is determined. Specifically, since at least two frames of images are for the same scene, the ROI image positions of any two of the at least two frames of images correspond to each other. By mapping the position parameter of the ROI image in the first frame image to each of the frames other than the first frame in the at least two frames, the region corresponding to the position of the ROI image in the first frame can be determined in each of the other frames. The image, the determined area image is the ROI image of the frame in which it is located.
可选的,步骤401中的至少两帧图像中的任意两帧图像的曝光时间不同,使得每一帧图像包含的所采集场景的明暗细节不同,例如,长曝光时间采集 的图像帧中暗部细节比较丰富,短曝光时间采集的图像中亮部细节比较丰富。Optionally, the exposure time of any two of the at least two frames of the image in step 401 is different, so that each frame image contains different brightness and dark details of the collected scene, for example, long exposure time collection. The details of the dark parts in the image frame are rich, and the details of the highlights in the images acquired during the short exposure time are rich.
步骤402中,在第一帧之外的图像中搜索第二帧图像,该第二帧图像包含的ROI图像的显示质量优于第一帧的ROI图像的显示质量。ROI图像的显示质量可以通过图像参数来进行度量。其中,图像参数可以为动态范围、亮度值、饱和度等多个参数中的任意一项或任意两项及两项以上的组合。In step 402, a second frame image is searched for in an image other than the first frame, and the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image of the first frame. The display quality of the ROI image can be measured by image parameters. The image parameter may be any one of a plurality of parameters such as a dynamic range, a brightness value, and a saturation, or a combination of any two or more of two or more.
例如,在只考虑动态范围时,图像动态范围越大则图像显示质量越好;只考虑饱和度时,图像饱和度越大则图像显示质量越好;只考虑亮度时,可以比较度量图像的亮度指标。例如,可以根据高斯函数计算图像的平均亮度指标:For example, when only the dynamic range is considered, the image display quality is larger as the image dynamic range is larger; the image display quality is better when the image saturation is larger only when the saturation is considered; the brightness of the metric image can be compared only when the brightness is considered. index. For example, the average brightness indicator of an image can be calculated from a Gaussian function:
Figure PCTCN2014087131-appb-000001
Figure PCTCN2014087131-appb-000001
其中,W为表征ROI图像平均亮度的指标,Ii,j为ROI图像中位置为(I,j)的像素点的亮度值,该亮度值映射至区间[0,1],即最亮像素点的亮度值为1,最暗像素点的亮度值为0;A为关联系数,可取为12.5。比较两个ROI图像的显示质量时,W值较大的图像的显示质量较好。Where W is an index that characterizes the average brightness of the ROI image, and I i,j is the brightness value of the pixel at position (I, j) in the ROI image, and the brightness value is mapped to the interval [0, 1], that is, the brightest pixel The brightness value of the point is 1, and the brightness value of the darkest pixel is 0; A is the correlation coefficient, which can be taken as 12.5. When comparing the display quality of two ROI images, the display quality of the image with a larger W value is better.
在同时考虑两个或以上的图像参数来衡量图像的显示质量时,针对每个参数添加权重,然后将所有图像参数的指标求和,根据获得的指标和值来比较图像显示质量的优劣。When two or more image parameters are simultaneously considered to measure the display quality of the image, weights are added for each parameter, and then the indicators of all the image parameters are summed, and the quality of the image display quality is compared according to the obtained indicators and values.
步骤403中,如果判断出存在第二帧图像,则切换显示第二帧图像中ROI图像,为用户提供显示质量更好的用户感兴趣区域的图像。具体的,显示第二帧图像中的ROI图像时,可以只显示第二帧图像中的ROI图像,也可以显示整幅第二帧图像。In step 403, if it is determined that the second frame image exists, the ROI image in the second frame image is switched to display the image of the user's region of interest with better display quality. Specifically, when the ROI image in the second frame image is displayed, only the ROI image in the second frame image may be displayed, or the entire second frame image may be displayed.
优选的,在步骤402中搜索至少两帧图像中包含的ROI图像显示质量最好的一帧图像,步骤403中切换至显示该包含的ROI图像显示质量最佳的一帧图像,进而使用户能够查看到显示质量最佳的ROI图像。Preferably, in step 402, the ROI image included in at least two frames of images is searched for the best image frame, and in step 403, the frame image is displayed to display the best image quality of the included ROI image, thereby enabling the user to View to show the best quality ROI image.
进一步,步骤401包括如下两种实现方式:Further, step 401 includes the following two implementation manners:
其一,检测用户操作,根据用户操作确定至少两帧图像中的每一帧图像 上的ROI图像。First, detecting a user operation, determining each frame image of at least two frames according to a user operation The ROI image on it.
具体来讲,首先检测用户操作,确定第一帧图像中与用户操作对应的图像部分为第一帧图像的ROI图像;用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作。其实施方式与实施例1中步骤101的方式1相同,本申请在此不再详述。Specifically, the user operation is first detected to determine that the image portion corresponding to the user operation in the first frame image is the ROI image of the first frame image; and the user operation includes any one of a zoom operation, a drag operation, and a selected operation. The embodiment is the same as the mode 1 of the step 101 in the first embodiment, and the present application will not be described in detail herein.
然后,确定至少两帧图像中第一帧图像之外的每一帧中与第一帧图像中的ROI图像位置对应的区域图像为ROI图像。即,获取第一帧图像中的ROI图像的像素位置参数,将其映射至余下各帧,确定出余下各帧中与第一帧图像中的ROI图像位置对应的区域图像,该区域图像即为所在帧对应的ROI图像。Then, it is determined that an area image corresponding to the ROI image position in the first frame image in each of the at least two frames of the first frame image is an ROI image. That is, the pixel position parameter of the ROI image in the first frame image is acquired, mapped to the remaining frames, and the area image corresponding to the ROI image position in the first frame image in the remaining frames is determined, and the area image is The ROI image corresponding to the frame.
其二,确定至少两帧图像中的每一帧图像中包含预设特征图像的图像部分为ROI图像。具体实施时,可以先确定第一帧中的ROI图像,然后采用上述位置映射的方式确定其余各帧中的ROI图像,也可以采用相同的ROI图像自动识别规则,同时在至少两帧图像中自动识别确定出各帧的ROI图像。而针对任一帧图像而言,如何确定出其中包含预设特征图像的图像部分为ROI图像,与实施例1中步骤101的方式2相同。Second, it is determined that an image portion of the at least two frames of the image including the preset feature image is an ROI image. In a specific implementation, the ROI image in the first frame may be determined first, and then the ROI image in the remaining frames is determined by using the above location mapping manner, and the same ROI image automatic recognition rule may be used, and automatically in at least two frames of images. The ROI image identifying each frame is identified. For any frame image, how to determine the image portion in which the preset feature image is included is an ROI image, which is the same as the mode 2 of step 101 in the first embodiment.
进一步,步骤401中,显示针对同一场景的至少两帧图像中的第一帧图像,包括:Further, in step 401, displaying a first frame image of at least two frames of images for the same scene, including:
确定针对同一场景的至少两帧图像中显示质量不是最差的一帧图像作为第一帧图像;Determining, as the first frame image, a frame image of which the display quality is not the worst in at least two frames of images for the same scene;
显示确定出的第一帧图像。The determined first frame image is displayed.
具体来讲,电子设备的存储装置中保存有针对同一场景的至少两帧图像,至少两帧图像可以关联同一文件名,当用户根据该文件名打开文件时,电子设备搜索出至少两帧图像中显示质量不是最差的一帧图像,以此帧图像作为第一帧图像对用户进行显示,使用户能够查看到关于该场景的整体显示质量较好的图像。其中,比较不同帧图像显示质量的方式与前述比较ROI图像的显示质量的方式相同。 Specifically, the storage device of the electronic device stores at least two frames of images for the same scene, and at least two frames of images may be associated with the same file name. When the user opens the file according to the file name, the electronic device searches for at least two frames of images. The display quality is not the worst one frame image, and the frame image is used as the first frame image to display the user, so that the user can view the image with good overall display quality of the scene. Among them, the manner of comparing the display quality of different frame images is the same as the manner of comparing the display quality of the ROI image described above.
优选的,从至少两帧图像中搜索出显示质量最好的一帧作为第一帧,对其进行显示,进而为用户提供整体显示质量最好的图像帧。Preferably, a frame with the best display quality is searched from at least two frames of images as the first frame, and displayed, thereby providing the user with an image frame with the best overall display quality.
为了更清楚的理解本发明,通过具体应用实例对本申请实施例提供的上述图像处理方法进行详细描述。For the purpose of more clearly understanding the present invention, the above image processing method provided by the embodiments of the present application is described in detail by using specific application examples.
参见图6,为应用实例2中图像处理方法的流程示意图,该流程包括:Referring to FIG. 6, which is a schematic flowchart of an image processing method in Application Example 2, the process includes:
步骤501:针对同一场景采集3帧图像,其中一帧短曝光,一帧长曝光,一帧正常曝光;Step 501: Collect 3 frames of images for the same scene, wherein one frame is shortly exposed, one frame is long exposed, and one frame is normally exposed;
步骤502:存储3帧图像,并将3帧图像关联同一文件名;Step 502: Store 3 frames of images, and associate 3 frames of images with the same file name;
步骤503:在打开该文件名对应的文件时,确定正常曝光的一帧为显示质量最好的一帧,显示正常曝光帧;Step 503: When opening the file corresponding to the file name, determining that one frame of the normal exposure is the one with the best display quality, and displaying the normal exposure frame;
步骤504:检测到用户针对正常曝光帧中的人物脸部图像的选中操作,确定正常曝光帧的ROI图像为被选中的人物脸部图像;Step 504: detecting that the user selects a face image of the person in the normal exposure frame, and determines that the ROI image of the normal exposure frame is the selected face image of the person;
步骤505:确定另外两帧中与正常曝光帧中ROI图像位置对应的区域图像为自身对应的ROI图像;Step 505: Determine an area image corresponding to the ROI image position in the normal exposure frame in the other two frames as the ROI image corresponding to the ROI image;
步骤506:判断另外两帧中是否存在一帧的ROI图像显示质量优于正常曝光帧的ROI图像的显示质量;Step 506: Determine whether the ROI image display quality of one frame in the other two frames is better than the display quality of the ROI image of the normal exposure frame.
步骤507:确定出长曝光帧的ROI图像的显示质量优于正常曝光帧的ROI图像的显示质量,显示长曝光帧的ROI图像。Step 507: It is determined that the display quality of the ROI image of the long exposure frame is better than the display quality of the ROI image of the normal exposure frame, and the ROI image of the long exposure frame is displayed.
应用实例2中,电子设备存储针对同一场景的多帧单一曝光的图像,在显示时某一帧图像时,如果确定出图像中用户感兴区域,则比较其余帧中是否有一帧中包含的用户感兴趣区域的显示质量更好,如果有,则显示显示质量更好的用户感兴趣区域的图像,为用户提供更好的查看图像的体验。In Application Example 2, the electronic device stores a multi-frame single-exposure image for the same scene. When a certain frame image is displayed, if the user-sensing region in the image is determined, whether the user included in one frame in the remaining frames is compared is compared. The display quality of the region of interest is better, and if there is, an image showing the region of interest of the user with better quality is displayed, providing the user with a better experience of viewing the image.
实施例3Example 3
基于与实施例1相同的技术构思,本申请实施例提供了一种图像处理装置,参见图7,装置包括:确定模块601,图像处理模块602,显示模块603。Based on the same technical concept as the first embodiment, the embodiment of the present application provides an image processing apparatus. Referring to FIG. 7, the apparatus includes: a determining module 601, an image processing module 602, and a display module 603.
其中,确定模块601用于从显示图像上确定出用户感兴趣区域ROI图像。The determining module 601 is configured to determine a ROI image of the user's region of interest from the displayed image.
图像处理模块602用于对ROI图像进行动态范围处理,获得的处理后的 图像的显示质量优于ROI图像的显示质量;The image processing module 602 is configured to perform dynamic range processing on the ROI image, and obtain the processed The display quality of the image is better than the display quality of the ROI image;
显示模块603用于显示处理后的图像。The display module 603 is for displaying the processed image.
可选的,显示图像为由高动态范围图像HDRI压缩而成的低动态范围图像LDRI,图像处理模块602具体用于确定出HDRI中与ROI图像位置对应的区域图像;并将确定出的区域图像进行动态范围压缩,得到的压缩图像作为处理后的图像,压缩图像的动态范围大于或等于LDRI中ROI图像的动态范围。Optionally, the display image is a low dynamic range image LDRI compressed by the high dynamic range image HDRI, and the image processing module 602 is specifically configured to determine an area image corresponding to the ROI image position in the HDRI; and determine the determined area image. The dynamic range compression is performed, and the obtained compressed image is used as the processed image, and the dynamic range of the compressed image is greater than or equal to the dynamic range of the ROI image in the LDRI.
可选的,确定模块601具体用于检测用户操作,根据用户操作从显示图像上确定出ROI图像。Optionally, the determining module 601 is specifically configured to detect a user operation, and determine an ROI image from the displayed image according to a user operation.
可选的,确定模块601具体用于检测用户操作,确定显示图像中的与用户操作对应的图像部分为ROI图像,用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作。Optionally, the determining module 601 is specifically configured to detect a user operation, determine that the image portion corresponding to the user operation in the display image is an ROI image, and the user operation includes any one of a zoom operation, a drag operation, and a selected operation.
可选的,确定模块601具体用于确定显示图像中包含预设特征图像的图像部分为ROI图像。Optionally, the determining module 601 is specifically configured to determine that the image portion of the display image that includes the preset feature image is an ROI image.
实施例4Example 4
基于与实施例2相同的技术构思,本申请实施例提供了一种图像处理装置,参见图8,装置包括:确定模块701,判断模块702,显示模块703。Based on the same technical concept as the embodiment 2, the embodiment of the present application provides an image processing apparatus. Referring to FIG. 8, the apparatus includes: a determining module 701, a determining module 702, and a display module 703.
其中,确定模块701用于在显示针对同一场景的至少两帧图像中的第一帧图像时,确定至少两帧图像中的每一帧图像上的用户感兴趣区域ROI图像;The determining module 701 is configured to: when displaying the first frame image of the at least two frames of images for the same scene, determine a ROI image of the user region of interest on each of the at least two frames of images;
判断模块702用于判断至少两帧图像中是否存在第二帧图像,第二帧图像包含的ROI图像的显示质量优于第一帧图像中包含的ROI图像的显示质量;The determining module 702 is configured to determine whether there is a second frame image in the at least two frames of images, and the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image included in the first frame image;
显示模块703用于在存在第二帧图像时从显示第一帧图像切换为显示第二帧图像中的ROI图像。The display module 703 is configured to switch from displaying the first frame image to displaying the ROI image in the second frame image when the second frame image is present.
可选的,至少两帧图像中的任意两帧图像的曝光时间不同。Optionally, the exposure time of any two of the at least two frames of images is different.
可选的,确定模块701具体用于检测用户操作,根据用户操作确定至少两帧图像中的每一帧图像上的ROI图像;或者确定至少两帧图像中的每一帧 图像中包含预设特征图像的图像部分为ROI图像。Optionally, the determining module 701 is specifically configured to detect a user operation, determine an ROI image on each of the at least two frames of images according to a user operation, or determine each frame in the at least two frames of images. The image portion of the image containing the preset feature image is an ROI image.
可选的,确定模块701具体用于检测用户操作,确定第一帧图像中与用户操作对应的图像部分为第一帧图像的ROI图像;用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作;以及用于确定至少两帧图像中第一帧图像之外的每一帧中与第一帧图像中的ROI图像位置对应的区域图像为ROI图像。Optionally, the determining module 701 is specifically configured to detect a user operation, and determine that the image portion corresponding to the user operation in the first frame image is an ROI image of the first frame image; the user operation includes a zoom operation, a drag operation, and a selected operation. Any one of the operations; and determining that the area image corresponding to the ROI image position in the first frame image in each of the at least two frames of the first frame image is an ROI image.
实施例5Example 5
基于与实施例1相同的技术构思,本申请实施例提供了一种电子设备,参见图9,电子设备包括连接到同一总线800的存储器801、处理器802及输出设备803。Based on the same technical concept as Embodiment 1, the embodiment of the present application provides an electronic device. Referring to FIG. 9, the electronic device includes a memory 801, a processor 802, and an output device 803 connected to the same bus 800.
其中,存储器801用于存储指令。处理器802用于执行指令,从显示图像上确定出用户感兴趣区域ROI图像;对ROI图像进行动态范围处理,获得的处理后的图像的显示质量优于ROI图像的显示质量;显示处理后的图像;输出设备803用于根据处理器802的指示显示图像。The memory 801 is used to store instructions. The processor 802 is configured to execute an instruction to determine a ROI image of a region of interest of the user from the display image; perform dynamic range processing on the ROI image, and obtain a display quality of the processed image that is better than a display quality of the ROI image; Image; output device 803 is configured to display an image in accordance with an indication by processor 802.
可选的,显示图像为由高动态范围图像HDRI压缩而成的低动态范围图像LDRI,处理器802用于对ROI图像进行动态范围处理,具体为:确定出HDRI中与ROI图像位置对应的区域图像;将确定出的区域图像进行动态范围压缩,得到的压缩图像作为处理后的图像,压缩图像的动态范围大于或等于LDRI中ROI图像的动态范围。Optionally, the display image is a low dynamic range image LDRI compressed by the high dynamic range image HDRI, and the processor 802 is configured to perform dynamic range processing on the ROI image, specifically: determining an area corresponding to the ROI image position in the HDRI. Image; the determined area image is subjected to dynamic range compression, and the obtained compressed image is used as the processed image, and the dynamic range of the compressed image is greater than or equal to the dynamic range of the ROI image in the LDRI.
可选的,处理器802用于从显示图像上确定出用户感兴趣区域ROI图像,具体为:检测用户操作,根据用户操作从显示图像上确定出ROI图像。Optionally, the processor 802 is configured to determine a ROI image of the user's region of interest from the display image, specifically: detecting a user operation, and determining an ROI image from the display image according to a user operation.
可选的,处理器802用于检测用户操作,根据用户操作从显示图像上确定出ROI图像,具体为:检测用户操作,确定显示图像中的与用户操作对应的图像部分为ROI图像,用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作。Optionally, the processor 802 is configured to detect a user operation, and determine an ROI image from the display image according to a user operation, specifically: detecting a user operation, determining that an image portion corresponding to the user operation in the display image is an ROI image, and the user operates It includes any one of zoom operation, drag operation, and selected operation.
可选的,处理器802用于从显示图像上确定出用户感兴趣区域ROI图像,具体为:确定显示图像中包含预设特征图像的图像部分为ROI图像。 Optionally, the processor 802 is configured to determine a ROI image of the user's region of interest from the display image, specifically: determining that the image portion of the display image that includes the preset feature image is an ROI image.
可选的,电子设备还包括:图像采集单元,用于采集图像;图像存储单元,用于存储图像,图像存储单元可以与存储器801为同一个存储器,也可以不同。Optionally, the electronic device further includes: an image acquisition unit configured to acquire an image; an image storage unit configured to store the image, and the image storage unit may be the same memory as the memory 801, or may be different.
可选的,电子设备还包括:触控单元,用户获取用户的触控操作。处理器802还用于响应获取的用户操作,生成对应的指令。Optionally, the electronic device further includes: a touch unit, where the user acquires a touch operation of the user. The processor 802 is further configured to generate a corresponding instruction in response to the obtained user operation.
较佳的,请参见图10,为本申请实施例5的电子设备的具体示意图。从图10中可以看出,电子设备包括:输出设备803、处理器802、输入设备804、随机存取存储器801、只读存储器805以及总线800。其中,处理器802通过总线800分别耦接输出设备803、输入设备804、随机存取存储器801以及只读存储器805。当需要运行所述图像处理装置时,通过固化在只读存储器805中的基本输入输出系统引导系统进行启动,引导所述图像处理装置进入正常运行状态。可见,图9中的处理器802与图10中的处理器802为同一部件,图9中的总线800与图10中的总线800为同一部件,图9中的输出设备803和图10中的输出设备803为同一部件,图9中的存储器801与图10中的随机存取存储器801为同一部件。Preferably, please refer to FIG. 10 , which is a specific schematic diagram of an electronic device according to Embodiment 5 of the present application. As can be seen from FIG. 10, the electronic device includes an output device 803, a processor 802, an input device 804, a random access memory 801, a read only memory 805, and a bus 800. The processor 802 is coupled to the output device 803, the input device 804, the random access memory 801, and the read only memory 805 via the bus 800. When it is desired to operate the image processing apparatus, the basic input/output system booting system in the read only memory 805 is booted to boot the image processing apparatus into a normal operating state. It can be seen that the processor 802 in FIG. 9 is the same component as the processor 802 in FIG. 10. The bus 800 in FIG. 9 is the same component as the bus 800 in FIG. 10, the output device 803 in FIG. 9 and the output device 803 in FIG. The output device 803 is the same component, and the memory 801 in FIG. 9 is the same component as the random access memory 801 in FIG.
在所述电子设备进入正常运行状态后,在随机存取存储器801中运行应用程序和操作系统。After the electronic device enters a normal operating state, the application and operating system are run in the random access memory 801.
输入设备804用于图像采集,其中,输入设备804可以包括摄像头(camera)、双摄像头等具有图像采集功能的设备。 Input device 804 is used for image acquisition, wherein input device 804 can include a camera, dual camera, etc. device having an image capture function.
输出设备803用于显示结果图像,其中,输出设备803可以包括触摸屏、显示器以及打印机等等。The output device 803 is for displaying a result image, wherein the output device 803 can include a touch screen, a display, a printer, and the like.
实施例6Example 6
基于与实施例2相同的技术构思,本申请实施例提供了一种电子设备,参见图11,电子设备包括:连接至同一总线900的存储器901、处理器902、输出设备903。Based on the same technical concept as Embodiment 2, an embodiment of the present application provides an electronic device. Referring to FIG. 11, the electronic device includes a memory 901, a processor 902, and an output device 903 connected to the same bus 900.
其中,存储器901用于存储指令。处理器902用于执行指令,在显示针对同一场景的至少两帧图像中的第一帧图像时,确定至少两帧图像中的每一 帧图像上的用户感兴趣区域ROI图像;判断至少两帧图像中是否存在第二帧图像,第二帧图像包含的ROI图像的显示质量优于第一帧图像中包含的ROI图像的显示质量;若存在,则从显示第一帧图像切换为显示第二帧图像中的ROI图像。输出设备903用于根据处理器的指示显示图像。The memory 901 is used to store instructions. The processor 902 is configured to execute an instruction, when displaying the first frame image of the at least two frames of images for the same scene, determining each of the at least two frames of images a ROI image of the user's region of interest on the frame image; determining whether there is a second frame image in at least two frames of images, and the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image included in the first frame image; If present, switching from displaying the first frame image to displaying the ROI image in the second frame image. The output device 903 is for displaying an image according to an instruction of the processor.
可选的,至少两帧图像中的任意两帧图像的曝光时间不同。Optionally, the exposure time of any two of the at least two frames of images is different.
可选的,处理器902用于确定至少两帧图像中的每一帧图像上的用户感兴趣区域ROI图像,具体为:检测用户操作,根据用户操作确定至少两帧图像中的每一帧图像上的ROI图像;或者确定至少两帧图像中的每一帧图像中包含预设特征图像的图像部分为ROI图像。Optionally, the processor 902 is configured to determine a ROI image of the user region of interest on each of the at least two frames of images, specifically: detecting a user operation, and determining each frame image of the at least two frames according to a user operation. The upper ROI image; or determining that the image portion of each of the at least two frames of images containing the preset feature image is an ROI image.
可选的,处理器902具体用于检测用户操作,根据用户操作确定至少两帧图像中的每一帧图像上的ROI图像,具体为:检测用户操作,确定第一帧图像中与用户操作对应的图像部分为第一帧图像的ROI图像;用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作;确定至少两帧图像中第一帧图像之外的每一帧中与第一帧图像中的ROI图像位置对应的区域图像为ROI图像。Optionally, the processor 902 is specifically configured to detect a user operation, and determine, according to a user operation, an ROI image on each of the at least two frames of images, specifically: detecting a user operation, determining that the first frame image corresponds to a user operation. The image portion is an ROI image of the first frame image; the user operation includes any one of a zoom operation, a drag operation, and a selected operation; determining each frame of the at least two frames of the image other than the first frame image The area image corresponding to the ROI image position in one frame image is an ROI image.
可选的,电子设备还包括:图像采集单元,用于采集图像;图像存储单元,用于存储图像,图像存储单元可以与存储器901为同一个存储器,也可以不同。Optionally, the electronic device further includes: an image acquisition unit configured to acquire an image; an image storage unit configured to store the image, and the image storage unit may be the same memory as the memory 901, or may be different.
可选的,电子设备还包括:触控单元,用于获取用户的触控操作。处理器802还用于响应获取的用户操作,生成对应的指令。Optionally, the electronic device further includes: a touch unit, configured to acquire a touch operation of the user. The processor 802 is further configured to generate a corresponding instruction in response to the obtained user operation.
较佳的,请参见图12,为本发明实施例6中电子设备的具体示意图。从图11中可以看出,电子设备包括:输出设备903、处理器902、输入设备904、随机存取存储器901、只读存储器905以及总线900。其中,处理器902通过总线900分别耦接输入设备904、输出设备903、随机存取存储器901以及只读存储器905。当需要运行所述图像处理装置时,通过固化在只读存储器905中的基本输入输出系统引导系统进行启动,引导所述图像处理装置进入正常运行状态。可见,图11中的处理器902与图12中的处理器902为同一部件,图11中的 总线900与图12中的总线900为同一部件,图11中的输出设备903和图12中的输出设备903为同一部件,图11中的存储器901与图12中的随机存取存储器901为同一部件。Preferably, please refer to FIG. 12 , which is a detailed schematic diagram of an electronic device according to Embodiment 6 of the present invention. As can be seen from FIG. 11, the electronic device includes an output device 903, a processor 902, an input device 904, a random access memory 901, a read only memory 905, and a bus 900. The processor 902 is coupled to the input device 904, the output device 903, the random access memory 901, and the read-only memory 905 via the bus 900. When it is desired to operate the image processing apparatus, the basic input/output system booting system in the read only memory 905 is booted to boot the image processing apparatus into a normal operating state. It can be seen that the processor 902 in FIG. 11 is the same component as the processor 902 in FIG. 12, in FIG. The bus 900 is the same component as the bus 900 of FIG. 12, the output device 903 of FIG. 11 and the output device 903 of FIG. 12 are the same component, and the memory 901 of FIG. 11 is the same as the random access memory 901 of FIG. component.
在电子设备进入正常运行状态后,在随机存取存储器901中运行应用程序和操作系统。After the electronic device enters a normal operating state, the application and operating system are run in the random access memory 901.
输入设备904用于图像采集,其中,输入设备904可以包括摄像头(camera)、双摄像头等具有图像采集功能的设备。 Input device 904 is used for image acquisition, wherein input device 904 can include a camera, dual camera, etc. device having image capture functionality.
输出设备903用于显示结果图像,其中,输出设备903可以包括触摸屏、显示器以及打印机等等。The output device 903 is for displaying a result image, wherein the output device 903 may include a touch screen, a display, a printer, and the like.
申请实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点:One or more technical solutions provided in the application embodiments have at least the following technical effects or advantages:
本申请实施例中,电子设备能够确定出显示图像中的ROI图像,并对ROI图像进行动态范围处理,由于获得的处理后的图像的动态范围更大,或者处理后的图像中像素点的亮度值更加合理,使得处理后的图像的显示质量优于LDRI中的ROI图像,使用户能够查看到显示质量更好的感兴趣区域的图像。In the embodiment of the present application, the electronic device can determine the ROI image in the display image, and perform dynamic range processing on the ROI image, because the obtained dynamic range of the processed image is larger, or the brightness of the pixel in the processed image. The value is more reasonable, so that the display quality of the processed image is better than the ROI image in the LDRI, enabling the user to view the image of the region of interest with better display quality.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。It will be clearly understood by those skilled in the art that for the convenience and brevity of the description, only the division of each functional module described above is exemplified. In practical applications, the above function assignment can be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to perform all or part of the functions described above. For the specific working process of the system, the device and the unit described above, reference may be made to the corresponding process in the foregoing method embodiments, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。 In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the technical solution of the present application may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, A server, or network device, or the like, or a processor, performs all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
以上所述,以上实施例仅用以对本申请的技术方案进行了详细介绍,但以上实施例的说明只是用于帮助理解本发明的方法及其核心思想,不应理解为对本发明的限制。本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。 The above embodiments are only used to describe the technical solutions of the present application in detail, but the description of the above embodiments is only for helping to understand the method and the core idea of the present invention, and should not be construed as limiting the present invention. Those skilled in the art will be able to devise variations or alternatives within the scope of the present invention within the scope of the present invention.

Claims (27)

  1. 一种图像处理方法,其特征在于,所述方法包括:An image processing method, the method comprising:
    从显示图像上确定出用户感兴趣区域ROI图像;Determining an ROI image of a region of interest of the user from the display image;
    对所述ROI图像进行动态范围处理,获得的处理后的图像的显示质量优于所述ROI图像的显示质量;Performing dynamic range processing on the ROI image, and obtaining a display quality of the processed image is better than a display quality of the ROI image;
    显示所述处理后的图像。The processed image is displayed.
  2. 如权利要求1所述的方法,其特征在于,所述显示图像为由高动态范围图像HDRI压缩而成的低动态范围图像LDRI,所述对所述ROI图像进行动态范围处理,包括:The method according to claim 1, wherein the display image is a low dynamic range image LDRI compressed by a high dynamic range image HDRI, and the dynamic range processing of the ROI image comprises:
    确定出所述HDRI中与所述ROI图像位置对应的区域图像;Determining an area image corresponding to the ROI image position in the HDRI;
    针对确定出的所述区域图像进行动态范围压缩,得到的压缩图像作为所述处理后的图像,所述压缩图像的动态范围大于或等于所述ROI图像的动态范围。And performing dynamic range compression on the determined area image, and the obtained compressed image is used as the processed image, and the dynamic range of the compressed image is greater than or equal to a dynamic range of the ROI image.
  3. 如权利要求1或2所述的方法,其特征在于,从显示图像上确定出用户感兴趣区域ROI图像,包括:The method according to claim 1 or 2, wherein determining the ROI image of the user's region of interest from the display image comprises:
    检测用户操作,根据所述用户操作从所述显示图像上确定出所述ROI图像。A user operation is detected, and the ROI image is determined from the display image according to the user operation.
  4. 如权利要求3所述的方法,其特征在于,检测用户操作,根据所述用户操作从所述显示图像上确定出所述ROI图像,包括:The method of claim 3, wherein detecting the user operation, determining the ROI image from the display image according to the user operation comprises:
    检测所述用户操作,确定所述显示图像中的与所述用户操作对应的图像部分为所述ROI图像,所述用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作。Detecting the user operation, determining that an image portion corresponding to the user operation in the display image is the ROI image, and the user operation includes any one of a zoom operation, a drag operation, and a selection operation.
  5. 如权利要求1或2所述的方法,其特征在于,从显示图像上确定出用户感兴趣区域ROI图像,包括:The method according to claim 1 or 2, wherein determining the ROI image of the user's region of interest from the display image comprises:
    确定所述显示图像中包含预设特征图像的图像部分为所述ROI图像。Determining that the image portion of the display image including the preset feature image is the ROI image.
  6. 一种图像处理方法,其特征在于,所述方法包括: An image processing method, the method comprising:
    在显示针对同一场景的至少两帧图像中的第一帧图像时,确定所述至少两帧图像中的每一帧图像上的用户感兴趣区域ROI图像;Determining a user region ROI image on each of the at least two frames of images when displaying the first frame image of the at least two frames of images for the same scene;
    判断所述至少两帧图像中是否存在第二帧图像,所述第二帧图像包含的ROI图像的显示质量优于所述第一帧图像中包含的ROI图像的显示质量;Determining whether there is a second frame image in the at least two frames of images, and the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image included in the first frame image;
    若存在,则从显示所述第一帧图像切换为显示所述第二帧图像中的ROI图像。If present, switching from displaying the first frame image to displaying the ROI image in the second frame image.
  7. 如权利要求6所述的方法,其特征在于,所述至少两帧图像中的任意两帧图像的曝光时间不同。The method of claim 6 wherein the exposure time of any two of the at least two frames of images is different.
  8. 如权利要求6所述的方法,其特征在于,确定所述至少两帧图像中的每一帧图像上的用户感兴趣区域ROI图像,包括:The method of claim 6, wherein determining a ROI image of the user region of interest on each of the at least two frames of images comprises:
    检测用户操作,根据所述用户操作确定所述至少两帧图像中的每一帧图像上的ROI图像;或者Detecting a user operation, determining an ROI image on each of the at least two frames of images according to the user operation; or
    确定所述至少两帧图像中的每一帧图像中包含预设特征图像的图像部分为ROI图像。Determining, in each of the at least two frames of images, an image portion including a preset feature image as an ROI image.
  9. 如权利要求8所述的方法,其特征在于,检测用户操作,根据所述用户操作确定所述至少两帧图像中的每一帧图像上的ROI图像,包括:The method according to claim 8, wherein detecting a user operation, determining an ROI image on each of the at least two frames of images according to the user operation comprises:
    检测所述用户操作,确定所述第一帧图像中与所述用户操作对应的图像部分为所述第一帧图像的ROI图像;所述用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作;Detecting the user operation, determining that an image portion corresponding to the user operation in the first frame image is an ROI image of the first frame image; and the user operation includes a zoom operation, a drag operation, and a selection operation Any kind of operation;
    确定所述至少两帧图像中所述第一帧图像之外的每一帧中与所述第一帧图像中的ROI图像位置对应的区域图像为ROI图像。Determining, in each frame other than the first frame image, the area image corresponding to the ROI image position in the first frame image in the at least two frames of images is an ROI image.
  10. 一种图像处理装置,其特征在于,包括:An image processing apparatus, comprising:
    确定模块,用于从显示图像上确定出用户感兴趣区域ROI图像;a determining module, configured to determine a ROI image of the user's region of interest from the display image;
    图像处理模块,用于对所述ROI图像进行动态范围处理,获得的处理后的图像的显示质量优于所述ROI图像的显示质量;An image processing module, configured to perform dynamic range processing on the ROI image, and obtain a display quality of the processed image that is better than a display quality of the ROI image;
    显示模块,用于显示所述处理后的图像。a display module for displaying the processed image.
  11. 如权利要求10所述的装置,其特征在于,所述显示图像为由高动态 范围图像HDRI压缩而成的低动态范围图像LDRI,所述图像处理模块具体用于:确定出所述HDRI中与所述ROI图像位置对应的区域图像;并针对确定出的所述区域图像进行动态范围压缩,得到的压缩图像作为所述处理后的图像,所述压缩图像的动态范围大于或等于所述ROI图像的动态范围。The device of claim 10 wherein said display image is highly dynamic a low dynamic range image LDRI compressed by the range image HDRI, the image processing module is specifically configured to: determine an area image corresponding to the ROI image position in the HDRI; and perform dynamic on the determined area image The range is compressed, and the obtained compressed image is used as the processed image, and the dynamic range of the compressed image is greater than or equal to the dynamic range of the ROI image.
  12. 如权利要求10或11所述的装置,其特征在于,所述确定模块具体用于:检测用户操作,根据所述用户操作从所述显示图像上确定出所述ROI图像。The apparatus according to claim 10 or 11, wherein the determining module is specifically configured to: detect a user operation, and determine the ROI image from the display image according to the user operation.
  13. 如权利要求12所述的装置,其特征在于,所述确定模块具体用于:检测所述用户操作,确定所述显示图像中的与所述用户操作对应的图像部分为所述ROI图像,所述用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作。The device according to claim 12, wherein the determining module is specifically configured to: detect the user operation, and determine that an image portion corresponding to the user operation in the display image is the ROI image, The user operation includes any one of a zoom operation, a drag operation, and a selected operation.
  14. 如权利要求10或11所述的装置,其特征在于,所述确定模块具体用于:确定所述显示图像中包含预设特征图像的图像部分为所述ROI图像。The device according to claim 10 or 11, wherein the determining module is specifically configured to: determine that an image portion of the display image that includes a preset feature image is the ROI image.
  15. 一种图像处理装置,其特征在于,包括:An image processing apparatus, comprising:
    确定模块,用于在显示针对同一场景的至少两帧图像中的第一帧图像时,确定所述至少两帧图像中的每一帧图像上的用户感兴趣区域ROI图像;a determining module, configured to determine a ROI image of a user region of interest on each of the at least two frames of images when displaying the first frame image of the at least two frames of images for the same scene;
    判断模块,用于判断所述至少两帧图像中是否存在第二帧图像,所述第二帧图像包含的ROI图像的显示质量优于所述第一帧图像中包含的ROI图像的显示质量;a determining module, configured to determine whether there is a second frame image in the at least two frames of images, where the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image included in the first frame image;
    显示模块,用于在存在所述第二帧图像时从显示所述第一帧图像切换为显示所述第二帧图像中的ROI图像。And a display module, configured to switch from displaying the first frame image to displaying an ROI image in the second frame image when the second frame image is present.
  16. 如权利要求15所述的方法,其特征在于,所述至少两帧图像中的任意两帧图像的曝光时间不同。The method of claim 15 wherein the exposure time of any two of the at least two frames of images is different.
  17. 如权利要求15所述的装置,其特征在于,所述确定模块具体用于:检测用户操作,根据所述用户操作确定所述至少两帧图像中的每一帧图像上的ROI图像;或者确定所述至少两帧图像中的每一帧图像中包含预设特征图像的图像部分为ROI图像。 The apparatus according to claim 15, wherein the determining module is specifically configured to: detect a user operation, determine an ROI image on each of the at least two frames of images according to the user operation; or determine An image portion including a preset feature image in each of the at least two frames of images is an ROI image.
  18. 如权利要求17所述的装置,其特征在于,所述确定模块具体用于:检测所述用户操作,确定所述第一帧图像中与所述用户操作对应的图像部分为所述第一帧图像的ROI图像;所述用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作;以及用于确定所述至少两帧图像中所述第一帧图像之外的每一帧中与所述第一帧图像中的ROI图像位置对应的区域图像为ROI图像。The device according to claim 17, wherein the determining module is specifically configured to: detect the user operation, and determine that an image portion corresponding to the user operation in the first frame image is the first frame An ROI image of the image; the user operation includes any one of a zoom operation, a drag operation, and a selected operation; and determining each frame other than the first frame image in the at least two frames of images The area image corresponding to the ROI image position in the first frame image is an ROI image.
  19. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    存储器,用于存储指令;a memory for storing instructions;
    处理器,用于执行所述指令,从显示图像上确定出用户感兴趣区域ROI图像;对所述ROI图像进行动态范围处理,获得的处理后的图像的显示质量优于所述ROI图像的显示质量;显示所述处理后的图像;a processor, configured to execute the instruction, determine a ROI image of a region of interest of the user from the display image; perform dynamic range processing on the ROI image, and obtain a display quality of the processed image that is better than display of the ROI image Quality; display the processed image;
    输出设备,用于根据所述处理器的指示显示图像。An output device for displaying an image according to an indication of the processor.
  20. 如权利要求19所述的电子设备,其特征在于,所述显示图像为由高动态范围图像HDRI压缩而成的低动态范围图像LDRI,所述处理器用于对所述ROI图像进行动态范围处理,具体为:确定出所述HDRI中与所述ROI图像位置对应的区域图像;针对确定出的所述区域图像进行动态范围压缩,得到的压缩图像作为所述处理后的图像,所述压缩图像的动态范围大于或等于所述ROI图像的动态范围。The electronic device according to claim 19, wherein the display image is a low dynamic range image LDRI compressed by a high dynamic range image HDRI, and the processor is configured to perform dynamic range processing on the ROI image, Specifically, determining an area image corresponding to the ROI image position in the HDRI; performing dynamic range compression on the determined area image, and obtaining a compressed image as the processed image, the compressed image The dynamic range is greater than or equal to the dynamic range of the ROI image.
  21. 如权利要求19或20所述的电子设备,其特征在于,所述处理器用于从显示图像上确定出用户感兴趣区域ROI图像,具体为:检测用户操作,根据所述用户操作从所述显示图像上确定出所述ROI图像。The electronic device according to claim 19 or 20, wherein the processor is configured to determine a ROI image of the user's region of interest from the display image, specifically: detecting a user operation, and displaying the image according to the user operation The ROI image is determined on the image.
  22. 如权利要求21所述的电子设备,其特征在于,所述处理器用于检测用户操作,根据所述用户操作从所述显示图像上确定出所述ROI图像,具体为:检测所述用户操作,确定所述显示图像中的与所述用户操作对应的图像部分为所述ROI图像,所述用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作。The electronic device according to claim 21, wherein the processor is configured to detect a user operation, and determine the ROI image from the display image according to the user operation, specifically: detecting the user operation, Determining, in the display image, an image portion corresponding to the user operation is the ROI image, and the user operation includes any one of a zoom operation, a drag operation, and a selection operation.
  23. 如权利要求19或20所述的电子设备,其特征在于,所述处理器用 于从显示图像上确定出用户感兴趣区域ROI图像,具体为:确定所述显示图像中包含预设特征图像的图像部分为所述ROI图像。The electronic device according to claim 19 or 20, wherein said processor is Determining the ROI image of the user's region of interest from the display image, specifically: determining that the image portion of the display image that includes the preset feature image is the ROI image.
  24. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    存储器,用于存储指令;a memory for storing instructions;
    处理器,用于执行所述指令,在显示针对同一场景的至少两帧图像中的第一帧图像时,确定所述至少两帧图像中的每一帧图像上的用户感兴趣区域ROI图像;判断所述至少两帧图像中是否存在第二帧图像,所述第二帧图像包含的ROI图像的显示质量优于所述第一帧图像中包含的ROI图像的显示质量;若存在,则从显示所述第一帧图像切换为显示所述第二帧图像中的ROI图像;a processor, configured to execute, when displaying the first frame image of the at least two frames of images for the same scene, determining a ROI image of the user region of interest on each of the at least two frames of images; Determining whether there is a second frame image in the at least two frames of images, wherein the display quality of the ROI image included in the second frame image is better than the display quality of the ROI image included in the first frame image; if present, Displaying that the first frame image is switched to display an ROI image in the second frame image;
    输出设备,用于根据所述处理器的指示显示图像。An output device for displaying an image according to an indication of the processor.
  25. 如权利要求24所述的电子设备,其特征在于,所述至少两帧图像中的任意两帧图像的曝光时间不同。The electronic device according to claim 24, wherein an exposure time of any two of the at least two frames of images is different.
  26. 如权利要求24所述的电子设备,其特征在于,所述处理器用于确定所述至少两帧图像中的每一帧图像上的用户感兴趣区域ROI图像,具体为:检测用户操作,根据所述用户操作确定所述至少两帧图像中的每一帧图像上的ROI图像;或者确定所述至少两帧图像中的每一帧图像中包含预设特征图像的图像部分为ROI图像。The electronic device according to claim 24, wherein the processor is configured to determine a ROI image of a user region of interest on each of the at least two frames of images, specifically: detecting a user operation, according to The user operation determines an ROI image on each of the at least two frames of images; or determines that an image portion of the at least two frames of each of the at least two frames of images includes a preset feature image as an ROI image.
  27. 如权利要求26所述的电子设备,其特征在于,所述处理器具体用于检测用户操作,根据所述用户操作确定所述至少两帧图像中的每一帧图像上的ROI图像,具体为:检测所述用户操作,确定所述第一帧图像中与所述用户操作对应的图像部分为所述第一帧图像的ROI图像;所述用户操作包括缩放操作、拖动操作、选中操作中的任意一种操作;确定所述至少两帧图像中所述第一帧图像之外的每一帧中与所述第一帧图像中的ROI图像位置对应的区域图像为ROI图像。 The electronic device according to claim 26, wherein the processor is specifically configured to detect a user operation, and determine an ROI image on each of the at least two frames of images according to the user operation, specifically Detecting the user operation, determining that an image portion corresponding to the user operation in the first frame image is an ROI image of the first frame image; the user operation includes a zoom operation, a drag operation, and a selection operation Any one of the operations; determining, in each frame of the at least two frames, the area image corresponding to the ROI image position in the first frame image in each of the first frame images is an ROI image.
PCT/CN2014/087131 2014-09-22 2014-09-22 Image processing method and apparatus and electronic device WO2016044983A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/087131 WO2016044983A1 (en) 2014-09-22 2014-09-22 Image processing method and apparatus and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/087131 WO2016044983A1 (en) 2014-09-22 2014-09-22 Image processing method and apparatus and electronic device

Publications (1)

Publication Number Publication Date
WO2016044983A1 true WO2016044983A1 (en) 2016-03-31

Family

ID=55580032

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/087131 WO2016044983A1 (en) 2014-09-22 2014-09-22 Image processing method and apparatus and electronic device

Country Status (1)

Country Link
WO (1) WO2016044983A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389547A (en) * 2018-09-30 2019-02-26 北京小米移动软件有限公司 Image display method and apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000125185A (en) * 1998-10-20 2000-04-28 Olympus Optical Co Ltd Electronic camera
US20050104900A1 (en) * 2003-11-14 2005-05-19 Microsoft Corporation High dynamic range image viewing on low dynamic range displays
CN1288597C (en) * 2001-06-19 2006-12-06 三洋电机株式会社 Image synthesizer
US20120287309A1 (en) * 2011-05-10 2012-11-15 Canon Kabushiki Kaisha Image capturing apparatus, control method thereof, and storage medium
US20140092012A1 (en) * 2012-09-28 2014-04-03 Kalpana Seshadrinathan Adaptive tone map to a region of interest to yield a low dynamic range image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000125185A (en) * 1998-10-20 2000-04-28 Olympus Optical Co Ltd Electronic camera
CN1288597C (en) * 2001-06-19 2006-12-06 三洋电机株式会社 Image synthesizer
US20050104900A1 (en) * 2003-11-14 2005-05-19 Microsoft Corporation High dynamic range image viewing on low dynamic range displays
US20120287309A1 (en) * 2011-05-10 2012-11-15 Canon Kabushiki Kaisha Image capturing apparatus, control method thereof, and storage medium
US20140092012A1 (en) * 2012-09-28 2014-04-03 Kalpana Seshadrinathan Adaptive tone map to a region of interest to yield a low dynamic range image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389547A (en) * 2018-09-30 2019-02-26 北京小米移动软件有限公司 Image display method and apparatus
CN109389547B (en) * 2018-09-30 2023-05-09 北京小米移动软件有限公司 Image display method and device

Similar Documents

Publication Publication Date Title
CN110210571B (en) Image recognition method and device, computer equipment and computer readable storage medium
US9491366B2 (en) Electronic device and image composition method thereof
US10847073B2 (en) Image display optimization method and apparatus
CN113747085B (en) Method and device for shooting video
CN112954210B (en) Photographing method and device, electronic equipment and medium
KR102244248B1 (en) Operating Method For content and Electronic Device supporting the same
CN109040523B (en) Artifact eliminating method and device, storage medium and terminal
CN106254807B (en) Electronic device and method for extracting still image
CN110290426B (en) Method, device and equipment for displaying resources and storage medium
US20230245441A9 (en) Image detection method and apparatus, and electronic device
CN108665510B (en) Rendering method and device of continuous shooting image, storage medium and terminal
CN113822898A (en) Intelligent cropping of images
US10733706B2 (en) Mobile device, and image processing method for mobile device
CN116916151B (en) Shooting method, electronic device and storage medium
CN113452969B (en) Image processing method and device
WO2019091487A1 (en) Image photographing method and device, terminal, and storage medium
KR20130134546A (en) Method for create thumbnail images of videos and an electronic device thereof
WO2016044983A1 (en) Image processing method and apparatus and electronic device
CN113393391B (en) Image enhancement method, image enhancement device, electronic apparatus, and storage medium
CN112383708B (en) Shooting method and device, electronic equipment and readable storage medium
CN117769696A (en) Display method, electronic device, storage medium, and program product
CN113012085A (en) Image processing method and device
CN112489006A (en) Image processing method, image processing device, storage medium and terminal
CN113518172A (en) Image processing method and device
JP2014222817A (en) Image display apparatus, image magnification and display method, and program

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

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

Country of ref document: EP

Kind code of ref document: A1