CN113763860A - Display color determination method and device, electronic equipment and storage medium - Google Patents

Display color determination method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113763860A
CN113763860A CN202111076603.6A CN202111076603A CN113763860A CN 113763860 A CN113763860 A CN 113763860A CN 202111076603 A CN202111076603 A CN 202111076603A CN 113763860 A CN113763860 A CN 113763860A
Authority
CN
China
Prior art keywords
image
display area
frame
display
target object
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
CN202111076603.6A
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.)
Hangzhou Haikang Fire Technology Co ltd
Original Assignee
Hangzhou Haikang Fire 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 Hangzhou Haikang Fire Technology Co ltd filed Critical Hangzhou Haikang Fire Technology Co ltd
Priority to CN202111076603.6A priority Critical patent/CN113763860A/en
Publication of CN113763860A publication Critical patent/CN113763860A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/2003Display of colours
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/02Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the way in which colour is displayed
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/10Intensity circuits

Abstract

The embodiment of the application provides a display color determining method, a display color determining device, electronic equipment and a storage medium, and relates to the technical field of image processing, wherein the method comprises the following steps: acquiring at least two frames of original images, wherein the display contents of the at least two frames of original images are the same, and a first display area of each frame of original image is used for displaying a target object; determining an integral image of any one frame of image in at least two frames of original images; determining a second display area of the target object on each frame of original image on the integral image, and calculating the average brightness value of the second display area; and determining the display color of the target object on the first display area of each frame of the original image according to the average brightness value of the second display area. Thus, the consumption of computing resources can be reduced, and the display efficiency of the target object can be improved.

Description

