CN116320334A - Projection picture color correction method, apparatus, projection device and storage medium - Google Patents

Projection picture color correction method, apparatus, projection device and storage medium Download PDF

Info

Publication number
CN116320334A
CN116320334A CN202310067458.8A CN202310067458A CN116320334A CN 116320334 A CN116320334 A CN 116320334A CN 202310067458 A CN202310067458 A CN 202310067458A CN 116320334 A CN116320334 A CN 116320334A
Authority
CN
China
Prior art keywords
projection
color
image
determining
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310067458.8A
Other languages
Chinese (zh)
Inventor
王豪庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Formovie Chongqing Innovative Technology Co Ltd
Original Assignee
Formovie Chongqing Innovative Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Formovie Chongqing Innovative Technology Co Ltd filed Critical Formovie Chongqing Innovative Technology Co Ltd
Priority to CN202310067458.8A priority Critical patent/CN116320334A/en
Publication of CN116320334A publication Critical patent/CN116320334A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
    • H04N9/3179Video signal processing therefor
    • H04N9/3182Colour adjustment, e.g. white balance, shading or gamut
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
    • H04N9/3141Constructional details thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Video Image Reproduction Devices For Color Tv Systems (AREA)

Abstract

The application relates to a projection picture color correction method, a projection picture color correction device, a projection device and a storage medium. The method comprises the following steps: obtaining a projection picture image; the projection picture image is an image obtained by image acquisition aiming at a reference projection picture; the reference projection picture is a projection picture which is displayed by the projection equipment when the white image is projected on the projection surface; determining a projection area image corresponding to a reference projection picture area from the projection picture images; determining a dominant color in the projected area image; determining target gain coefficients corresponding to the color channels respectively according to the color values of the main colors in the color channels; and adjusting the current gain coefficients of the projection equipment in each color channel to corresponding target gain coefficients so as to correct the colors of projection pictures displayed on the projection surface by the projection equipment. The method can improve the color quality of the projection picture.

Description

