CN113992968A - Method and device for gradually changing colors of frames of screen projection pictures based on wireless screen projection field - Google Patents

Method and device for gradually changing colors of frames of screen projection pictures based on wireless screen projection field Download PDF

Info

Publication number
CN113992968A
CN113992968A CN202111259029.8A CN202111259029A CN113992968A CN 113992968 A CN113992968 A CN 113992968A CN 202111259029 A CN202111259029 A CN 202111259029A CN 113992968 A CN113992968 A CN 113992968A
Authority
CN
China
Prior art keywords
rgba
value
frame
color
screen projection
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.)
Granted
Application number
CN202111259029.8A
Other languages
Chinese (zh)
Other versions
CN113992968B (en
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.)
Shenzhen Baoze Technology Co ltd
Original Assignee
Shenzhen Baoze 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 Shenzhen Baoze Technology Co ltd filed Critical Shenzhen Baoze Technology Co ltd
Priority to CN202111259029.8A priority Critical patent/CN113992968B/en
Publication of CN113992968A publication Critical patent/CN113992968A/en
Application granted granted Critical
Publication of CN113992968B publication Critical patent/CN113992968B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • H04N21/43637Adapting the video stream to a specific local network, e.g. a Bluetooth® network involving a wireless protocol, e.g. Bluetooth, RF or wireless LAN [IEEE 802.11]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Video Image Reproduction Devices For Color Tv Systems (AREA)
  • Projection Apparatus (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

The invention discloses a method and a device for automatically changing colors of a frame of a screen projection picture based on the field of wireless screen projection, wherein the method comprises the following steps: obtaining RGBA color value setting of a screen projection picture frame; performing color gradient processing on the screen projection picture frame based on the RGBA color value setting of the screen projection picture frame; judging whether diagonal frame color gradient processing is needed or not based on the display width and the height of the screen projection picture; if necessary, obtaining the RGBA color value setting of the diagonal frame; performing color gradient processing of the diagonal bezel based on the RGBA color value setting of the diagonal bezel. In the embodiment of the invention, the colors of the screen projection picture and the bottom wallpaper can be distinguished, so that a user can visually see the screen projection picture image more clearly without considering the condition of color fusion of the screen projection picture and the bottom wallpaper, and meanwhile, the appearance of a frame which is not harmonious in appearance is avoided.

Description

Method and device for gradually changing colors of frames of screen projection pictures based on wireless screen projection field
Technical Field
The invention belongs to the technical field of communication, and particularly relates to a screen projection picture frame color self-changing method and device based on the field of wireless screen projection.
Background
In the wireless screen projection industry, screen projection display of equipment is an important link, when the screen projection equipment projects a screen to screen projection equipment, and when the aspect ratio of a screen projection picture and the screen projection equipment has a certain difference, the picture is often subjected to proportional change for harmony of picture display.
The color of a frame of a screen projection picture in the wireless screen projection field is self-changed: the color of the frame of the screen-projecting picture can be changed according to the color near the frame of the screen-projecting picture, in order to highlight the content of the screen-projecting picture, the screen-projecting picture and the bottom wallpaper are obviously distinguished, and the condition that the content of the screen-projecting picture and the bottom wallpaper are 'fused' is avoided.
At present, in the wireless screen projection industry, a common condition for distinguishing the colors of a picture and a frame is to manufacture a frame similar to a 3D texture, make the frame in a form similar to a photo frame, and directly give the frame with a certain color, wherein the color of bottom wallpaper is set to be a color obviously different from the color of the frame.
Such a design obviously makes the user look unnatural, and the preset fixed frame makes the matching of the picture color and the frame color uncomfortable in some cases.
The invention aims to obviously distinguish the screen projection picture from the bottom wallpaper aiming at the occurrence of the situation in the screen projection process, thereby achieving the effect of distinguishing the picture from the bottom wallpaper.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides a method and a device for gradually changing the color of a frame of a screen projection picture based on the field of wireless screen projection, which can obviously distinguish the screen projection picture from bottom wallpaper, thereby achieving the effect of distinguishing the picture from the bottom wallpaper.
In order to solve the technical problem, an embodiment of the present invention provides a method and an apparatus for automatically changing a color of a frame of a screen projection image based on a wireless screen projection field, where the method and the apparatus include:
acquiring a first RGBA value of a screen projection picture and a second RGBA value of bottom wallpaper;
performing gradual change RGBA value calculation based on the first RGBA numerical value and the second RGBA numerical value to obtain RGBA color value setting of a screen projection picture frame;
performing color gradient processing on the screen projection picture frame based on the RGBA color value setting of the screen projection picture frame;
judging whether diagonal frame color gradient processing is needed or not based on the display width and the height of the screen projection picture;
if so, performing gradual change RGBA value calculation processing on the diagonal frame based on a diagonal compensation mode to obtain the RGBA color value setting of the diagonal frame;
performing color gradient processing of the diagonal bezel based on the RGBA color value setting of the diagonal bezel.
The calculating of the gradual change RGBA value based on the first RGBA numerical value and the second RGBA numerical value to obtain the RGBA color value setting of the screen projection picture frame comprises the following steps:
obtaining an average RGBA value of the screen projection picture based on the first RGBA value;
obtaining a difference from the average RGBA value and the second RGBA value as an RGBA difference based on the average RGBA value;
averagely dividing the RGBA difference into N parts, and obtaining an averaged RGBA difference of each part;
and obtaining N parts of the RGBA color value settings from the screen projection picture frame to the bottom wallpaper based on the equally divided RGBA difference value.
Obtaining N parts of the RGBA color value settings from the screen-projecting picture frame to the bottom wallpaper based on the equally divided RGBA difference value, including
N parts of the RGBA color value is set to be (r)n*1+ra,gn*1+ga,bn*1+ba,an*1+aa),(rn*2+ra,gn*2+ga,bn*2+ba,an*2+aa),...,(rn*N+ra,gn*N+ga,bn*N+ba,an*N+aa);
Wherein (r)a,ga,ba,aa) The average RGBA value of the screen projection picture is obtained;
(rh,gh,bh,ah) And dividing the average RGBA difference value.
The color gradient processing of the screen projection picture frame is carried out based on the RGBA color value setting of the screen projection picture frame, and comprises the following steps:
if raAnd rb、gaAnd gb、baAnd bbIs not greater than a first threshold, the RGBA values of the projection screen frame are (0,0,0, a)a) Or (255,255,255, a)a)。
If ra、ga、baIs not less than a first threshold, the RGBA values of the screen projection frame are (0,0,0, a)a);
If ra、ga、baIs not greater than a second threshold value, the RGBA value of the projected frame border is (255, a)a);
(ra,ga,ba,aa) The average RGBA value of the screen projection picture is obtained;
(rb,gb,bb,aa) Is the second RGBA value.
The judging whether diagonal frame color gradient processing is needed or not based on the display width and the height of the screen projection picture comprises the following steps:
judging whether the width or height of the projection screen image display is equal to the width or height of the screen;
if yes, performing gradient RGBA calculation on the diagonal frame without a diagonal compensation mode;
and if not, performing gradual change RGBA calculation on the diagonal frame based on a diagonal compensation mode, and performing color gradual change processing on the diagonal frame based on RGBA color value setting of the diagonal frame.
The performing gradual change RGBA calculation on the diagonal frame based on the diagonal compensation mode comprises the following steps:
whether the display width of the screen projection picture is equal to the display height of the screen projection picture is determined;
if the color values are equal, performing gradual change RGBA value calculation processing on the diagonal frame without performing row or column supplement to obtain the RGBA color value setting of the diagonal frame;
if the display width of the screen projection picture is larger than the display height of the screen projection picture, column supplement is needed, and gradual change RGBA value calculation processing is carried out on the diagonal frame based on a diagonal compensation mode to obtain the RGBA color value setting of the diagonal frame;
and if the display width of the screen projection picture is smaller than the display height of the screen projection picture, performing line supplement, and performing gradual change RGBA value calculation processing on the diagonal frame based on a diagonal compensation mode to obtain the RGBA color value setting of the diagonal frame.
The obtaining the RGBA color value setting for the diagonal bezel comprises:
setting the RGBA value of all elements in all supplemental rows or columns to the RGBA value of the bottom wallpaper based on all elements in all supplemental rows or columns.
The performing gradual change RGBA value calculation processing on the diagonal frame based on the diagonal compensation mode to obtain RGBA color value setting of the diagonal frame comprises the following steps:
constructing a two-dimensional array RGBAARay [ w ] [ h ];
obtaining the RGBA value of the two-dimensional array axis area based on the two-dimensional array as
Figure BDA0003322818170000041
Wherein (r)w,gw,bw,aw) The RGBA value for region w, (r)h,gh,bh,ah) The RGBA values for region h.
Obtaining the RGBA color values of an area at one end of the two-dimensional array axis based on the two-dimensional array as follows:
(rn*1+ra,gn*1+ga,bn*1+ba,an*1+aa),(rn*2+ra,gn*2+ga,bn*2+ba,an*2+aa),...,(rn*N+ra,gn*N+ga,bn*N+ba,an*N+aa);
acquiring the RGBA color values of the other end area of the two-dimensional array axis based on the two-dimensional array as follows:
(rn*1+r1,gn*1+g1,bn*1+b1,an*1+a1),(rn*2+r1,gn*2+g1,bn*2+b1,an*2+a1),...,(rn*N+r1,gn*N+g1,bn*N+b1,an*N+a1);
wherein (r)1,g1,b1,a1) The RGBA values for region 1, (r)a,ga,ba,aa) The RGBA value for region a, (r)n,gn,bn,an) And dividing the average RGBA difference value.
Correspondingly, the embodiment of the invention also provides a screen projection picture frame color gradient device based on the wireless screen projection field, which comprises:
an acquisition module: the first RGBA value of the screen projection picture and the second RGBA value of the bottom wallpaper are obtained;
a first calculation module: the screen projection frame comprises a first RGBA numerical value and a second RGBA numerical value, wherein the first RGBA numerical value and the second RGBA numerical value are used for carrying out gradual change RGBA calculation to obtain RGBA color value setting of the screen projection frame;
the first color value setting module: the RGBA color value setting unit is used for setting RGBA color values of the screen projection picture frames;
a judging module: the screen projection device is used for judging whether diagonal frame color gradient processing is needed or not based on the display width and height of the screen projection picture;
a second calculation module: the method comprises the steps of calculating gradient RGBA values of the diagonal frame based on a diagonal compensation mode to obtain the RGBA color value setting of the diagonal frame;
a second color value setting module: means for performing a color gradient process for the diagonal bounding box based on the RGBA color value setting for the diagonal bounding box.
According to the method, the color values of the screen-projecting picture close to the border are collected, the border color is made into a gradual change color effect through the colors, namely, the picture color is gradually changed to the bottom background color, if the colors are similar to the bottom background color, the color values which are obviously different from the bottom background color are adopted for gradual change operation, and the screen-projecting picture and the bottom wallpaper can be naturally and smoothly distinguished.
The color of the frame of the screen-projecting picture can be changed according to the color near the frame of the screen-projecting picture, in order to highlight the content of the screen-projecting picture, the screen-projecting picture and the bottom wallpaper are obviously distinguished, and the condition that the content of the screen-projecting picture and the bottom wallpaper are 'fused' is avoided. The user can see the screen-projecting picture image more clearly visually without considering the condition of color fusion of the screen-projecting picture and the bottom wallpaper, and meanwhile, the appearance of a frame which is not harmonious in appearance is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings 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 invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a method for gradually changing a border color of a projection screen according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a color gradient apparatus for a border of a projection screen according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a method for gradually changing a color of a frame of a screen projection image according to an embodiment of the present invention, where as shown in the figure, the method for gradually changing a color of a frame of a screen projection image includes the following steps:
s101: and acquiring a first RGBA value of the screen projection picture and a second RGBA value of the bottom wallpaper.
It should be noted that, from the RGBA image stream data, according to the RGBA value set by the user, the RGBA value set of M units of the captured image distance frame pixel is obtained, where R, G, B, A values are obtained in the storage order of ARGB 32.
It should be noted that, if an RGBA value is (r, g, b, a), the r value represents a red color value, the g value represents a green color value, the b value represents a blue color value, and the a value represents an opacity parameter of the color.
If an RGBA value is (r)a,ga,ba,aa) Of r isaThe value represents the red value of area a, gaThe value representing the green value of the region a, baThe value represents the blue value of the area a, aaThe value represents the color opacity parameter for region a.
S102: and calculating a gradual change RGBA value based on the first RGBA value and the second RGBA value to obtain the RGBA color value setting of the screen projection picture frame. S102: performing gradual change RGBA value calculation based on the first RGBA numerical value and the second RGBA numerical value to obtain RGBA color value setting of a screen projection picture frame;
in a specific implementation process of the present invention, the performing gradual change RGBA value calculation based on the first RGBA value and the second RGBA value to obtain an RGBA color value setting of a screen frame includes: obtaining an average RGBA value of the screen projection picture based on the first RGBA value;
obtaining a difference value between the average RGBA value of the screen projection picture and a second RGBA value of the bottom wallpaper as an RGBA difference value based on the average RGBA value;
averagely dividing the RGBA difference into N parts to obtain an averaged RGBA difference of each part;
obtaining N parts of RGBA color value settings from the screen-projecting picture frame to the bottom wallpaper based on the average RGBA difference value;
wherein N parts of the RGBA color values are set as: (r)n*1+ra,gn*1+ga,bn*1+ba,an*1+aa),(rn*2+ra,gn*2+ga,bn*2+ba,an*2+aa),...,(rn*N+ra,gn*N+ga,bn*N+ba,an*N+aa);
Wherein (r)a,ga,ba,aa) The average RGBA value of the screen projection picture is obtained;
(rh,gh,bh,ah) And dividing the average RGBA difference value.
It should be noted that the average RGBA value of the screen projection picture and the second RGBA difference value of the bottom wallpaper are obtained as RGBA difference values, the average RGBA value of the screen projection picture and the second RGBA difference value of the bottom wallpaper are divided into N parts by dividing the RGBA difference values equally, the average RGBA difference value of each part is obtained, and the RGBA color value setting of the N parts is obtained by calculation.
S103: and performing color gradient processing on the screen projection picture frame based on the RGBA color value setting of the screen projection picture frame.
It should be noted that, the process of performing the color gradient processing on the screen projection frame based on the RGBA color value setting of the screen projection frame further includes:
if raAnd rb、gaAnd gb、baAnd bbThe absolute value of the difference between any two groups of values in the first threshold value is not greater than the first threshold value, the projected picture frame isRGBA value of (0,0,0, a)a) Or (255,255,255, a)a)。
If ra、ga、baIs not less than a second threshold, the RGBA values of the screen projection frame are (0,0,0, a)a)。
If ra、ga、baIs not greater than a third threshold, the RGBA value of the projected frame border is (255, a)a)。
(ra,ga,ba,aa) And the average RGBA value of the screen projection picture is obtained.
(rb,gb,bb,aa) Is the second RGBA value.
In the embodiment of the present invention, the value of the first threshold may be 10, 20, 30, etc., and may be (0, 30) according to the actual requirement of the user]Arbitrarily take the value if raAnd rb、gaAnd gb、baAnd bbThe absolute value of the difference value of any two groups of numerical values is not more than the first threshold value, so that the RGBA numerical value of the screen projection frame is (0,0,0, a)a) Or (255,255,255, a)a)。
In an embodiment of the present invention, the value of the second threshold may be 245, 245.6, 245.7, etc., and may be arbitrarily set within [245, 255) according to the requirement of the user, if r isa、ga、baIs not greater than a second threshold value, the RGBA value of the projected frame border is (255, a)a)。
In an embodiment of the present invention, the value of the third threshold may be 5, 10, 15, and the like, and may be (0, 15) according to the requirement of the user]Arbitrarily take the value if ra、ga、baIs not greater than a third threshold, the RGBA value of the projected frame border is (255, a)a)。
It should be noted that, no matter whether a diagonal frame can be formed between the screen projection picture and the bottom wallpaper, the RGBA color value setting of the screen projection picture frame is preferentially calculated and obtained, and the color gradient processing is performed on the screen projection picture frame according to the RGBA color value setting.
S104: judging whether diagonal frame color gradient processing is needed or not based on the display width and the height of the screen projection picture; if so, performing gradual change RGBA value calculation processing on the diagonal frame based on a diagonal compensation mode to obtain the RGBA color value setting of the diagonal frame;
in a specific implementation process of the present invention, the determining whether to perform diagonal frame color gradient processing based on the display width and the height of the screen projection image includes: if the screen projection picture is extended in a manner of adapting to the width and the height in an equal proportion, the fact that a diagonal frame is not formed between the screen projection picture frame and the bottom wallpaper means that diagonal compensation operation is not needed;
directly carrying out gradual change RGBA gradual change calculation on the screen projection picture frame to obtain the RGBA color value setting of the screen projection picture frame, and carrying out color gradual change processing on the screen projection picture frame according to the RGBA color value setting;
if the width or height displayed by the screen projection picture is judged to be not equal to the width or height of the screen, a diagonal frame is formed between the screen projection picture frame and the bottom wallpaper, and therefore gradual change RGBA operation needs to be carried out on the diagonal frame based on a diagonal compensation mode;
in a specific implementation process of the present invention, the performing, based on a diagonal compensation manner, gradual change RGBA value calculation processing on the diagonal frame to obtain the RGBA color value setting of the diagonal frame includes:
judging whether the display width of the screen projection picture is equal to the display height of the screen projection picture; if yes, no supplement operation is needed; if not, the supplement operation is needed;
judging whether the display width of the screen projection picture is larger than the display height of the screen projection picture; if yes, the row supplement operation is needed, otherwise, the column supplement operation is needed;
directly constructing a two-dimensional array RGBAARay [ w ] [ h ];
based on the two dimensionsThe RGBA value of the two-dimensional array axis area is obtained as
Figure BDA0003322818170000081
Wherein (r)w,gw,bw,aw) The RGBA value for region w, (r)h,gh,bh,ah) The RGBA value for region h;
obtaining the RGBA color values of an area at one end of the two-dimensional array axis based on the two-dimensional array as follows:
(rn*1+ra,gn*1+ga,bn*1+ba,an*1+aa),(rn*2+ra,gn*2+ga,bn*2+ba,an*2+aa),...,(rn*N+ra,gn*N+ga,bn*N+ba,an*N+aa);
wherein (r)a,ga,ba,aa) The RGBA value for region a, (r)n,gn,bn,an) Dividing the average RGBA difference value;
obtaining RGBA color values of the other end area of the two-dimensional array axis based on the two-dimensional array as follows:
(rn*1+r1,gn*1+g1,bn*1+b1,an*1+a1),(rn*2+r1,gn*2+g1,bn*2+b1,an*2+a1),...,(rn*N+r1,gn*N+g1,bn*N+b1,an*N+a1);
wherein (r)1,g1,b1,a1) The RGBA value for region 1, (r)n,gn,bn,an) And dividing the average RGBA difference value.
It should be noted that, if the display width of the projected screen is equal to the display height of the projected screen, the diagonal frame formed at this time is square, and at this time, no supplement operation is required.
If the display width of the projected screen is not equal to the display height of the projected screen, the diagonal frame formed at this time is rectangular, and a supplement operation is required.
If the display width of the screen projection picture is larger than the display height of the screen projection picture, the row adding operation is needed, and if the display width of the screen projection picture is smaller than the display height of the screen projection picture, the row adding operation is needed, so that the added diagonal frame is a square diagonal frame.
It should be noted that, if the diagonal frame is a square frame, the gradual change RGBA calculation is directly performed on the diagonal frame without performing an augmentation operation, the RGBA color value setting of the diagonal frame is obtained, and the color gradual change processing of the diagonal frame is performed based on the RGBA color value setting.
If the diagonal frame is a rectangular frame, supplementary row (column) operation is required, so that the rectangular diagonal frame becomes a square diagonal frame after the supplementary operation, a two-dimensional array can be constructed, the RGBA numerical values of all elements in all supplementary rows (columns) are set to be the RGBA numerical values of the bottom color wallpaper, the RGBA setting of the rectangular diagonal frame is obtained by performing gradient RGBA calculation on the diagonal frame, and color gradient processing of the diagonal frame is performed based on the RGBA color value setting.
S105: performing color gradient processing of the diagonal bounding box based on the RGBA color value setting of the diagonal bounding box;
in a specific implementation process of the present invention, the performing, based on the RGBA color value setting of the diagonal frame, color gradient processing of the diagonal frame includes: the RGBA color value setting of the screen projection picture frame is calculated preferentially, and color gradient processing of the screen projection picture frame is carried out according to the RGBA color value setting of the screen projection picture frame;
and then, judging whether the diagonal frame exists between the screen projection picture and the bottom wallpaper, if so, performing gradual change RGBA calculation on the diagonal frame according to a diagonal compensation mode to obtain the RGBA color value setting of the diagonal frame, and performing color gradual change processing on the diagonal frame according to the RGBA color value setting of the diagonal frame.
It should be noted that, by judging whether a diagonal frame exists between the screen-projecting picture and the bottom wallpaper, if the diagonal frame exists, performing gradual change RGBA calculation on the diagonal frame according to a diagonal compensation mode to obtain RGBA color value setting of the diagonal frame, and performing color gradual change processing on the diagonal frame according to the RGBA color value setting of the diagonal frame.
Fig. 2 is a schematic structural diagram of a color gradient apparatus for a frame of a projection screen in an embodiment of the present invention, and as shown in the figure, the apparatus includes:
the acquisition module 201: and acquiring a first RGBA value of the screen projection picture and a second RGBA value of the bottom wallpaper.
It should be noted that, from the RGBA image stream data, according to the RGBA value set by the user, the RGBA value set of M units of the captured image distance frame pixel is obtained, where R, G, B, A values are obtained in the storage order of ARGB 32.
The first calculation module 202: performing gradual change RGBA value calculation based on the first RGBA numerical value and the second RGBA numerical value to obtain RGBA color value setting of a screen projection picture frame;
in a specific implementation process of the present invention, the process of performing the gradual change RGBA calculation includes obtaining RGBA color value settings of a screen frame of a projection screen, including:
obtaining an average RGBA value of the screen projection picture based on the first RGBA value;
obtaining a difference value between the average RGBA value of the screen projection picture and a second RGBA value of the bottom wallpaper as an RGBA difference value based on the average RGBA value;
averagely dividing the RGBA difference into N parts to obtain an averaged RGBA difference of each part;
obtaining N parts of RGBA color value settings from the screen-projecting picture frame to the bottom wallpaper based on the average RGBA difference value;
wherein N parts of the RGBA color values are set as: (r)n*1+ra,gn*1+ga,bn*1+ba,an*1+aa),(rn*2+ra,gn*2+ga,bn*2+ba,an*2+aa),...,(rn*N+ra,gn*N+ga,bn*N+ba,an*N+aa);
Wherein (r)a,ga,ba,aa) The average RGBA value of the screen projection picture is obtained; (r)n,gn,bn,an) And dividing the average RGBA difference value.
It should be noted that the average RGBA value of the screen projection picture and the second RGBA difference value of the bottom wallpaper are obtained as RGBA difference values, the average RGBA value of the screen projection picture and the second RGBA difference value of the bottom wallpaper are divided into N parts by dividing the RGBA difference values equally, the average RGBA difference value of each part is obtained, and the RGBA color value setting of the N parts is obtained by calculation.
The first color value setting module 203: and performing color gradient processing on the screen projection picture frame based on the RGBA color value setting of the screen projection picture frame.
It should be noted that, the process of performing the color gradient processing on the screen projection frame based on the RGBA color value setting of the screen projection frame further includes:
if raAnd rb、gaAnd gb、baAnd bbThe absolute value of the difference between any two groups of values is not greater than a first threshold, and the RGBA value of the screen projection frame is (0,0,0, a)a) Or (255,255,255, a)a)。
If ra、ga、baIs not less than a second threshold, the RGBA values of the screen projection frame are (0,0,0, a)a)。
If ra、ga、baIs not greater than a third threshold, the RGBA value of the projected frame border is (255, a)a)。
(ra,ga,ba,aa) For the screen projection pictureAverage RGBA values of (a).
(rb,gb,bb,aa) Is the second RGBA value.
In one embodiment of the present invention, the first threshold is 30 if raAnd rb、gaAnd gb、baAnd bbThe absolute value of the difference value of any two groups of numerical values is not more than the first threshold value, so that the RGBA numerical value of the screen projection frame is (0,0,0, a)a) Or (255,255,255, a)a)。
In one embodiment of the present invention, the second threshold is 245 if ra、ga、baIs not greater than a second threshold value, the RGBA value of the projected frame border is (255, a)a)。
In an embodiment of the invention, the third threshold is 15, if ra、ga、baIs not greater than a third threshold, the RGBA value of the projected frame border is (255, a)a)。
It should be noted that, no matter whether a diagonal frame can be formed between the screen projection picture and the bottom wallpaper, the RGBA color value setting of the screen projection picture frame is preferentially calculated and obtained, and the color gradient processing is performed on the screen projection picture frame according to the RGBA color value setting.
The judging module 204: judging whether diagonal frame color gradient processing is needed or not based on the display width and the height of the screen projection picture;
in a specific implementation process of the present invention, the determining whether to perform diagonal frame color gradient processing based on the display width and the height of the screen projection image includes: if the screen projection picture is extended in a manner of adapting to the width and the height in an equal proportion, the fact that a diagonal frame is not formed between the screen projection picture frame and the bottom wallpaper means that diagonal compensation operation is not needed;
directly carrying out gradual change RGBA gradual change calculation on the screen projection picture frame to obtain the RGBA color value setting of the screen projection picture frame, and carrying out color gradual change processing on the screen projection picture frame according to the RGBA color value setting;
if the width or height displayed by the screen projection picture is judged to be not equal to the width or height of the screen, a diagonal frame is formed between the screen projection picture frame and the bottom wallpaper, and therefore gradual change RGBA operation needs to be carried out on the diagonal frame based on a diagonal compensation mode.
It should be noted that, if the display width of the projected screen is equal to the display height of the projected screen, the diagonal frame formed at this time is square, and at this time, no supplement operation is required.
If the display width of the projected screen is not equal to the display height of the projected screen, the diagonal frame formed at this time is rectangular, and a supplement operation is required.
If the display width of the screen projection picture is larger than the display height of the screen projection picture, the row adding operation is needed, and if the display width of the screen projection picture is smaller than the display height of the screen projection picture, the row adding operation is needed, so that the added diagonal frame is a square diagonal frame.
The second calculation module 205: performing gradual change RGBA value calculation processing on the diagonal frame based on a diagonal compensation mode to obtain the RGBA color value setting of the diagonal frame;
in a specific implementation process of the present invention, the performing, based on a diagonal compensation manner, gradual change RGBA value calculation processing on the diagonal frame to obtain the RGBA color value setting of the diagonal frame includes:
directly constructing a two-dimensional array RGBAARay [ w ] [ h ];
obtaining the RGBA value of the two-dimensional array axis area based on the two-dimensional array as
Figure BDA0003322818170000131
Wherein (r)w,gw,bw,aw) The RGBA value for region w, (r)h,gh,bh,ah) The RGBA value for region h;
obtaining the RGBA color values of an area at one end of the two-dimensional array axis based on the two-dimensional array as follows:
(rn*1+ra,gn*1+ga,bn*1+ba,an*1+aa),(rn*2+ra,gn*2+ga,bn*2+ba,an*2+aa),...,(rn*N+ra,gn*N+ga,bn*N+ba,an*N+aa);
wherein (r)a,ga,ba,aa) The RGBA value for region a, (r)n,gn,bn,an) Dividing the average RGBA difference value;
obtaining RGBA color values of the other end area of the two-dimensional array axis based on the two-dimensional array as follows:
(rn*1+r1,gn*1+g1,bn*1+b1,an*1+a1),(rn*2+r1,gn*2+g1,bn*2+b1,an*2+a1),...,(rn*N+r1,gn*N+g1,bn*N+b1,an*N+a1);
wherein (r)1,g1,b1,a1) The RGBA value for region 1, (r)n,gn,bn,an) And dividing the average RGBA difference value.
It should be noted that, if the diagonal frame is a square frame, the gradual change RGBA calculation is directly performed on the diagonal frame without performing an addition operation, the RGBA color value setting of the diagonal frame is obtained, and the color gradual change processing of the diagonal frame is performed based on the RGBA color value setting.
If the diagonal frame is a rectangular frame, supplementary row (column) operation is required, so that the rectangular diagonal frame becomes a square diagonal frame after the supplementary operation, a two-dimensional array can be constructed, the RGBA numerical values of all elements in all supplementary rows (columns) are set to be the RGBA numerical values of the bottom color wallpaper, the RGBA setting of the rectangular diagonal frame is obtained by performing gradient RGBA calculation on the diagonal frame, and color gradient processing of the diagonal frame is performed based on the RGBA color value setting.
Second color value setting module 206: the performing a color gradient process for the diagonal bounding box based on the RGBA color value setting for the diagonal bounding box comprises: the RGBA color value setting of the screen projection picture frame is calculated preferentially, and color gradient processing of the screen projection picture frame is carried out according to the RGBA color value setting of the screen projection picture frame;
and then, judging whether the diagonal frame exists between the screen projection picture and the bottom wallpaper, if so, performing gradual change RGBA calculation on the diagonal frame according to a diagonal compensation mode to obtain the RGBA color value setting of the diagonal frame, and performing color gradual change processing on the diagonal frame according to the RGBA color value setting of the diagonal frame.
It should be noted that, by judging whether a diagonal frame exists between the screen-projecting picture and the bottom wallpaper, if the diagonal frame exists, performing gradual change RGBA calculation on the diagonal frame according to a diagonal compensation mode to obtain RGBA color value setting of the diagonal frame, and performing color gradual change processing on the diagonal frame according to the RGBA color value setting of the diagonal frame.
In summary, according to the method for gradually changing the color of the screen projection picture frame, the RGBA color value setting of the screen projection picture frame is calculated by acquiring the first RGBA numerical value of the screen projection picture and the second RGBA numerical value of the bottom wallpaper, and the color gradually changing processing of the screen projection picture frame is performed through the RGBA color value setting of the screen projection picture frame.
Meanwhile, whether the width or the height of the projection screen image display is equal to the width or the height of the screen is judged.
If so, the fact that the diagonal frame does not exist is proved, namely, the diagonal compensation operation is not needed, and only the RGBA color value setting of the screen projection picture frame is calculated, and the color gradual change processing of the screen projection picture frame is carried out through the RGBA color value setting of the screen projection picture frame.
If not, the fact that a diagonal frame exists between the screen-projecting picture and the bottom wallpaper is proved, and the diagonal compensation mode is obtained by judging whether the display width of the screen-projecting picture is larger than the display height of the screen-projecting picture.
If the display width of the projection screen is larger than the display height of the projection screen, the supplementary row operation is needed, so that the diagonal frame is a square frame, and the construction of a two-dimensional array by the diagonal frame becomes possible.
If the display width of the screen projection picture is less than the display height of the screen projection picture, additional line operation is needed, so that the diagonal frame is a square frame, and the diagonal frame can construct a two-dimensional array.
And setting RGBA values of all elements in all the supplementary rows (columns) as RGBA values of the bottom wallpaper color, carrying out RGBA operation on the diagonal frame based on a diagonal compensation mode to obtain RGBA color value setting of the diagonal frame, and then carrying out color gradient processing on the diagonal frame according to the RGBA color value setting of the diagonal frame.
According to the method, the color values of the screen-projecting picture close to the border are collected, the border color is made into a gradual change color effect through the colors, namely, the picture color is gradually changed to the bottom background color, if the colors are similar to the bottom background color, the color values which are obviously different from the bottom background color are adopted for gradual change operation, and the screen-projecting picture and the bottom wallpaper can be naturally and smoothly distinguished.
The color of the frame of the screen-projecting picture can be changed according to the color near the frame of the screen-projecting picture, in order to highlight the content of the screen-projecting picture, the screen-projecting picture and the bottom wallpaper are obviously distinguished, and the condition that the content of the screen-projecting picture and the bottom wallpaper are 'fused' is avoided. The user can see the screen-projecting picture image more clearly visually without considering the condition of color fusion of the screen-projecting picture and the bottom wallpaper, and meanwhile, the appearance of a frame which is not harmonious in appearance is avoided. Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic or optical disk, or the like.
In addition, the method and the device for gradually changing the color of the frame of the screen projection picture based on the wireless screen projection field provided by the embodiment of the invention are described in detail, a specific example is adopted to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A screen projection picture frame color gradual change method based on the wireless screen projection field is characterized by comprising the following steps:
acquiring a first RGBA value of a screen projection picture and a second RGBA value of bottom wallpaper;
performing gradual change RGBA value calculation based on the first RGBA numerical value and the second RGBA numerical value to obtain RGBA color value setting of a screen projection picture frame;
performing color gradient processing on the screen projection picture frame based on the RGBA color value setting of the screen projection picture frame;
judging whether diagonal frame color gradient processing is needed or not based on the display width and the height of the screen projection picture;
if so, performing gradual change RGBA value calculation processing on the diagonal frame based on a diagonal compensation mode to obtain the RGBA color value setting of the diagonal frame;
performing color gradient processing of the diagonal bezel based on the RGBA color value setting of the diagonal bezel.
2. The method of claim 1, wherein the performing the RGBA value calculation based on the first RGBA value and the second RGBA value to obtain the RGBA color value setting of the frame of the screen comprises:
obtaining an average RGBA value of the screen projection picture based on the first RGBA value;
obtaining a difference from the average RGBA value and the second RGBA value as an RGBA difference based on the average RGBA value;
averagely dividing the RGBA difference into N parts, and obtaining an averaged RGBA difference of each part;
and obtaining N parts of the RGBA color value settings from the screen projection picture frame to the bottom wallpaper based on the equally divided RGBA difference value.
3. The method of claim 2, wherein obtaining N parts of the RGBA color value settings from the screen frame to the bottom wallpaper based on the averaged RGBA difference comprises
N parts of the RGBA color value is set to be (r)n*1+ra,gn*1+ga,bn*1+ba,an*1+aa),(rn*2+ra,gn*2+ga,bn*2+ba,an*2+aa),...,(rn*N+ra,gn*N+ga,bn*N+ba,an*N+aa);
Wherein (r)a,ga,ba,aa) The average RGBA value of the screen projection picture is obtained; (r)n,gn,bn,an) And dividing the average RGBA difference value.
4. The method for gradually changing the color of the screen-projection frame according to claim 1, wherein the performing the color-changing process of the screen-projection frame based on the RGBA color value setting of the screen-projection frame comprises:
if raAnd rb、gaAnd gb、baAnd bbIs not greater than a first threshold, the RGBA values of the projection screen frame are (0,0,0, a)a) Or (255,255,255, a)a);
If ra、ga、baIs not less than a first threshold, the RGBA values of the screen projection frame are (0,0,0, a)a);
If ra、ga、baIs not greater than a second threshold, the RGBA values of the projected frame border are (255,255,255, a)a);
(ra,ga,ba,aa) The average RGBA value of the screen projection picture is obtained;
(rb,gb,bb,aa) Is the second RGBA value.
5. The method for gradually changing the border color of the screen projection picture according to claim 1, wherein the determining whether the diagonal border color gradually changing process is required based on the display width and the display height of the screen projection picture comprises:
judging whether the width or height of the projection screen image display is equal to the width or height of the screen;
if yes, performing gradient RGBA calculation on the diagonal frame without a diagonal compensation mode;
and if not, performing gradual change RGBA calculation on the diagonal frame based on a diagonal compensation mode, and performing color gradual change processing on the diagonal frame based on RGBA color value setting of the diagonal frame.
6. The method for scrolling a color of a border of a screen according to claim 5, wherein the calculating of the gradient RGBA of the diagonal border based on the diagonal compensation method comprises:
whether the display width of the screen projection picture is equal to the display height of the screen projection picture is determined;
if the color values are equal, performing gradual change RGBA value calculation processing on the diagonal frame without performing row or column supplement to obtain the RGBA color value setting of the diagonal frame;
if the display width of the screen projection picture is larger than the display height of the screen projection picture, column supplement is needed, and gradual change RGBA value calculation processing is carried out on the diagonal frame based on a diagonal compensation mode to obtain the RGBA color value setting of the diagonal frame;
and if the display width of the screen projection picture is smaller than the display height of the screen projection picture, performing line supplement, and performing gradual change RGBA value calculation processing on the diagonal frame based on a diagonal compensation mode to obtain the RGBA color value setting of the diagonal frame.
7. The method of claim 6, wherein the obtaining the RGBA color value setting of the diagonal bezel comprises:
setting the RGBA value of all elements in all supplemental rows or columns to the RGBA value of the bottom wallpaper based on all elements in all supplemental rows or columns.
8. The method for gradually changing the border color of the screen projection picture according to claim 6, wherein the performing the gradual change RGBA value calculation process on the diagonal border based on the diagonal compensation manner to obtain the RGBA color value setting of the diagonal border comprises:
constructing a two-dimensional array RGBAARay [ w ] [ h ];
obtaining the RGBA value of the two-dimensional array axis area based on the two-dimensional array as
Figure FDA0003322818160000031
Wherein (r)w,gw,bw,aw) The RGBA value for region w, (r)h,gh,bh,ah) The RGBA values for region h.
9. The method for gradually changing the border color of the screen-projection picture of claim 8, wherein the RGBA color values of an end region of the axis of the two-dimensional array are obtained based on the two-dimensional array as follows:
(rn*1+ra,gn*1+ga,bn*1+ba,an*1+aa),(rn*2+ra,gn*2+ga,bn*2+ba,an*2+aa),...,(rn*N+ra,gn*N+ga,bn*N+ba,an*N+aa);
acquiring the RGBA color values of the other end area of the two-dimensional array axis based on the two-dimensional array as follows:
(rn*1+r1,gn*1+g1,bn*1+b1,an*1+a1),(rn*2+r1,gn*2+g1,bn*2+b1,an*2+a1),...,(rn*N+r1,gn*N+g1,bn*N+b1,an*N+a1);
wherein (r)1,g1,b1,a1) The RGBA value for region 1, (r)a,ga,ba,aa) The RGBA value for region a, (r)n,gn,bn,an) And dividing the average RGBA difference value.
10. A screen projection picture frame color gradual change device based on the wireless screen projection field is characterized in that the device comprises:
an acquisition module: the first RGBA value of the screen projection picture and the second RGBA value of the bottom wallpaper are obtained;
a first calculation module: the screen projection frame comprises a first RGBA numerical value and a second RGBA numerical value, wherein the first RGBA numerical value and the second RGBA numerical value are used for carrying out gradual change RGBA calculation to obtain RGBA color value setting of the screen projection frame;
the first color value setting module: the RGBA color value setting unit is used for setting RGBA color values of the screen projection picture frames;
a judging module: the screen projection device is used for judging whether diagonal frame color gradient processing is needed or not based on the display width and height of the screen projection picture;
a second calculation module: the method comprises the steps of calculating gradient RGBA values of the diagonal frame based on a diagonal compensation mode to obtain the RGBA color value setting of the diagonal frame;
a second color value setting module: means for performing a color gradient process for the diagonal bounding box based on the RGBA color value setting for the diagonal bounding box.
CN202111259029.8A 2021-10-27 2021-10-27 Method and device for gradually changing colors of frames of screen projection pictures based on wireless screen projection field Active CN113992968B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111259029.8A CN113992968B (en) 2021-10-27 2021-10-27 Method and device for gradually changing colors of frames of screen projection pictures based on wireless screen projection field

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111259029.8A CN113992968B (en) 2021-10-27 2021-10-27 Method and device for gradually changing colors of frames of screen projection pictures based on wireless screen projection field