Display color determination method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method and an apparatus for determining a display color, an electronic device, and a storage medium.
Background
In the related art, a target object (e.g., text, or graphics) may be displayed while an image is displayed based On an OSD (On Screen Display) technique.
In order to enable the user to clearly browse the target object when viewing the image, the color of the target object may be determined according to the brightness value of the image area where the target object is located in the image. For example, if the luminance value of the image region where the target object is located is large, the target object may be displayed in a darker color. If the brightness value of the image area where the target object is located is small, the target object can be displayed in a bright color.
However, when multiple paths of images with the same content need to be displayed, based on the related art, the brightness values of all pixel points in the image area occupied by the target object in each path of image need to be calculated, the related calculation amount is large, the calculation resources are consumed, and the display efficiency of the target object is influenced.
Disclosure of Invention
An object of the embodiments of the present application is to provide a display color determination method, apparatus, electronic device, and storage medium, which at least achieve reduction of consumption of computing resources and improve display efficiency of a target object. The specific technical scheme is as follows:
in a first aspect, to achieve the above object, an embodiment of the present application discloses a display color determining method, including:
acquiring at least two frames of original images, wherein the display contents of the at least two frames of original images are the same, and a first display area of each frame of original image is used for displaying a target object;
determining an integral image of any one frame image in the at least two frames of original images;
determining a second display area of the target object on each frame of original image on the integral image, and calculating the average brightness value of the second display area;
and determining the display color of the target object on the first display area of each frame of the original image according to the average brightness value of the second display area.
Optionally, the determining an integral image of any one frame image of the at least two frames of original images includes:
editing any one frame image of the at least two frames of original images to obtain a target image;
determining an integral image according to the brightness value of each pixel point in the target image;
the determining a second display area of the target object on each frame of original image on the integral image and calculating an average brightness value of the second display area includes:
determining a second display area of a target object on each frame of original image on the integral image according to the size mapping relation between each frame of original image and the integral image and the position information of a first display area on each frame of original image;
and calculating the average brightness value of the second display area according to the brightness integral value of the pixel point at each vertex of the second display area.
Optionally, the editing any one of the at least two frames of original images to obtain a target image includes:
carrying out scaling processing on any frame image in the at least two frames of original images to obtain a target image;
the determining a second display area of the target object on each frame of original image on the integral image according to the size mapping relation between each frame of original image and the integral image and the position information of the first display area on each frame of original image comprises the following steps:
and carrying out scaling calculation on the position information of the first display area on each frame of original image according to the scaling ratio between each frame of original image and the integral image, and determining a second display area of the target object on each frame of original image on the integral image by using the scaling calculation result.
Optionally, before acquiring at least two frames of original images, the method further includes:
receiving image display requests of at least two display screens;
after determining the display color of the target object on the first display area of each frame of the original image according to the average brightness value of the second display area, the method further comprises the following steps:
respectively displaying the target object on each frame of original image based on the display color of the target object on the first display area of each frame of original image, and displaying different frames of original images on different display screens;
alternatively, the first and second electrodes may be,
receiving a split-screen display request of at least two frames of original images;
after determining the display color of the target object on the first display area of each frame of the original image according to the average brightness value of the second display area, the method further comprises the following steps:
and respectively displaying the target object on each frame of original image based on the display color of the target object on the first display area of each frame of original image, and performing split-screen display on the at least two frames of original images.
Optionally, the at least two frames of original images include images with different resolutions.
In a second aspect, to achieve the above object, an embodiment of the present application discloses a display color determination apparatus, including:
the device comprises an original image acquisition module, a target object acquisition module and a target object display module, wherein the original image acquisition module is used for acquiring at least two frames of original images, the display contents of the at least two frames of original images are the same, and a first display area of each frame of original image is used for displaying the target object;
the integral image acquisition module is used for determining an integral image of any frame image in the at least two frames of original images;
the average brightness value determining module is used for determining a second display area of the target object on each frame of original image on the integral image and calculating the average brightness value of the second display area;
and the display color determining module is used for determining the display color of the target object on the first display area of each frame of the original image according to the average brightness value of the second display area.
Optionally, the integral map obtaining module includes:
the image editing submodule is used for editing any one frame of image in the at least two frames of original images to obtain a target image;
the integral image acquisition submodule is used for determining an integral image according to the brightness value of each pixel point in the target image;
the average brightness value determination module includes:
the second display area determining submodule is used for determining a second display area of a target object on each frame of original image on the integral image according to the size mapping relation between each frame of original image and the integral image and the position information of the first display area on each frame of original image;
and the average brightness value determining submodule is used for calculating the average brightness value of the second display area according to the brightness integral value of the pixel point at each vertex of the second display area.
Optionally, the image editing sub-module is specifically configured to perform scaling processing on any one of the at least two frames of original images to obtain a target image;
the second display area determining submodule is specifically configured to perform scaling calculation on position information of the first display area on each frame of the original image according to a scaling ratio between each frame of the original image and the integral image, and determine a second display area of the target object on each frame of the original image on the integral image by using a scaling calculation result.
Optionally, the apparatus further comprises:
the image display request acquisition module is used for receiving image display requests of at least two display screens before acquiring at least two frames of original images;
the device further comprises:
the first display module is used for respectively displaying the target object on each frame of original image based on the display color of the target object on the first display area of each frame of original image after determining the display color of the target object on the first display area of each frame of original image according to the average brightness value of the second display area, and displaying different frames of original images on different display screens;
alternatively, the first and second electrodes may be,
the device further comprises:
the split-screen display request acquisition module is used for receiving split-screen display requests of at least two frames of original images before acquiring the at least two frames of original images;
the device further comprises:
and the second display module is used for respectively displaying the target object on each frame of original image based on the display color of the target object on the first display area of each frame of original image after determining the display color of the target object on the first display area of each frame of original image according to the average brightness value of the second display area, and performing split-screen display on at least two frames of original images.
Optionally, the at least two frames of original images include images with different resolutions.
In another aspect of this application, in order to achieve the above object, an embodiment of this application further discloses an electronic device, where the electronic device includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the display color determination method according to any one of the above descriptions when executing the program stored in the memory.
In yet another aspect of this application implementation, there is also provided a computer-readable storage medium having a computer program stored therein, the computer program, when executed by a processor, implementing the display color determination method as described in any one of the above.
Embodiments of the present application further provide a computer program product containing instructions, which when run on a computer, cause the computer to perform any of the above-described display color determination methods.
The embodiment of the application has the following beneficial effects:
the display color determining method provided by the embodiment of the application obtains at least two frames of original images, the display contents of the at least two frames of original images are the same, and a first display area of each frame of original image is used for displaying a target object; determining an integral image of any one frame of image in at least two frames of original images; determining a second display area of the target object on each frame of original image on the integral image, and calculating the average brightness value of the second display area; and determining the display color of the target object on the first display area of each frame of the original image according to the average brightness value of the second display area.
Based on the above processing, the average brightness value of the second display area can represent the average brightness value of the first display area, and the brightness integral value of one pixel in the integral image represents the sum of the brightness values of the pixels in the specific integral area, so that the scheme provided by the embodiment of the application can obtain the average brightness value corresponding to the first display area only based on the brightness integral value of the pixel at the vertex of the second display area, and the brightness values of all the pixels in the first display area do not need to be calculated, thereby reducing the calculation amount. In addition, the multiple original images can share the same integral image, that is, if the first display areas in the multiple original images have the overlapped part, the brightness values of all pixel points in the overlapped part do not need to be repeatedly calculated, so that the calculation amount can be reduced, further, the consumption of calculation resources is reduced, and the display efficiency of the target object is improved. Of course, even if the first display areas in the multiple original images are not overlapped, the display color of the target object on each first display area can be rapidly determined through multiplexing of the integral map, and the effect of improving the display efficiency of the target object is achieved.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and it is also obvious for a person skilled in the art to obtain other embodiments according to the drawings.
Fig. 1 is a flowchart of a display color determination method according to an embodiment of the present application;
fig. 2 is a flowchart of another display color determination method provided in an embodiment of the present application;
fig. 3 is a flowchart of another display color determination method provided in an embodiment of the present application;
fig. 4 is a schematic diagram of an integral image according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a display image according to an embodiment of the present invention;
FIG. 6A is a schematic diagram illustrating a display area of a target object according to an embodiment of the present disclosure;
FIG. 6B is a schematic illustration of a display area of another target object provided in the practice of the present application;
fig. 7 is a block diagram of a display color determination apparatus according to an embodiment of the present application;
fig. 8 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the description herein are intended to be within the scope of the present disclosure.
The embodiment of the application provides a display color determination method, which can be applied to an electronic device, wherein the electronic device can display an image and simultaneously display a target object (such as text or graphics) in the image. For example, the electronic device may display the monitoring image, and may also determine a display color of a timestamp corresponding to the monitoring image, and further display the timestamp in the monitoring image in the determined display color when the monitoring image is displayed; alternatively, the electronic device may display the name of the target item in text form on the detected image, and the display color of the name of the target item may be determined by using the scheme provided by the embodiment of the present application.
Referring to fig. 1, fig. 1 is a flowchart of a display color determination method provided in an embodiment of the present application, where the method may include the following steps:
s101: at least two frames of original images are acquired.
The display contents of at least two frames of original images are the same, and the first display area of each frame of original image is used for displaying the target object. For example, at least two frames of original images are environment monitoring images of a certain building area, the upper left corner (i.e., the first display area) of each frame of original image is the display position of the fire alarm, and the upper left corner of each frame of original image can also be used for displaying the name of the fire alarm in a text form, i.e., as a target object. Specifically, the position of the first display area on the original image may be determined according to the display requirement, and the steps in the embodiment of the present application are specifically limited.
S102: an integral image of any one of the at least two frames of original images is determined.
S103: and determining a second display area of the target object on the integral image on each frame of original image, and calculating the average brightness value of the second display area.
S104: and determining the display color of the target object on the first display area of each frame of the original image according to the average brightness value of the second display area.
According to the display color determining method provided by the embodiment of the application, the average brightness value of the second display area can represent the average brightness value of the first display area, and the brightness integral value of one pixel point in the integral image represents the sum of the brightness values of all the pixel points in the specific integral area. In addition, the multiple original images can share the same integral image, that is, if the first display areas in the multiple original images have the overlapped part, the brightness values of all pixel points in the overlapped part do not need to be repeatedly calculated, so that the calculation amount can be reduced, further, the consumption of calculation resources is reduced, and the display efficiency of the target object is improved. Of course, even if the first display areas in the multiple original images are not overlapped, the display color of the target object on each first display area can be rapidly determined through multiplexing of the integral map, and the effect of improving the display efficiency of the target object is achieved.
For the above step S101, the content of the original image is determined according to the current scene. For example, in a video surveillance scene, the original image may be a surveillance image; in an advertisement placement scenario, the original image may be an advertisement image.
In one embodiment, the at least two original images include images with different resolutions. For example, in a video surveillance scene, multiple surveillance images with different resolutions and the same content need to be displayed simultaneously, and a target object is displayed in each surveillance image.
In one implementation, the original image may be a video frame in an original video image to be displayed. The image frame of the original video image may be changed, that is, the brightness values of the video frames in the original video image for the same display area may be different. Therefore, in order to enable the user to clearly browse the target object displayed in each video frame, for each video frame, the average brightness value of the display area of the target object in the video frame may be determined, and the color required for displaying the target object when the video frame is displayed may be determined according to the determined average brightness value.
That is to say, when each video frame is displayed, the display color of the target object needs to be determined, and based on the method provided by the embodiment of the present application, the amount of calculation can be reduced, that is, the time delay for determining the display color of the target object can be shortened, and further, when each video frame is displayed, the display color of the target object can be timely adjusted, so that the display effect of the target object is further improved.
In step S102, an integral image is obtained according to the brightness value of each pixel in an original image. The integral image generated based on the original image may be the same size as the original image. That is, a pixel point (which may be referred to as an original pixel point) in the original image corresponds to a pixel point (which may be referred to as an integration pixel point) at the same position in the integration image. And one integral pixel point corresponds to one brightness integral value and is used for expressing the sum value of the brightness values of all the pixel points in the corresponding integral area in the original image. The integration region may be: and a rectangular display area with a line segment between the original pixel point corresponding to the integral pixel point and a coordinate origin (such as a vertex at the upper left corner) in the original image as a diagonal line.
Regarding the specific calculation of the integral image, the calculation can be implemented by referring to the existing principle, and the embodiment of the present application is not particularly limited.
With respect to step S103, in one implementation, a display area (i.e., a first display area) of the target object in the original image of one frame may be a rectangular display area containing the target object. Accordingly, the corresponding display region (i.e., the second display region) in the integral image is also a rectangular display region.
The average brightness value of the second display area may be used to represent an average value of brightness values of all pixel points in the display area corresponding to the second display area in each frame of the original image.
In another embodiment, referring to fig. 2, on the basis of fig. 1, the step S102 may include: s1021: and editing any one frame image of the at least two frames of original images to obtain a target image.
S1022: and determining an integral image according to the brightness value of each pixel point in the target image.
Accordingly, the step S103 may include:
s1031: and determining a second display area of the target object on the integral image on each frame of original image according to the size mapping relation between each frame of original image and the integral image and the position information of the first display area on each frame of original image.
S1032: and calculating the average brightness value of the second display area according to the brightness integral value of the pixel point at each vertex of the second display area.
In the embodiment of the application, editing processing can be performed on any frame of original image, and an integral image is generated based on a target image obtained through the editing processing. That is, the integral image is the same size as the target image. For example, the original image may be cut to obtain a target image; or, the original image is subjected to scaling processing to obtain a target image.
At this time, the average luminance value of the second display region is: and in the target image, the average value of the brightness values of all the pixel points in the display area corresponding to the second display area.
In one embodiment, when the screen content of a part of the display area in each frame of original image needs to be displayed, each frame of original image may be cropped, and the cropped image (which may be referred to as a first cropped image) may be displayed separately. The first cropping image comprises a first display area. The display contents of the respective first trimming images are the same.
Correspondingly, when the integral image is determined, any frame of original image can be cut to obtain a second cut image, and the integral image is determined according to the brightness value of each pixel point in the second cut image. It can be understood that the display area corresponding to the second trimming image includes the display area corresponding to the first trimming image, so that the average luminance value of each display area in the first trimming image, that is, the average luminance value of the first display area, can be determined based on the integral image obtained from the second trimming image.
For example, the resolution of the original image is 1600 × 1200, and if the first cropped image is an image corresponding to the 400 × 300 display area at the upper left corner of the original image, the second cropped image may be an image corresponding to the 800 × 600 display area at the upper left corner of the original image, and the size of the determined integral image is 800 × 600. At this time, the second display region may represent a display region of 400 × 300 at the upper left corner in the integral image.
In another embodiment, referring to fig. 3, on the basis of fig. 2, the step S1021 includes the following steps:
s10211: and carrying out scaling processing on any frame image in the at least two frames of original images to obtain a target image.
Accordingly, the step S1031 includes the following steps:
s10311: and carrying out scaling calculation on the position information of the first display area on each frame of original image according to the scaling ratio between each frame of original image and the integral image, and determining a second display area of the target object on each frame of original image on the integral image by using the scaling calculation result.
In the embodiment of the application, any frame of original image can be subjected to scaling processing to obtain a target image.
In one implementation, the algorithm for scaling the original image may be a neighboring difference algorithm, or may also be a bilinear difference algorithm, or a bicubic difference algorithm, etc., but is not limited thereto.
Correspondingly, the size of the generated integral image is the same as that of the target image based on the brightness value of the pixel point in the target image. In this way, the resolution of the obtained integral image is small, and accordingly, the amount of calculation can be further reduced by performing processing based on the integral image.
In one embodiment, the algorithm of the scaling process may be a bilinear difference algorithm. And scaling the original image based on a bilinear difference algorithm to obtain a target image with a smaller resolution. In addition, the processing is carried out based on the bilinear difference algorithm, and the influence of four direct adjacent points around the sampling point on the correlation of the sampling point is considered, so that the image quality of the obtained target image is high, and the phenomena of mosaic and sawtooth can be effectively avoided. Accordingly, the accuracy of the determined average brightness value can be improved, and accordingly, the target object is displayed based on the display color corresponding to the average brightness value, and the display effect of the target object can be improved.
In one embodiment, for each frame of the original image, the electronic device may determine the pixel points (i.e., the first pixel points) at the vertices of the first display region in the original image, i.e., determine the positions of the first pixel points (which may be represented by the coordinates of the first pixel points). Wherein, in the original image, the origin of coordinates may be the vertex in the upper left corner.
Further, pixel points (i.e., second pixel points) corresponding to the first pixel points in the integral image can be determined, that is, the positions of the second pixel points (which can be expressed by coordinates of the second pixel points) can be determined. In the integral image, the origin of coordinates may be a vertex at the upper left corner.
In one implementation, if the integral image is determined based directly on the luminance values of the pixels in the original image, the coordinates of the second pixel are consistent with the coordinates of the first pixel in the original image.
If the integral image is determined based on the brightness value of each pixel point in the target image, the coordinate of the second pixel point can be determined based on the scaling or cutting proportion between the original image and the integral image.
For example, the resolution of the original image is 1600 × 1200, the resolution of the target image is 160 × 120, that is, the resolution of the integral image is 160 × 120, and if the coordinates of the first pixel in the original image are (800 ), the coordinates of the corresponding second pixel in the integral image are (80, 80).
Then, calculating a total brightness value corresponding to the second display area based on the brightness integral value of each second pixel point; and calculating the ratio of the total brightness value to the number of pixel points contained in the second display area to be used as the average brightness value of the second display area.
Referring to fig. 4, fig. 4 is a schematic diagram of an integral image according to an embodiment of the present disclosure.
The integral image is determined according to the brightness value of each pixel point in the target image. Wherein A, B, C and D represent each second pixel point and O represents the origin of coordinates. The brightness integral value of the second pixel point A represents the sum of the brightness values of all pixel points in the display area corresponding to the display area OX1AY1 in the target image; the brightness integral value of the second pixel point B represents the sum of the brightness values of all pixel points in a display area corresponding to the display OX2BY1 in the target image; the brightness integral value of the second pixel point C represents the sum of the brightness values of all pixel points in the display area corresponding to the display area OX2CY2 in the target image; the luminance integrated value of the second pixel point D represents a sum total of luminance values of all pixel points in the display region corresponding to the display region OX1DY2 in the target image.
Therefore, after each second pixel point is determined, the total brightness value of the second display area may be calculated based on the brightness integral value of each second pixel point, that is, the total sum of the brightness values of all the pixel points in the corresponding display area in the target image is obtained.
Referring to fig. 4, for example, the second display area, i.e., the display area ABCD, may calculate a difference value between the luminance integrated value of the second pixel point C and the luminance integrated value of the second pixel point a as a first difference value; calculating a difference value between the brightness integral value of the second pixel point B and the brightness integral value of the second pixel point A as a second difference value; and calculating the difference value between the brightness integral value of the second pixel point D and the brightness integral value of the second pixel point A as a third difference value.
Then, a difference between the first difference and the second difference may be calculated as a fourth difference, and a difference between the fourth difference and the third difference may be calculated to obtain a total luminance value of the second display area ABCD.
Then, the number of pixel points included in the second display region may be calculated based on the coordinates of each second pixel point. The ratio of the total brightness value to the number is calculated, that is, the average brightness value of the second display region, that is, the average brightness value of all the pixels in the corresponding display region in the target image, and the average brightness value of all the pixels in the corresponding first display region in the original image can be represented.
In one embodiment, before the step S101, the method may further include:
the method comprises the following steps: an image display request for at least two display screens is received.
Correspondingly, after the step S104, the method may further include:
step two: and respectively displaying the target object on each frame of original image based on the display color of the target object on the first display area of each frame of original image, and displaying different frames of original images on different display screens.
In the embodiment of the present application, a plurality of original images may be displayed on different display screens, respectively, and a target object may be displayed in each display screen based on the determined display color. For example, for an advertisement placement scene, a plurality of advertisement images may be respectively displayed in display screens in different venues for users in the different venues to browse. For another example, for a video surveillance scene, multiple surveillance images may be displayed on multiple different display screens for different users to browse.
In one embodiment, before the step S101, the method may further include:
the method comprises the following steps: a split screen display request for at least two frames of original images is received.
Correspondingly, after the step S104, the method may further include:
step two: and respectively displaying the target object on each frame of original image based on the display color of the target object on the first display area of each frame of original image, and performing split-screen display on at least two frames of original images.
In the embodiment of the present application, the plurality of original images may be respectively displayed in different display areas in the display screen, that is, split-screen display may be performed, and the target object may be displayed in each display area based on the determined display color. For example, the plurality of original images may be displayed in a two-screen manner, or the plurality of original images may be displayed in a four-screen manner, which may be determined according to the number of the original images.
For example, for a video surveillance scene, a plurality of surveillance images may be respectively displayed in different display areas of a display screen for a user to browse.
For step S104, in an implementation manner, if the average brightness value is larger (for example, larger than the preset brightness value), the target object may be displayed in a darker color (for example, black), that is, the display color of the target object is determined to be the darker color, so that the displayed target object is in contrast with the content of the original image, and the user can clearly browse the target object. If the average brightness value is smaller, the target object may be displayed in a brighter color (e.g., white), that is, the display color of the target object is determined to be the brighter color, so that the displayed target object is in contrast with the content of the original image, and the user can clearly browse the target object.
For example, referring to fig. 5, fig. 5 is a schematic diagram of a display image provided by an embodiment of the present application, for illustrating the embodiment of the present application.
After an original image (for example, an acquired monitoring video image) is acquired, the original image may be processed in a plurality of different scaling modes, so as to obtain a plurality of paths of video images with different resolutions. For example, 3 video images with different resolutions can be obtained, the 1 st path is the original image, the 2 nd path has a resolution of 1/4 of the original image, and the 3 rd path has a resolution of 1/16 of the original image.
Alternatively, bilinear difference scaling may be performed on the original image to obtain the 4 th video image with a resolution of 1/64 of the original image. And constructing a corresponding integral image according to the 4 th path of video image.
For the 1 st path video image to the 3 rd path video image, when each video frame is displayed, a corresponding display area of the target object in the integral image can be determined, and an average brightness value of the display area is calculated.
Then, OSD reverse color superposition may be performed based on the average brightness value, that is, when each video frame in the 1 st to 3 rd video images is displayed, the target object is displayed based on the display color corresponding to the determined average brightness value.
Based on the processing, when multiple paths of same contents need to be displayed simultaneously, the average brightness value of the display area corresponding to the target object can be determined based on the same integral image, and the brightness values of all pixel points in the corresponding display area do not need to be accumulated and the average value is calculated for each path of video image, so that the calculation amount can be reduced.
For example, referring to fig. 6A, fig. 6A is a schematic diagram of a display area of a target object provided in the present application.
In fig. 6A, word 1 and word 2 represent target objects displayed in the same way image. If the average brightness value is calculated by accumulating the brightness values of all the pixels in the display area, when the average brightness value of the display area of the word 1 and the average brightness value of the display area of the word 2 are calculated, there is a case of repeated calculation for the display area indicated by the oblique lines in fig. 6A, which may result in a large calculation amount. Based on the method provided by the embodiment of the application, the brightness integral value of the pixel point at the vertex position of each display area can be simply added and subtracted based on the corresponding integral image, repeated calculation can be avoided, and further, the calculation amount can be reduced.
In addition, referring to fig. 6B, fig. 6B is a schematic diagram of a display area of a target object according to the present application.
In fig. 6B, a word 1 indicates a target object displayed in the first image, and a word 2 indicates a target object displayed in the second image, and the display contents of the two images are the same. If the average brightness value is calculated by accumulating the brightness values of all the pixels in the display area, when the average brightness value of the display area of the word 1 and the average brightness value of the display area of the word 2 are calculated, there is a case of repeated calculation for the display area indicated by the oblique lines in fig. 6B, which may result in a large calculation amount. Based on the method provided by the embodiment of the application, the brightness integral value of the pixel point at the vertex position of each display area can be simply added and subtracted based on the same integral image, repeated calculation can be avoided, and further, the calculation amount can be reduced.
Based on the same inventive concept, an embodiment of the present application further provides a display color determination apparatus, referring to fig. 7, where fig. 7 is a structural diagram of the display color determination apparatus provided in the embodiment of the present application, and the apparatus includes:
an original image obtaining module 701, configured to obtain at least two frames of original images, where display contents of the at least two frames of original images are the same, and a first display area of each frame of original image is used for displaying a target object;
an integral image obtaining module 702, configured to determine an integral image of any one frame of image in the at least two frames of original images;
an average brightness value determining module 703, configured to determine a second display area of the target object on each frame of the original image on the integrated image, and calculate an average brightness value of the second display area;
and a display color determining module 704, configured to determine a display color of the target object on the first display area of each frame of the original image according to the average brightness value of the second display area.
Optionally, the integral map obtaining module 702 includes:
the image editing submodule is used for editing any one frame of image in the at least two frames of original images to obtain a target image;
the integral image acquisition submodule is used for determining an integral image according to the brightness value of each pixel point in the target image;
the average brightness value determining module 703 includes:
the second display area determining submodule is used for determining a second display area of a target object on each frame of original image on the integral image according to the size mapping relation between each frame of original image and the integral image and the position information of the first display area on each frame of original image;
and the average brightness value determining submodule is used for calculating the average brightness value of the second display area according to the brightness integral value of the pixel point at each vertex of the second display area.
Optionally, the image editing sub-module is specifically configured to perform scaling processing on any one of the at least two frames of original images to obtain a target image;
the second display area determining submodule is specifically configured to perform scaling calculation on position information of the first display area on each frame of the original image according to a scaling ratio between each frame of the original image and the integral image, and determine a second display area of the target object on each frame of the original image on the integral image by using a scaling calculation result.
Optionally, the apparatus further comprises:
the image display request acquisition module is used for receiving image display requests of at least two display screens before acquiring at least two frames of original images;
the device further comprises:
the first display module is used for respectively displaying the target object on each frame of original image based on the display color of the target object on the first display area of each frame of original image after determining the display color of the target object on the first display area of each frame of original image according to the average brightness value of the second display area, and displaying different frames of original images on different display screens;
alternatively, the first and second electrodes may be,
the device further comprises:
the split-screen display request acquisition module is used for receiving split-screen display requests of at least two frames of original images before acquiring the at least two frames of original images;
the device further comprises:
and the second display module is used for respectively displaying the target object on each frame of original image based on the display color of the target object on the first display area of each frame of original image after determining the display color of the target object on the first display area of each frame of original image according to the average brightness value of the second display area, and performing split-screen display on at least two frames of original images.
Optionally, the at least two frames of original images include images with different resolutions.
The embodiment of the present application further provides an electronic device, as shown in fig. 8, which includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete mutual communication through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801 is configured to implement the following steps when executing the program stored in the memory 803:
acquiring at least two frames of original images, wherein the display contents of the at least two frames of original images are the same, and a first display area of each frame of original image is used for displaying a target object;
determining an integral image of any one frame image in the at least two frames of original images;
determining a second display area of the target object on each frame of original image on the integral image, and calculating the average brightness value of the second display area;
and determining the display color of the target object on the first display area of each frame of the original image according to the average brightness value of the second display area.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above display color determination methods.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the above-described display color determination methods.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (12)