Projection picture color correction method, apparatus, projection device and storage medium
Technical Field
The present disclosure relates to the field of projection devices, and in particular, to a method and apparatus for correcting color of a projection screen, a projection device, and a storage medium.
Background
With the development of science and technology, various projection devices are endlessly layered, and a lot of convenience is brought to the work and life of people. However, in an actual usage scenario, the color of the projection surface projected by the projection device is not necessarily white, and may be other colors than white, so that the color of the projection screen presented by the projection device projected on the projection surface is not the color of the original screen, and the color quality of the projection screen is reduced. Such as: when the projection device projects onto the light red wall surface, the projection picture projected onto the light red wall surface can show a color which is biased towards light red.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a projection screen color correction method, apparatus, projection device, computer-readable storage medium, and computer program product that improve the color quality of a projection screen.
In a first aspect, the present application provides a method for color correction of a projection screen. The method comprises the following steps:
obtaining a projection picture image; the projection picture image is an image obtained by image acquisition aiming at a reference projection picture; the reference projection picture is a projection picture which is displayed by the projection equipment when the white image is projected on the projection surface;
Determining a projection area image corresponding to a reference projection picture area from the projection picture images;
determining a dominant color in the projected area image;
determining target gain coefficients corresponding to the color channels respectively according to the color values of the main colors in the color channels;
and adjusting the current gain coefficients of the projection equipment in each color channel to corresponding target gain coefficients so as to correct the colors of projection pictures displayed on the projection surface by the projection equipment.
In a second aspect, the present application further provides a projection screen color correction apparatus. The device comprises:
the image acquisition module is used for acquiring a projection picture image; the projection picture image is an image obtained by image acquisition aiming at a reference projection picture; the reference projection picture is a projection picture which is displayed by the projection equipment when the white image is projected on the projection surface;
the projection area determining module is used for determining a projection area image corresponding to the reference projection picture area from the projection picture images;
a main color determining module for determining a main color in the projection area image;
the gain coefficient determining module is used for determining target gain coefficients corresponding to the color channels respectively according to the color values of the main colors in the color channels;
And the gain adjustment module is used for adjusting the current gain coefficients of the projection equipment in each color channel to the corresponding target gain coefficients so as to correct the colors of the projection pictures displayed on the projection surface by the projection equipment.
In one embodiment, the projection area determining module is further configured to perform binarization processing on the projection screen image according to a target threshold value to obtain a binarized image; extracting the outline of the binarized image to obtain the outline in the binarized image; performing polygon fitting on each contour in the binarized image; determining a target polygon which accords with a preset shape and has the largest area from all polygons obtained by fitting, and taking the target polygon as a reference projection picture area; and extracting image content corresponding to the reference projection picture area from the projection picture image to obtain a projection area image.
In one embodiment, the projection area determining module is further configured to determine coordinates of each vertex of the reference projection screen area; and extracting image contents corresponding to the reference projection picture area from the projection picture image according to the coordinates of each vertex to obtain a projection area image.
In one embodiment, the projection area determining module is further configured to determine a pixel average value of a vertex area in the projection screen image and a pixel average value of a center area of the projection screen image; and determining a target threshold according to the average value between the pixel average value of the vertex region and the pixel average value of the central region.
In one embodiment, the primary color determining module is further configured to cluster each pixel point in the projection area image according to a color value of the pixel point to obtain a plurality of clusters; determining a target cluster with the most pixels from the plurality of clusters; and determining the color value of the clustering center of the target cluster as the main color in the projection area image.
In one embodiment, the primary color determining module is further configured to randomly select a plurality of initial cluster centers from each pixel point in the projection area image, where the initial cluster centers are used as current cluster centers; dividing each pixel point in the projection area image into different current initial cluster clusters according to the distance between the color value of each pixel point in the projection area image and the color value of each current cluster center; calculating a new cluster center of each current initial cluster according to each pixel point in each current initial cluster, and taking the new cluster center as a new current cluster center; and returning to execute the steps of dividing each pixel point in the projection area image into different current initial clusters and subsequent steps according to the distance between the color value of each pixel point in the projection area image and the color value of each current cluster center until a stopping condition is met, and obtaining a plurality of final clusters.
In one embodiment, the gain factor determining module is further configured to set a target gain factor corresponding to a color channel where the minimum color value is located as a conventional gain factor; the minimum color value is the minimum value of the color values of the main color in each color channel; determining target gain coefficients corresponding to the color channels to be adjusted respectively according to the conventional gain coefficients and first difference values corresponding to the color channels to be adjusted respectively; the color channels to be adjusted are color channels except the color channel in which the minimum color value is located; the first difference value corresponding to each color channel to be adjusted is the difference value between the color value of the color channel to be adjusted and the xiao Yan color value; the target gain coefficient corresponding to the color channel to be adjusted is smaller than the conventional gain coefficient.
In one embodiment, the gain coefficient determining module is further configured to determine, according to the first difference values corresponding to the color channels to be adjusted and the preset adjustment coefficients, the second difference values corresponding to the color channels to be adjusted respectively; and determining target gain coefficients corresponding to the color channels to be adjusted respectively according to the second difference values corresponding to the conventional gain coefficients and the color channels to be adjusted respectively.
In a third aspect, the present application also provides a projection apparatus. The projection device includes a memory and a processor, wherein the memory stores a computer program, and the computer program when executed by the processor causes the processor to execute the steps in the projection picture color correction method according to each embodiment of the present application.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, causes the processor to perform the steps in the projection screen color correction method according to the embodiments of the present application.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, causes the processor to execute the steps in the projection screen color correction method according to the embodiments of the present application.
The projection picture color correction method, the device, the projection equipment, the storage medium and the computer program product acquire the projection picture image obtained by image acquisition of the reference projection picture presented by the projection equipment for projecting the white image onto the projection surface, determine the projection area image corresponding to the reference projection picture area from the projection picture image, then determine the main color in the projection area image, determine the target gain coefficients corresponding to the color channels according to the color values of the main color in the color channels, and finally adjust the current gain coefficients of the projection equipment in the color channels to the corresponding target gain coefficients, thereby correcting the color of the projection picture presented by the projection equipment projected onto the projection surface, reducing the influence of the color of the projection surface on the color of the projection picture, and improving the color quality of the projection picture.
Drawings
FIG. 1 is a diagram of an application environment of a projection screen color correction method according to an embodiment;
FIG. 2 is a flowchart of a method for color correction of a projection screen according to an embodiment;
FIG. 3 is a graph showing the contrast of the front-to-back effect of color correction of a projection screen according to one embodiment;
FIG. 4 is a schematic diagram of clustering pixels in one embodiment;
FIG. 5 is a flowchart illustrating an overall color correction method for a projection screen according to an embodiment;
FIG. 6 is a block diagram showing a configuration of a projection screen color correction apparatus according to an embodiment;
fig. 7 is an internal structural diagram of a projection device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The color correction method of the projection picture provided by the embodiment of the application can be applied to an application environment shown in fig. 1. The projection device 102 may project the projection surface 104, and the projection surface 104 may present the projection screen 106. The projection device 102 may project a white image onto the projection surface 104, a reference projection image may be presented on the projection surface, the projection device 102 may acquire a projection image obtained by image acquisition for the reference projection image, determine a projection area image corresponding to the reference projection image area from the projection image, then determine a main color in the projection area image, determine target gain coefficients corresponding to each color channel according to color values of the main color in each color channel, and finally adjust the current gain coefficients of the projection device 102 in each color channel to the corresponding target gain coefficients to correct the color of the projection image presented by the projection device 102 projected onto the projection surface. The projection device 102 may be any device having a projection function, for example: projectors, laser projection televisions, and the like. Projection surface 104 may be a surface onto which a projection device projects, such as: wall surfaces, projection curtains, etc.
In one embodiment, as shown in fig. 2, a method for correcting color of a projection screen is provided, which is described by taking the projection device 102 in fig. 1 as an example, and includes the following steps:
step 202, obtaining a projection picture image; the projection picture image is an image obtained by image acquisition with respect to a reference projection picture; the reference projection screen is a projection screen presented by the projection apparatus for projecting a white image onto a projection surface.
The projection plane refers to a plane on which the projection device projects. Such as: the projection surface can be a wall surface, a projection curtain or the like. The projection screen refers to a screen presented by the projection device projecting an image or an image onto a projection surface. It will be appreciated that the projection screen is not the image or image content itself projected by the projection device, but rather the image content projected on the projection surface is superimposed with the projection surface to present a screen that is viewable by the human eye or that can be acquired by the image acquisition device.
In one embodiment, the white image is a solid white image, i.e., the pixel value of each pixel in the white image is the maximum pixel value. For example: and if the pixel value in the image is 0 to 255, the pixel value of each pixel point in the white image is 255.
In one embodiment, the projection device may project a white image onto a projection surface that presents a reference projection screen.
In one embodiment, the projection device may acquire an image of a reference projection screen presented on the projection surface through a built-in image acquisition unit, so as to obtain a projection screen image. The image acquisition unit may be a unit with an image acquisition function built in the projection apparatus. For example: the image acquisition unit may be a camera.
In another embodiment, the terminal used by the user may perform image acquisition on a reference projection screen presented on the projection surface, obtain a projection screen image, and then send the projection screen image to the projection device. The terminal used by the user can communicate with the projection device through a network or Bluetooth mode. The terminal used by the user can be various personal computers, notebook computers, smart phones, tablet computers, internet of things equipment and portable wearable equipment with image acquisition functions, the internet of things equipment can be intelligent sound boxes, intelligent televisions, intelligent air conditioners, intelligent vehicle-mounted equipment and the like, and the portable wearable equipment can be intelligent watches, intelligent bracelets, head-mounted equipment and the like.
Step 204, a projection area image corresponding to the reference projection screen area is determined from the projection screen images.
The reference projection screen region refers to a region corresponding to the reference projection screen in the projection screen image. The projection area image refers to an image corresponding to the reference projection screen area in the projection screen image.
In one embodiment, the projection device may determine the reference projection screen area from the projection screen image.
In one embodiment, the projection device may extract image content corresponding to the reference projection screen region from the projection screen image to obtain a projection area image.
In another embodiment, the projection device may determine the image content corresponding to the reference projection screen region in the projection screen image as the projection area image, i.e. the image content corresponding to the reference projection screen region is not extracted from the projection screen image, but the step 206 and the subsequent steps are directly performed for the image content corresponding to the reference projection screen region in the projection screen image.
Step 206, determining the dominant color in the projected area image.
The main color is the color with the largest area occupation ratio in the projection area image.
Step 208, determining the target gain coefficients corresponding to the color channels according to the color values of the main color in the color channels.
In one embodiment, the color channels may include a red channel (R channel), a green channel (G channel), and a blue channel (B channel).
In one embodiment, the projection device may perform three-channel pixel value decomposition on the primary color to obtain color values (i.e., pixel values) of the primary color in each color channel.
In one embodiment, the projection device may set the target gain coefficient corresponding to the color channel in which the minimum color value is located as the conventional gain coefficient, and set the target gain coefficient corresponding to each color value to be adjusted to be a coefficient smaller than the conventional gain coefficient. Wherein the minimum color value is the minimum value of the color values of the main color in each color channel. The color channels to be adjusted are color channels other than the color channel in which the minimum color value is located. The conventional gain factor is a gain factor conventionally used for factory setting of the projection apparatus.
For example: the RGB value of the main color is [138,36,23], that is, the color value of the main color in the red channel is 138, the color value in the green channel is 36, and the color value in the blue channel is 23, the color channel in which the minimum color value 23 is located is the blue channel, so that the target gain coefficient corresponding to the blue channel can be set to a conventional gain coefficient, and the target gain coefficients corresponding to the red channel and the green channel can be set to coefficients smaller than the conventional gain coefficient.
Step 210, adjusting the current gain coefficients of the projection device in each color channel to the corresponding target gain coefficients to correct the colors of the projection pictures presented by the projection device projected onto the projection surface.
In one embodiment, the projection device may adjust the current gain coefficient of the projection device in each color channel to a corresponding target gain coefficient, and perform projection according to the target gain coefficient of each color channel, so as to correct the color of the projection screen presented by the projection device projected onto the projection surface.
As shown in fig. 3, (a) is a schematic view of the effect of the projection screen before the color correction of the projection screen, and (b) is a schematic view of the effect of the projection screen after the color correction of the projection screen, it can be seen that the color of the projection screen is greatly affected by the color of the projection surface before the color correction, resulting in the color of the projection screen being almost similar to the color on the projection surface other than the projection screen, and the color of the projection screen being affected less by the color of the projection surface after the color correction, and presenting the color of the projection content itself.
According to the projection picture color correction method, the projection picture image obtained by carrying out image acquisition on the reference projection picture presented by the projection equipment for projecting the white image onto the projection surface is obtained, the projection area image corresponding to the reference projection picture area is determined from the projection picture image, then the main color in the projection area image is determined, the target gain coefficients corresponding to the color channels are determined according to the color values of the main color in the color channels, and finally the current gain coefficients of the projection equipment in the color channels are adjusted to the corresponding target gain coefficients, so that the color of the projection picture presented by the projection equipment projected onto the projection surface can be corrected, the influence of the color of the projection surface on the color of the projection picture is reduced, and the color quality of the projection picture is improved.
In one embodiment, determining a projection area image corresponding to the reference projection screen area from the projection screen images includes: according to the target threshold, carrying out binarization processing on the projection picture image to obtain a binarized image; carrying out contour extraction on the binarized image to obtain a contour in the binarized image; performing polygon fitting on each contour in the binarized image; determining a target polygon which accords with a preset shape and has the largest area from all polygons obtained by fitting, and taking the target polygon as a reference projection picture area; and extracting image content corresponding to the reference projection picture area from the projection picture image to obtain a projection area image.
In one embodiment, the projection device may convert the projection screen image into a gray image, and then perform binarization processing on the projection screen image converted into the gray image according to the target threshold value to obtain a binarized image.
In one embodiment, the projection device may call an adaptive threshold function in opencv (computer vision software library), and perform binarization processing according to the target threshold value, to obtain a binarized image.
In one embodiment, the projection device may set a pixel value of a pixel point in the projected image having a pixel value greater than or equal to the target threshold to a maximum pixel value, and set a pixel value of a pixel point having a pixel value less than the target threshold to a minimum pixel value, to obtain the binarized image. It can be understood that the color corresponding to the maximum pixel value is white, the color corresponding to the minimum pixel value is black, which is equivalent to turning pixels in the projected picture image with pixel values greater than or equal to the target threshold value to white and turning pixels with pixel values less than the target threshold value to black. For example: for a projection screen image having 256 gray levels, the pixel value range is 0 to 255, and the pixel value of the pixel point in the projection screen image having the pixel value greater than or equal to the target threshold value may be set to 255, and the pixel value of the pixel point having the pixel value less than the target threshold value may be set to 0.
In one embodiment, the target threshold may be preset. In another embodiment, the target threshold may be determined from the projected picture image.
In one embodiment, before performing contour extraction on the binarized image to obtain a contour in the binarized image, the projection device may perform noise reduction processing on the binarized image to obtain a noise-reduced binarized image, and then perform contour extraction on the noise-reduced binarized image to obtain a contour in the binarized image. In one embodiment, the noise reduction process may be a gaussian filter process or the like. In one embodiment, the projection device may invoke a Gaussian Blur function in opencv (computer vision software library) to Gaussian filter the binarized image.
In one embodiment, performing contour extraction on the binarized image to obtain a contour in the binarized image includes: and performing edge detection on the binarized image to obtain an edge detection result, and performing contour search on the edge detection result to obtain a contour in the binarized image. In one embodiment, the projection device may invoke a Canny function in opencv (computer vision software library) to perform edge detection on the binary image, to obtain an edge detection result. In one embodiment, the projection device may invoke a findContours function in opencv (computer vision software library) to perform a contour search on the edge detection result to obtain a contour in the binarized image. The contour search is a process of finding a contour in an image.
In one embodiment, the projection device may traverse each contour and perform a polygon fit on each contour separately to obtain a plurality of polygons. In one embodiment, the projection device may call an appxpolydp function in opencv (computer vision software library) for polygon fitting.
In one embodiment, the preset shape is a shape of a reference projection screen. In one embodiment, in the case that the reference projection screen is rectangular, the preset shape is rectangular, and the projection device may determine, from the fitted polygons, a target polygon having a rectangular shape and a largest area as the reference projection screen area. In one embodiment, in the case that the preset shape is a rectangle, the projection device may determine, from the fitted polygons, a target polygon having 4 sides and the largest area as the reference projection screen area.
In the above embodiment, since the reference projection screen region is obtained by projecting a white image, the pixel value in the region in the projection screen image must be greater than the pixel values in other regions, so the projection screen image is subjected to binarization processing, then the contours in the binarization image are extracted, each contour is subjected to polygon fitting, and the target polygon which meets the preset shape and has the largest area is determined from the polygons obtained by fitting.
In one embodiment, extracting image content corresponding to a reference projection screen region from a projection screen image, obtaining a projection area image includes: determining coordinates of each vertex of the reference projection screen region; and extracting image contents corresponding to the reference projection picture area from the projection picture image according to the coordinates of each vertex to obtain a projection area image.
In one embodiment, in the case where the shape of the reference projection screen region is rectangular, the projection apparatus may determine coordinates of 4 vertices of the reference projection screen region, and then extract image contents corresponding to the reference projection screen region from the projection screen image according to the coordinates of the 4 vertices, to obtain the projection region image.
In the above embodiment, the coordinates of each vertex of the reference projection screen region are determined, and the image content corresponding to the reference projection screen region is extracted from the projection screen image based on the coordinates of each vertex, so that the projection area image is obtained, and the projection area image can be accurately obtained.
In one embodiment, before performing binarization processing on the projection screen image according to the target threshold value to obtain a binarized image, the method further includes: determining a pixel average value of a vertex region in the projection picture image and a pixel average value of a central region of the projection picture image; the target threshold is determined based on an average between the pixel average of the vertex region and the pixel average of the center region.
Wherein the vertex region is a region at the vertex of the projection screen image. The center region is a region at the center of the projection screen image. The pixel average value refers to an average value of pixel values of each pixel point in the region.
In one embodiment, the vertex region and the center region may be pre-sized. The vertex region and the center region may be the same or different in size.
In one embodiment, the projection device may determine a pixel average value for each vertex region in the projected picture image, and determine the target threshold based on an average value between the pixel average value for each vertex region and the pixel average value for the center region.
In the above embodiment, the target threshold is determined according to the average value between the pixel average value of the vertex region and the pixel average value of the center region, so that the target threshold can be accurately determined, and the projected screen image can be subjected to binarization processing according to the accurate target threshold.
In one embodiment, determining the dominant color in the projected area image comprises: clustering each pixel point according to the color value of each pixel point in the projection area image to obtain a plurality of clustering clusters; determining a target cluster with the most pixels from a plurality of clusters; and determining the color value of the cluster center of the target cluster as the main color in the projection area image.
Wherein each cluster contains at least one pixel point. Each cluster has a cluster center. The cluster center of the cluster is one of the pixel points in the cluster. The target cluster is the cluster with the most pixels in a plurality of clusters obtained by clustering.
In one embodiment, the projection device may cluster each pixel point by any one of a Kmeans clustering algorithm, a hierarchical clustering algorithm, a DBSCAN clustering algorithm, or the like.
In one embodiment, the color values of the pixel points include color values of the pixel points in a plurality of channels. The projection device may cluster each pixel point according to the distance between the color values of each channel of each pixel point in the projection area image.
In one embodiment, the projection device may determine the number of pixels in each cluster, and determine the target cluster with the most pixels from the plurality of clusters according to the number of pixels in each cluster.
In the above embodiment, since there may be multiple colors on the projection surface, there may be multiple colors in the projection area image, so, according to the color values of each pixel point in the projection area image, clustering is performed on each pixel point to obtain multiple clusters, the target cluster with the largest pixel point is determined from the multiple clusters, and the color value of the cluster center of the target cluster is determined as the main color in the projection area image, so that the main color with the largest area ratio in the projection area image can be accurately determined.
In one embodiment, clustering each pixel point according to a color value of each pixel point in the projection area image, to obtain a plurality of clusters includes: randomly selecting a plurality of initial clustering centers from each pixel point in the projection area image to serve as current clustering centers; dividing each pixel point in the projection area image into different current initial cluster clusters according to the distance between the color value of each pixel point in the projection area image and the color value of each current cluster center; according to each pixel point in each current initial cluster, calculating a new cluster center of each current initial cluster as a new current cluster center; and returning to execute the steps of dividing each pixel point in the projection area image into different current initial clusters and subsequent steps according to the distance between the color value of each pixel point in the projection area image and the color value of each current cluster center until the stopping condition is met, and obtaining a plurality of final clusters.
In one embodiment, the number of initial cluster centers may be preset. For example: the number of initial cluster centers may be greater than or equal to 3 and less than or equal to 5.
In one embodiment, for each pixel point in the projection area image, the projection device may calculate a distance between a color value of the pixel point and a color value of each current cluster center, and divide the pixel point into an initial cluster corresponding to the cluster center with the smallest distance.
In one embodiment, the stop condition may be that the respective current cluster center positions are unchanged. In another embodiment, the stop condition may be that the number of iterations is greater than or equal to a preset number of times threshold.
In one embodiment, the projection device may take as a final plurality of clusters a plurality of current initial clusters when the stop condition is satisfied.
As shown in fig. 4, a schematic diagram of clustering the respective pixels is shown. First, as shown in a of fig. 4, a plurality of initial cluster centers are randomly selected, and 3 cluster centers of C1, C2, and C3 are selected in the figure. Then, as shown in B in fig. 4, each pixel point is divided into different initial clusters. Next, as shown in C in fig. 4, a new cluster center of each initial cluster is calculated, as shown in D in fig. 4, to obtain initial clusters corresponding to the respective new cluster centers, and then the step in C in fig. 4 is performed again.
In the above embodiment, each pixel point in the projection area image is iteratively clustered until the current cluster center is unchanged, so as to obtain a plurality of final clusters, and the plurality of clusters can be accurately determined, so that the main color in the projection area image can be accurately determined.
In one embodiment, determining the target gain coefficients respectively corresponding to the color channels according to the color values of the main color in the color channels comprises: setting a target gain coefficient corresponding to a color channel where the minimum color value is located as a conventional gain coefficient; the minimum color value is the minimum value of the color values of the main color in each color channel; determining target gain coefficients corresponding to the color channels to be adjusted respectively according to the conventional gain coefficients and the first difference values corresponding to the color channels to be adjusted respectively; wherein the color channel to be adjusted is a color channel except the color channel with the minimum color value; the first difference value corresponding to each color channel to be adjusted is the difference value between the color value of the color channel to be adjusted and the xiao Yan color value; the target gain coefficient corresponding to the color channel to be adjusted is smaller than the conventional gain coefficient.
For example: the conventional gain factor is 1024, the RGB value of the main color is [138,36,23], that is, the color value of the main color in the red channel is 138, the color value in the green channel is 36, the color value in the blue channel is 23, the color channel in which the minimum color value 23 is located is the blue channel, and the color channels to be adjusted are the red channel and the green channel. The projection device may set the target gain factor for the blue channel to 1024. The red channel corresponds to a first difference of 138-23=115 and the green channel corresponds to a first difference of 36-23=13. The projection device may determine a target gain coefficient corresponding to the red channel according to the first difference 115 and the conventional gain coefficient 1024 corresponding to the red channel, and determine a target gain coefficient corresponding to the green channel according to the first difference 13 and the conventional gain coefficient 1024 corresponding to the green channel, where the target gain coefficients corresponding to the red channel and the green channel are less than 1024, respectively.
In one embodiment, the projection device may determine a second difference value corresponding to the color channel to be adjusted according to the first difference value corresponding to the color channel to be adjusted, and then determine a target gain coefficient corresponding to the color channel to be adjusted according to a difference value between the conventional gain coefficient and the second difference value corresponding to the color channel to be adjusted. In one embodiment, the projection device may determine a difference between the conventional gain coefficient and the second difference corresponding to the color channel to be adjusted as the target gain coefficient corresponding to the color channel to be adjusted.
In one embodiment, the second difference may be positively correlated with the first difference. That is, the larger the first difference, the larger the second difference; the smaller the first difference, the smaller the second difference.
In one embodiment, the second difference may be linearly positively correlated with the first difference. In another embodiment, the second difference may be non-linearly positive correlated with the first difference.
In the above embodiment, the target gain coefficient corresponding to the color channel where the minimum color value is located is set as the conventional gain coefficient, and the target gain coefficient corresponding to each color channel to be adjusted is determined according to the conventional gain coefficient and the first difference value corresponding to each color channel to be adjusted, where the target gain coefficient corresponding to each color channel to be adjusted is smaller than the conventional gain coefficient, so that the main color in the image of the projection area can be reduced, the influence of the color of the projection surface on the color of the projection screen is avoided, and the color quality of the projection screen is improved.
In one embodiment, determining the target gain coefficient corresponding to each color channel to be adjusted according to the conventional gain coefficient and the first difference value corresponding to each color channel to be adjusted includes: determining second differences corresponding to the color channels to be adjusted according to the first differences corresponding to the color channels to be adjusted and preset adjustment coefficients; and determining target gain coefficients corresponding to the color channels to be adjusted respectively according to the second difference values corresponding to the conventional gain coefficients and the color channels to be adjusted respectively.
In one embodiment, the projection device may multiply the first differences corresponding to the color channels to be adjusted by a preset adjustment coefficient to obtain the second differences corresponding to the color channels to be adjusted.
In one embodiment, the projection device may determine the target gain coefficient corresponding to each color channel to be adjusted according to the difference between the conventional gain coefficient and the second difference corresponding to each color channel to be adjusted. In one embodiment, the projection device determines a difference between the conventional gain coefficient and the second difference value corresponding to each color channel to be adjusted as the target gain coefficient corresponding to each color channel to be adjusted.
For example: the preset adjustment coefficient is 3, the conventional gain coefficient is 1024, the RGB value of the main color is [138,36,23], that is, the color value of the main color in the red channel is 138, the color value of the main color in the green channel is 36, and the color value of the minimum color value 23 in the blue channel is 23, so that the color channels to be adjusted are the red channel and the green channel. The red channel corresponds to a first difference of 138-23=115 and the green channel corresponds to a first difference of 36-23=13. The second difference corresponding to the red channel is 115×3, and the second difference corresponding to the green channel is 13×3, so that the target gain coefficient corresponding to the red channel is 1024-115×3=679, and the target gain coefficient corresponding to the green channel is 1024-13×3=985.
In the above embodiment, according to the first difference value corresponding to each color channel to be adjusted and the preset adjustment coefficient, the second difference value corresponding to each color channel to be adjusted is determined, and then according to the second difference value corresponding to each color channel to be adjusted and the conventional gain coefficient, the target gain coefficient corresponding to each color channel to be adjusted is determined, so that the target gain coefficient corresponding to each color channel to be adjusted can be accurately determined, and the main color in the projection area image can be reduced to a proper degree, thereby avoiding the influence of the color of the projection surface on the color of the projection screen, and improving the color quality of the projection screen.
As shown in fig. 5, which is a schematic overall flow chart of the present application, firstly, an image acquisition unit of a projection device may perform image acquisition to obtain a projection image, then determine a projection area image from the projection image, then determine a main color in the projection area image, then disassemble the main color into a pixel value of a B channel (i.e., a color value), a pixel value of a G channel, and a pixel value of an R channel, and determine target gain coefficients corresponding to each color channel according to the pixel value of the B channel, the pixel value of the G channel, and the pixel value of the R channel.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a projection screen color correction device for realizing the above-mentioned projection screen color correction method. The implementation of the solution provided by the device is similar to that described in the above method, so the specific limitation in the embodiments of the color correction device for a projection screen provided below may be referred to as the limitation of the color correction method for a projection screen hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 6, there is provided a projection screen color correction apparatus 600 including: an image acquisition module 602, a projection area determination module 604, a primary color determination module 606, a gain factor determination module 608, and a gain adjustment module 610, wherein:
an image acquisition module 602, configured to acquire a projection screen image; the projection picture image is an image obtained by image acquisition with respect to a reference projection picture; the reference projection screen is a projection screen presented by the projection apparatus for projecting a white image onto a projection surface.
The projection area determining module 604 is configured to determine a projection area image corresponding to the reference projection screen area from the projection screen images.
A primary color determination module 606 is configured to determine a primary color in the projection area image.
The gain coefficient determining module 608 is configured to determine, according to color values of the main color in each color channel, a target gain coefficient corresponding to each color channel.
The gain adjustment module 610 is configured to adjust the current gain coefficients of the projection apparatus in each color channel to corresponding target gain coefficients, so as to correct the color of the projection screen presented by the projection apparatus projected onto the projection surface.
In one embodiment, the projection area determining module 604 is further configured to perform binarization processing on the projection screen image according to the target threshold value to obtain a binarized image; carrying out contour extraction on the binarized image to obtain a contour in the binarized image; performing polygon fitting on each contour in the binarized image; determining a target polygon which accords with a preset shape and has the largest area from all polygons obtained by fitting, and taking the target polygon as a reference projection picture area; and extracting image content corresponding to the reference projection picture area from the projection picture image to obtain a projection area image.
In one embodiment, the projection area determination module 604 is further configured to determine coordinates of respective vertices of the reference projection screen area; and extracting image contents corresponding to the reference projection picture area from the projection picture image according to the coordinates of each vertex to obtain a projection area image.
In one embodiment, the projection area determining module 604 is further configured to determine a pixel average value of the vertex area in the projection screen image and a pixel average value of the center area of the projection screen image; the target threshold is determined based on an average between the pixel average of the vertex region and the pixel average of the center region.
In one embodiment, the primary color determining module 606 is further configured to cluster each pixel point according to the color value of each pixel point in the projection area image, so as to obtain a plurality of clusters; determining a target cluster with the most pixels from a plurality of clusters; and determining the color value of the cluster center of the target cluster as the main color in the projection area image.
In one embodiment, the primary color determining module 606 is further configured to randomly select a plurality of initial cluster centers from each pixel point in the projection area image, where the initial cluster centers are used as current cluster centers; dividing each pixel point in the projection area image into different current initial cluster clusters according to the distance between the color value of each pixel point in the projection area image and the color value of each current cluster center; according to each pixel point in each current initial cluster, calculating a new cluster center of each current initial cluster as a new current cluster center; and returning to execute the steps of dividing each pixel point in the projection area image into different current initial clusters and subsequent steps according to the distance between the color value of each pixel point in the projection area image and the color value of each current cluster center until the stopping condition is met, and obtaining a plurality of final clusters.
In one embodiment, the gain coefficient determining module 608 is further configured to set a target gain coefficient corresponding to a color channel where the minimum color value is located as a conventional gain coefficient; the minimum color value is the minimum value of the color values of the main color in each color channel; determining target gain coefficients corresponding to the color channels to be adjusted respectively according to the conventional gain coefficients and the first difference values corresponding to the color channels to be adjusted respectively; wherein the color channel to be adjusted is a color channel except the color channel with the minimum color value; the first difference value corresponding to each color channel to be adjusted is the difference value between the color value of the color channel to be adjusted and the xiao Yan color value; the target gain coefficient corresponding to the color channel to be adjusted is smaller than the conventional gain coefficient.
In one embodiment, the gain coefficient determining module 608 is further configured to determine a second difference value corresponding to each color channel to be adjusted according to the first difference value corresponding to each color channel to be adjusted and a preset adjustment coefficient; and determining target gain coefficients corresponding to the color channels to be adjusted respectively according to the second difference values corresponding to the conventional gain coefficients and the color channels to be adjusted respectively.
According to the projection picture color correction device, the projection picture image obtained by carrying out image acquisition on the reference projection picture presented by the projection equipment for projecting the white image onto the projection surface is obtained, the projection area image corresponding to the reference projection picture area is determined from the projection picture image, then the main color in the projection area image is determined, the target gain coefficients corresponding to the color channels are determined according to the color values of the main color in the color channels, and finally the current gain coefficients of the projection equipment in the color channels are adjusted to the corresponding target gain coefficients, so that the color of the projection picture presented by the projection equipment projected onto the projection surface can be corrected, the influence of the color of the projection surface on the color of the projection picture is reduced, and the color quality of the projection picture is improved.
The above-mentioned respective modules in the projection screen color correction apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the projection device, or may be stored in software in a memory in the projection device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a projection device is provided, the internal structure of which may be as shown in FIG. 7. The projection device includes a processor, a memory, and a network interface coupled via a system bus. Wherein the processor of the projection device is configured to provide computing and control capabilities. The memory of the projection device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the projection device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a projection screen color correction method.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the projection device to which the present application is applied, and that a particular projection device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a projection device is provided, including a memory having a computer program stored therein and a processor, which when executing the computer program performs the steps of the method embodiments described above.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (12)