Publications (2)

Publication Number Publication Date
CN113992968A true CN113992968A (en) 2022-01-28
CN113992968B CN113992968B (en) 2023-03-31

Family

ID=79742931

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111259029.8A Active CN113992968B (en) 2021-10-27 2021-10-27 Method and device for gradually changing colors of frames of screen projection pictures based on wireless screen projection field

Country Status (1)

Country Link
CN (1) CN113992968B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201132118A (en) * 2010-03-01 2011-09-16 Matsushita Electric Tw Co Ltd Method for adjusting and controlling frame/subtitle color of the broadcast display and system thereof
CN105653128A (en) * 2015-12-29 2016-06-08 厦门美图移动科技有限公司 Application icon generation method and device as well as mobile terminal
CN107977946A (en) * 2017-12-20 2018-05-01 百度在线网络技术(北京)有限公司 Method and apparatus for handling image
CN108111799A (en) * 2017-12-14 2018-06-01 苏州科达科技股份有限公司 The identification method and device of spokesman in video conference
JP2021047407A (en) * 2020-10-06 2021-03-25 株式会社ユピテル Display
CN113347399A (en) * 2021-06-08 2021-09-03 杭州当贝网络科技有限公司 Borderless projection control method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201132118A (en) * 2010-03-01 2011-09-16 Matsushita Electric Tw Co Ltd Method for adjusting and controlling frame/subtitle color of the broadcast display and system thereof
CN105653128A (en) * 2015-12-29 2016-06-08 厦门美图移动科技有限公司 Application icon generation method and device as well as mobile terminal
CN108111799A (en) * 2017-12-14 2018-06-01 苏州科达科技股份有限公司 The identification method and device of spokesman in video conference
CN107977946A (en) * 2017-12-20 2018-05-01 百度在线网络技术(北京)有限公司 Method and apparatus for handling image
JP2021047407A (en) * 2020-10-06 2021-03-25 株式会社ユピテル Display
CN113347399A (en) * 2021-06-08 2021-09-03 杭州当贝网络科技有限公司 Borderless projection control method