1. A display color determination method, the method comprising:
acquiring at least two frames of original images, wherein the display contents of the at least two frames of original images are the same, and a first display area of each frame of original image is used for displaying a target object;
determining an integral image of any one frame image in the at least two frames of original images;
determining a second display area of the target object on each frame of original image on the integral image, and calculating the average brightness value of the second display area;
and determining the display color of the target object on the first display area of each frame of the original image according to the average brightness value of the second display area.
2. The method of claim 1, wherein determining an integral image of any one of the at least two frames of raw images comprises:
editing any one frame image of the at least two frames of original images to obtain a target image;
determining an integral image according to the brightness value of each pixel point in the target image;
the determining a second display area of the target object on each frame of original image on the integral image and calculating an average brightness value of the second display area includes:
determining a second display area of a target object on each frame of original image on the integral image according to the size mapping relation between each frame of original image and the integral image and the position information of a first display area on each frame of original image;
and calculating the average brightness value of the second display area according to the brightness integral value of the pixel point at each vertex of the second display area.
3. The method according to claim 2, wherein the editing any one of the at least two frames of original images to obtain the target image comprises:
carrying out scaling processing on any frame image in the at least two frames of original images to obtain a target image;
the determining a second display area of the target object on each frame of original image on the integral image according to the size mapping relation between each frame of original image and the integral image and the position information of the first display area on each frame of original image comprises the following steps:
and carrying out scaling calculation on the position information of the first display area on each frame of original image according to the scaling ratio between each frame of original image and the integral image, and determining a second display area of the target object on each frame of original image on the integral image by using the scaling calculation result.
4. The method of claim 1, further comprising, prior to acquiring at least two frames of original images:
receiving image display requests of at least two display screens;
after determining the display color of the target object on the first display area of each frame of the original image according to the average brightness value of the second display area, the method further comprises the following steps:
respectively displaying the target object on each frame of original image based on the display color of the target object on the first display area of each frame of original image, and displaying different frames of original images on different display screens;
alternatively, the first and second electrodes may be,
receiving a split-screen display request of at least two frames of original images;
after determining the display color of the target object on the first display area of each frame of the original image according to the average brightness value of the second display area, the method further comprises the following steps:
and respectively displaying the target object on each frame of original image based on the display color of the target object on the first display area of each frame of original image, and performing split-screen display on the at least two frames of original images.
5. The method of claim 1, wherein the at least two original images comprise images with different resolutions.
6. A display color determination apparatus, characterized in that the apparatus comprises:
the device comprises an original image acquisition module, a target object acquisition module and a target object display module, wherein the original image acquisition module is used for acquiring at least two frames of original images, the display contents of the at least two frames of original images are the same, and a first display area of each frame of original image is used for displaying the target object;
the integral image acquisition module is used for determining an integral image of any frame image in the at least two frames of original images;
the average brightness value determining module is used for determining a second display area of the target object on each frame of original image on the integral image and calculating the average brightness value of the second display area;
and the display color determining module is used for determining the display color of the target object on the first display area of each frame of the original image according to the average brightness value of the second display area.
7. The apparatus of claim 6, wherein the integral map acquisition module comprises:
the image editing submodule is used for editing any one frame of image in the at least two frames of original images to obtain a target image;
the integral image acquisition submodule is used for determining an integral image according to the brightness value of each pixel point in the target image;
the average brightness value determination module includes:
the second display area determining submodule is used for determining a second display area of a target object on each frame of original image on the integral image according to the size mapping relation between each frame of original image and the integral image and the position information of the first display area on each frame of original image;
and the average brightness value determining submodule is used for calculating the average brightness value of the second display area according to the brightness integral value of the pixel point at each vertex of the second display area.
8. The apparatus according to claim 7, wherein the image editing sub-module is specifically configured to perform scaling processing on any one of the at least two frames of original images to obtain a target image;
the second display area determining submodule is specifically configured to perform scaling calculation on position information of the first display area on each frame of the original image according to a scaling ratio between each frame of the original image and the integral image, and determine a second display area of the target object on each frame of the original image on the integral image by using a scaling calculation result.
9. The apparatus of claim 6, further comprising:
the image display request acquisition module is used for receiving image display requests of at least two display screens before acquiring at least two frames of original images;
the device further comprises:
the first display module is used for respectively displaying the target object on each frame of original image based on the display color of the target object on the first display area of each frame of original image after determining the display color of the target object on the first display area of each frame of original image according to the average brightness value of the second display area, and displaying different frames of original images on different display screens;
alternatively, the first and second electrodes may be,
the device further comprises:
the split-screen display request acquisition module is used for receiving split-screen display requests of at least two frames of original images before acquiring the at least two frames of original images;
the device further comprises:
and the second display module is used for respectively displaying the target object on each frame of original image based on the display color of the target object on the first display area of each frame of original image after determining the display color of the target object on the first display area of each frame of original image according to the average brightness value of the second display area, and performing split-screen display on at least two frames of original images.
10. The apparatus according to claim 6, wherein the at least two frames of original images comprise images with different resolutions.
11. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, implementing the method steps of any of claims 1-5.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
CN202111076603.6A 2021-09-14 2021-09-14 Display color determination method and device, electronic equipment and storage medium Pending CN113763860A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111076603.6A CN113763860A (en) 2021-09-14 2021-09-14 Display color determination method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111076603.6A CN113763860A (en) 2021-09-14 2021-09-14 Display color determination method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113763860A true CN113763860A (en) 2021-12-07

Family

ID=78795551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111076603.6A Pending CN113763860A (en) 2021-09-14 2021-09-14 Display color determination method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113763860A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801304A (en) * 2005-01-06 2006-07-12 株式会社东芝 Image display device and method of displaying image
CN101097707A (en) * 2006-06-26 2008-01-02 创世纪微芯片公司 Integrated histogram auto adaptive contrast control(acc)
WO2012155525A1 (en) * 2011-05-13 2012-11-22 中兴通讯股份有限公司 Method, device and apparatus for processing video images
US20200058110A1 (en) * 2018-08-20 2020-02-20 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for Image Processing, Non-Transitory Computer Readable Medium, and Electronic Device
WO2020248386A1 (en) * 2019-06-14 2020-12-17 平安科技(深圳)有限公司 Video analysis method and apparatus, computer device and storage medium
CN112948627A (en) * 2019-12-11 2021-06-11 杭州海康威视数字技术股份有限公司 Alarm video generation method, display method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801304A (en) * 2005-01-06 2006-07-12 株式会社东芝 Image display device and method of displaying image
CN101097707A (en) * 2006-06-26 2008-01-02 创世纪微芯片公司 Integrated histogram auto adaptive contrast control(acc)
WO2012155525A1 (en) * 2011-05-13 2012-11-22 中兴通讯股份有限公司 Method, device and apparatus for processing video images
US20200058110A1 (en) * 2018-08-20 2020-02-20 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for Image Processing, Non-Transitory Computer Readable Medium, and Electronic Device
WO2020248386A1 (en) * 2019-06-14 2020-12-17 平安科技(深圳)有限公司 Video analysis method and apparatus, computer device and storage medium
CN112948627A (en) * 2019-12-11 2021-06-11 杭州海康威视数字技术股份有限公司 Alarm video generation method, display method and device

Similar Documents

Publication Publication Date Title
CN110377264B (en) Layer synthesis method, device, electronic equipment and storage medium
CN109064390B (en) Image processing method, image processing device and mobile terminal
WO2017211250A1 (en) Image overlay display method and system
CN110377263B (en) Image synthesis method, image synthesis device, electronic equipment and storage medium
CN108347657B (en) Method and device for displaying bullet screen information
CN111741274B (en) Ultrahigh-definition video monitoring method supporting local amplification and roaming of picture
US20220328019A1 (en) Display terminal adjustment method and display terminal
CN110363831B (en) Layer composition method and device, electronic equipment and storage medium
CA3030258C (en) Panoramic video compression method and device
CN111147770A (en) Multi-channel video window overlapping display method, electronic equipment and storage medium
EP3822757A1 (en) Method and apparatus for setting background of ui control
CN110796664B (en) Image processing method, device, electronic equipment and computer readable storage medium
CN113205573B (en) Image display method and device, image processing equipment and storage medium
US20180018398A1 (en) Positioning content in computer-generated displays based on available display space
CN108932703B (en) Picture processing method, picture processing device and terminal equipment
CN111612838A (en) Image acquisition method and device and electronic equipment
US20180121729A1 (en) Segmentation-based display highlighting subject of interest
CN113393391B (en) Image enhancement method, image enhancement device, electronic apparatus, and storage medium
WO2023071861A1 (en) Data visualization display method and apparatus, computer device, and storage medium
CN113763860A (en) Display color determination method and device, electronic equipment and storage medium
CN112419134A (en) Image processing method and device
CN111652799A (en) Image processing method and device, electronic equipment and readable storage medium
CN112446848A (en) Image processing method and device and electronic equipment
CN113254141B (en) Image generation method, image generation device, electronic equipment and storage medium
WO2023103672A1 (en) Method, apparatus and device for displaying shared content, and computer program product

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