1. A method for color correction of a projected picture, the method comprising:
obtaining a projection picture image; the projection picture image is an image obtained by image acquisition aiming at a reference projection picture; the reference projection picture is a projection picture which is displayed by the projection equipment when the white image is projected on the projection surface;
determining a projection area image corresponding to a reference projection picture area from the projection picture images;
Determining a dominant color in the projected area image;
determining target gain coefficients corresponding to the color channels respectively according to the color values of the main colors in the color channels;
and adjusting the current gain coefficients of the projection equipment in each color channel to corresponding target gain coefficients so as to correct the colors of projection pictures displayed on the projection surface by the projection equipment.
2. The method of claim 1, wherein determining a projection area image corresponding to a reference projection screen area from the projection screen images comprises:
according to a target threshold value, carrying out binarization processing on the projection picture image to obtain a binarized image;
extracting the outline of the binarized image to obtain the outline in the binarized image;
performing polygon fitting on each contour in the binarized image;
determining a target polygon which accords with a preset shape and has the largest area from all polygons obtained by fitting, and taking the target polygon as a reference projection picture area;
and extracting image content corresponding to the reference projection picture area from the projection picture image to obtain a projection area image.
3. The method according to claim 2, wherein extracting the image content corresponding to the reference projection picture area from the projection picture image to obtain a projection area image includes:
determining coordinates of each vertex of the reference projection screen region;
and extracting image contents corresponding to the reference projection picture area from the projection picture image according to the coordinates of each vertex to obtain a projection area image.
4. The method of claim 2, wherein prior to binarizing the projected picture image according to a target threshold to obtain a binarized image, the method further comprises:
determining a pixel average value of a vertex region in the projection picture image and a pixel average value of a central region of the projection picture image;
and determining a target threshold according to the average value between the pixel average value of the vertex region and the pixel average value of the central region.
5. The method of claim 1, wherein the determining the dominant color in the projected area image comprises:
clustering each pixel point in the projection area image according to the color value of each pixel point to obtain a plurality of clusters;
Determining a target cluster with the most pixels from the plurality of clusters;
and determining the color value of the clustering center of the target cluster as the main color in the projection area image.
6. The method of claim 5, wherein clustering each pixel point in the projection area image according to the color value of the pixel point to obtain a plurality of clusters comprises:
randomly selecting a plurality of initial clustering centers from each pixel point in the projection area image to serve as current clustering centers;
dividing each pixel point in the projection area image into different current initial cluster clusters according to the distance between the color value of each pixel point in the projection area image and the color value of each current cluster center;
calculating a new cluster center of each current initial cluster according to each pixel point in each current initial cluster, and taking the new cluster center as a new current cluster center;
and returning to execute the steps of dividing each pixel point in the projection area image into different current initial clusters and subsequent steps according to the distance between the color value of each pixel point in the projection area image and the color value of each current cluster center until a stopping condition is met, and obtaining a plurality of final clusters.
7. The method according to any one of claims 1 to 6, wherein determining the target gain coefficients respectively corresponding to the respective color channels according to the color values of the main color in the respective color channels comprises:
setting a target gain coefficient corresponding to a color channel where the minimum color value is located as a conventional gain coefficient; the minimum color value is the minimum value of the color values of the main color in each color channel;
determining target gain coefficients corresponding to the color channels to be adjusted respectively according to the conventional gain coefficients and first difference values corresponding to the color channels to be adjusted respectively;
the color channels to be adjusted are color channels except the color channel in which the minimum color value is located; the first difference value corresponding to each color channel to be adjusted is the difference value between the color value of the color channel to be adjusted and the xiao Yan color value; the target gain coefficient corresponding to the color channel to be adjusted is smaller than the conventional gain coefficient.
8. The method of claim 7, wherein determining the target gain coefficient for each color channel to be adjusted based on the conventional gain coefficient and the first difference value for each color channel to be adjusted, respectively, comprises:
Determining second difference values corresponding to the color channels to be adjusted respectively according to the first difference values corresponding to the color channels to be adjusted and preset adjustment coefficients;
and determining target gain coefficients corresponding to the color channels to be adjusted respectively according to the second difference values corresponding to the conventional gain coefficients and the color channels to be adjusted respectively.
9. A projection screen color correction apparatus, the apparatus comprising:
the image acquisition module is used for acquiring a projection picture image; the projection picture image is an image obtained by image acquisition aiming at a reference projection picture; the reference projection picture is a projection picture which is displayed by the projection equipment when the white image is projected on the projection surface;
the projection area determining module is used for determining a projection area image corresponding to the reference projection picture area from the projection picture images;
a main color determining module for determining a main color in the projection area image;
the gain coefficient determining module is used for determining target gain coefficients corresponding to the color channels respectively according to the color values of the main colors in the color channels;
and the gain adjustment module is used for adjusting the current gain coefficients of the projection equipment in each color channel to the corresponding target gain coefficients so as to correct the colors of the projection pictures displayed on the projection surface by the projection equipment.
10. Projection device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 8 when the computer program is executed.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 8.
12. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 8.
CN202310067458.8A 2023-01-16 2023-01-16 Projection picture color correction method, apparatus, projection device and storage medium Pending CN116320334A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310067458.8A CN116320334A (en) 2023-01-16 2023-01-16 Projection picture color correction method, apparatus, projection device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310067458.8A CN116320334A (en) 2023-01-16 2023-01-16 Projection picture color correction method, apparatus, projection device and storage medium