Also Published As

Publication number Publication date
CN113992968B (en) 2023-03-31

Similar Documents

Publication Publication Date Title
CN108760767B (en) Large-size liquid crystal display defect detection method based on machine vision
CN106657946B (en) System and method are eliminated in image purple boundary
US10148895B2 (en) Generating a combined infrared/visible light image having an enhanced transition between different types of image information
CN108022223B (en) Tone mapping method based on logarithm mapping function blocking processing fusion
CN113706412B (en) SDR (read-write memory) to HDR (high-definition digital interface) conversion method
CN104469179A (en) Method for combining dynamic pictures into mobile phone video
CN103167293A (en) Display system and computer-readable medium
CN103366364A (en) Color difference-based image matting method
CN111899182A (en) Color enhancement method and device
CN112351195B (en) Image processing method, device and electronic system
CN104935902A (en) Image color enhancement method and device, and electronic equipment
CN111798474A (en) Image processing apparatus and image processing method thereof
US9754363B2 (en) Method and system for processing image content for enabling high dynamic range (UHD) output thereof and computer-readable medium comprising UHD content created using same
CN104680518A (en) Blue screen image matting method based on chroma overflowing processing
CN111124404B (en) Custom color display method and system
CN113992968B (en) Method and device for gradually changing colors of frames of screen projection pictures based on wireless screen projection field
US9741103B2 (en) Method and system for processing image content for enabling high dynamic range (UHD) output thereof and computer-readable program product comprising UHD content created using same
CN103971336B (en) Adjusting method, device and equipment for image lightness
CN111010605A (en) Method for displaying video picture-in-picture window
CN110505512A (en) Full screen playing method, terminal equipment and computer readable storage medium
CN113240573B (en) High-resolution image style transformation method and system for local and global parallel learning
CN111292243B (en) Projection seamless edge fusion method and device
CN110708476B (en) Real-time image processing method and device
CN108765502B (en) Color appearance obtaining method in complex environment
JPH11134491A (en) Image processor and its method

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
GR01 Patent grant
GR01 Patent grant