Publications (1)

Publication Number Publication Date
CN116320334A true CN116320334A (en) 2023-06-23

Family

ID=86826500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310067458.8A Pending CN116320334A (en) 2023-01-16 2023-01-16 Projection picture color correction method, apparatus, projection device and storage medium

Country Status (1)

Country Link
CN (1) CN116320334A (en)

Similar Documents

Publication Publication Date Title
US11210765B2 (en) Image processing method and device, storage medium and computer device
KR102084343B1 (en) Background removal
US20230230204A1 (en) Image processing method and apparatus, and method and apparatus for training image processing model
US20180253852A1 (en) Method and device for locating image edge in natural background
CN111489322B (en) Method and device for adding sky filter to static picture
CN113781406B (en) Scratch detection method and device for electronic component and computer equipment
CN115115554B (en) Image processing method and device based on enhanced image and computer equipment
US9940543B2 (en) Control of computer vision pre-processing based on image matching using structural similarity
CN113706393A (en) Video enhancement method, device, equipment and storage medium
CN112381073A (en) IQ (in-phase/quadrature) adjustment method and adjustment module based on AI (Artificial Intelligence) face detection
WO2024041108A1 (en) Image correction model training method and apparatus, image correction method and apparatus, and computer device
CN107341770B (en) Dynamic range extension highlight information recovery
CN116320334A (en) Projection picture color correction method, apparatus, projection device and storage medium
CN115082345A (en) Image shadow removing method and device, computer equipment and storage medium
CN115049572A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
AU2011200830B2 (en) Method, apparatus and system for modifying quality of an image
CN116188332B (en) Image processing method, device, equipment and storage medium
CN116030450B (en) Checkerboard corner recognition method, device, equipment and medium
CN118015102A (en) Image processing method, apparatus, electronic device, and computer-readable storage medium
CN111275725B (en) Method and device for determining color temperature and tone of image, storage medium and terminal
CN116883257A (en) Image defogging method, device, computer equipment and storage medium
CN115170431A (en) Image processing method and device and electronic equipment
CN118314030A (en) Image fusion method, device, electronic equipment and storage medium
CN117793510A (en) Camera light filling lamp control method, device, computer equipment and storage medium
CN118172623A (en) Training data construction method, training data construction device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination