CN114527948A - Calculation method and device of cut region, intelligent equipment and storage medium - Google Patents
Calculation method and device of cut region, intelligent equipment and storage medium Download PDFInfo
- Publication number
- CN114527948A CN114527948A CN202011321701.7A CN202011321701A CN114527948A CN 114527948 A CN114527948 A CN 114527948A CN 202011321701 A CN202011321701 A CN 202011321701A CN 114527948 A CN114527948 A CN 114527948A
- Authority
- CN
- China
- Prior art keywords
- shearing
- boundary line
- ith
- initial
- brightness
- 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
Links
- 238000004364 calculation method Methods 0.000 title claims abstract description 15
- 238000010008 shearing Methods 0.000 claims abstract description 184
- 238000000034 method Methods 0.000 claims abstract description 27
- 238000004590 computer program Methods 0.000 claims description 9
- 230000000694 effects Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
- G06F3/1407—General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Image Analysis (AREA)
Abstract
The application discloses a calculation method and device of a shearing area, intelligent equipment and a storage medium, wherein the method comprises the following steps: determining an initial shearing boundary line of a shearing area; calculating an initial brightness average value corresponding to pixels in a frame where an initial shearing boundary line is located; if the initial brightness average value is larger than a preset first threshold value, moving the initial shearing boundary line to a direction far away from the central line of the shearing area by i rows to obtain an ith shearing boundary line; if the distance between the ith shearing boundary line and the central line of the shearing area is greater than or equal to the first shearing distance, no shearing is needed. The method aims to judge whether a current reference line is a graph boundary or not through the gradient of two adjacent frames and the specific brightness of the current frame, and particularly, the boundary search is accelerated by taking the normal screen ratio of a mobile phone as an initial reference line, so that an effective video area is quickly calculated, the effective video area is cut, and then the effective video area is stretched to the maximum display area of a television, the watching quality is improved, and the watching effect is improved.
Description
Technical Field
The present application relates to the field of web page technologies, and in particular, to a method and an apparatus for calculating a clipping region, an intelligent device, and a storage medium.
Background
The current television can directly receive a mobile phone screen, and display the same or different content with the mobile phone screen as an extension of the mobile phone screen. The television is usually in a horizontal screen (the television also has a vertical screen mode at present), and the mobile phone has two modes of horizontal and vertical screens. The television receives the content to be displayed by the mobile phone and displays the content to a user (screen projection for short in the following description) on a television screen, and the television usually keeps the aspect ratio of the content projected by the mobile phone end unchanged, so that the deformation of the displayed content can be avoided. The mobile phone end sends the video to the television with the television resolution, if the television resolution is 1920x1080, the mobile phone always codes the content to be 1920x1080 wide and high, when the television and the mobile phone are both in a horizontal screen mode, the display is perfectly matched, but if the television and the mobile phone are not in the horizontal screen mode, the display effect is poor.
Accordingly, there is a need for improvements and developments in the art.
Disclosure of Invention
Therefore, it is necessary to provide a method and an apparatus for calculating a clipping region, an intelligent device, and a storage medium for solving the technical problem that the display effect of the existing television and the existing endpoint in the non-landscape mode is poor when the existing television and endpoint are projected.
In order to achieve the purpose, the following technical scheme is adopted in the application:
in a first aspect, the present application provides a method for calculating a clipping region, including:
determining an initial shearing boundary line of a shearing area;
calculating an initial brightness average value corresponding to pixels in a frame where an initial shearing boundary line is located;
if the initial brightness average value is larger than a preset first threshold value, moving the initial shearing boundary line to a direction far away from the central line of the shearing area by i rows to obtain an ith shearing boundary line; wherein the initial value of i is 1, and i is a positive integer;
if the distance between the ith shearing boundary line and the central line of the shearing area is greater than or equal to the first shearing distance, no shearing is needed;
if the distance between the ith shearing boundary line and the central line of the shearing area is less than the first shearing distance, calculating the ith brightness average value corresponding to the pixels in the frame where the ith shearing boundary line is located;
if the ith brightness average value corresponding to the pixel in the frame where the ith shearing boundary line is located is larger than a preset first threshold, enabling i to be i +1, and returning to execute the step of moving the initial shearing boundary line to the direction away from the central line of the shearing area by i columns;
and if the ith brightness average value corresponding to the pixel in the frame where the ith shearing boundary line is located is smaller than a preset first threshold value, taking the ith shearing boundary line as a target shearing boundary line.
In a second aspect, the present application further provides a device for computing a cropped region, comprising:
the initial brightness calculation unit is used for determining an initial shearing boundary line of the shearing area and calculating an initial brightness average value corresponding to pixels in a frame where the initial shearing boundary line is located;
the shearing boundary line determining unit is used for moving the initial shearing boundary line to a direction away from the central line of the shearing area by i rows to obtain the ith shearing boundary line if the initial brightness average value is larger than a preset first threshold value; wherein the initial value of i is 1, and i is a positive integer;
the shearing judging unit is used for judging whether shearing is needed if the distance between the ith shearing boundary line and the central line of the shearing area is greater than or equal to the first shearing distance;
the shearing boundary line moving unit is used for calculating an ith brightness average value corresponding to the pixels in the frame where the ith shearing boundary line is located if the distance between the ith shearing boundary line and the center line of the shearing area is less than the first shearing distance; or if the ith brightness average value is larger than a preset first threshold, making i equal to i +1, and returning to execute moving the initial shearing boundary line to a direction away from the central line of the shearing area by i columns;
and the target shearing boundary line determining unit is used for taking the ith shearing boundary line as the target shearing boundary line if the ith brightness average value is smaller than a preset first threshold value.
In a third aspect, the present application further provides an intelligent device, where the intelligent device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the calculation method of the cropped regions when executing the computer program.
In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the steps in the method for calculating the cropped regions.
Has the advantages that:
compared with the prior art, the method and the device for calculating the cutting area, the intelligent device and the storage medium aim to judge whether a current reference line is a graph boundary or not through the average brightness gradient of two adjacent frames and the brightness average value of a current frame, particularly, the normal screen ratio of a mobile phone is used as an initial reference line to accelerate boundary search, so that the effective video area is calculated quickly, the effective video area is cut, and then the effective video area is stretched to the maximum display area of a television, the viewing quality is improved, and the viewing effect is improved.
Drawings
Fig. 1 is a flowchart of a calculation method of a cropped area provided in the present application;
FIG. 2 is a graphical illustration of a cropped area provided herein;
FIG. 3 is a functional block diagram of a computing device for cropping a region according to the present application;
fig. 4 is a block diagram of a structure of an intelligent terminal provided in the present application.
Detailed Description
The present application provides a method and an apparatus for calculating a clipping region, an intelligent device, and a storage medium, and in order to make the purpose, technical solution, and effect of the present application clearer and clearer, the present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those within the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The technical scheme of the application is described in the following with reference to the accompanying drawings and specific embodiments, as follows:
referring to fig. 1, fig. 1 is a flowchart of a method for calculating a clipping region. It should be noted that the calculation method of the clipping region according to the embodiment of the present invention is not limited to the steps and the sequence in the flowchart shown in fig. 1, and the steps in the flowchart may be added, removed, or changed according to different requirements. As shown in fig. 1, the calculation method of the cropped regions includes:
and S10, the intelligent device determines an initial shearing boundary line of the shearing area.
Specifically, the cut-out region refers to a video region where the television receives the mobile phone. Typically, the cutout region is a symmetric rectangle. Therefore, when the size and position of the cut region are confirmed, the cut boundary line can be confirmed by dividing only the center line of the cut region, confirming the cut boundary line in the left region or the right region, and confirming the corresponding cut boundary line in the other region by symmetry.
The initial shearing boundary line is a boundary line and a reference line of the shearing area. Randomly selecting any position from a shearing area as an initial shearing boundary line.
As shown in fig. 2, M is the center line of the sheared area. The position is W/2, W is the width of the video received by the television, H is the height of the video received by the television, and L0 is an initial cutting boundary line, namely an initial reference line. Ls is a second clipping boundary line which is a second clipping distance from the center line, which is a minimum threshold of the initial reference line, and Le is a first clipping boundary line which is a first clipping distance from the center line, which is a maximum threshold of the initial reference line, it being understood that the first clipping distance is greater than the second clipping distance. X is the distance of the sheared area from the centerline M. In this embodiment, Ls is 21:9 and Le is W/2
In this embodiment, the position of L0 is H/2. Typically, the screen ratio of the handset is 21:9,21:10,16:9,4:3, etc.
And S20, the intelligent equipment calculates the initial brightness average value corresponding to the pixels in the frame where the initial shearing boundary line is located.
Specifically, step S20 includes:
acquiring a third brightness value and a second total number of all pixels in the vertical direction of the frame where the initial shearing boundary line is located;
summing all the third brightness values to obtain a third total brightness;
and the third total brightness and the second total number are subjected to quotient operation to obtain an initial brightness average value.
If the pixel format is the RGB format, the RGB format is converted into a value including the Y format. In this embodiment, the format of each pixel is YUV format, and conversion is not required, so as to directly obtain the Y value, i.e. the luminance value, in the YUV format of the pixel.
The sum of the luminance values of all the pixels in the vertical direction of L0 is calculated and divided by the number H of pixels (i.e., the screen height H) to obtain an initial luminance average value.
It is formulated as:
Y=Lumin(Lx)
(A)
S30, if the initial brightness average value is larger than a preset first threshold value, the intelligent equipment moves the initial shearing boundary line to the direction far away from the center line of the shearing area by i rows to obtain the ith shearing boundary line; wherein, the initial value of i is 1, and i is a positive integer.
In this embodiment, the preset first threshold is defined as Y0
If Y > Y0, the reference line L0 is moved to the edge of the picture, if Le is reached, no clipping is needed (to explain that the mobile phone is probably in landscape mode)
When Y < Y0, the reference line L0 is moved toward the center of the image until Y > -Y0 or Ls is reached.
S40, if the distance between the ith shearing boundary line and the central line of the shearing area is larger than or equal to the first shearing distance, the intelligent equipment does not need to shear;
s50, if the distance between the ith shearing boundary line and the central line of the shearing area is smaller than the first shearing distance, the intelligent equipment calculates the ith brightness average value corresponding to the pixels in the frame where the ith shearing boundary line is located;
s60, if the ith luminance average value is greater than the preset first threshold, the smart device sets i to i +1, and returns to execute moving the initial clipping boundary line to the direction away from the center line of the clipping region by i columns;
and S70, if the ith brightness average value is smaller than a preset first threshold value, the intelligent device takes the ith cutting boundary line as a target cutting boundary line.
If the initial brightness average value is smaller than a preset first threshold value, the intelligent equipment moves the initial shearing boundary line to the direction close to the central line of the shearing area by i rows to obtain the ith shearing boundary line; wherein the initial value of i is 1, and i is a positive integer;
if the distance between the ith shearing boundary line and the center line of the shearing area is smaller than or equal to the second shearing distance, the intelligent equipment takes the second shearing boundary line corresponding to the second shearing distance as a target shearing boundary line; wherein the first shearing distance is greater than the second shearing distance;
if the distance between the ith shearing boundary line and the central line of the shearing area is greater than the second shearing distance, the intelligent equipment calculates the ith brightness average value corresponding to the pixels in the frame where the ith shearing boundary line is located;
if the ith brightness average value is larger than a preset first threshold, the intelligent device enables i to be i +1, and the intelligent device returns to execute the movement of the initial shearing boundary line to the direction close to the central line of the shearing area by i columns;
and if the ith brightness average value is smaller than a preset first threshold value, the intelligent equipment takes the ith shearing boundary line as a target shearing boundary line.
And (3) confirming the target cutting boundary line through the first step or the second step, and verifying whether the calculation of the target cutting boundary line is correct or not through two adjacent video frames, so as to confirm whether the mobile phone is switched between a horizontal screen and a vertical screen or not.
Specifically, the intelligent device determines whether a frame where the target shearing boundary line is located is a first frame of a shearing area;
1. and if the frame where the target shearing boundary line is located is the first frame of the shearing area, the intelligent device does not need to shear and directly ends.
2. If the frame where the target shearing boundary line is not the first frame of the shearing region, the intelligent equipment calculates the average brightness gradient difference value of the frame where the ith shearing boundary line is located and the frame where the (i-1) th shearing boundary line is located;
3. if the average brightness gradient difference value is larger than a preset second threshold value, the intelligent equipment determines that the target shearing boundary line is incorrect and reconfirms the target shearing boundary line;
4. and if the average brightness gradient difference value is smaller than or equal to a preset second threshold value, the intelligent equipment determines the size of the shearing area according to the target shearing boundary line.
Wherein, step 2 includes:
acquiring first brightness values of all pixels in the vertical direction of a frame where the ith shearing boundary line is located;
summing all the first brightness values to obtain a first total brightness;
acquiring second brightness values of all pixels in the vertical direction of a frame where the i-1 th shearing boundary line is located;
summing all the second brightness values to obtain a second total brightness;
the first total brightness and the second total brightness are subjected to difference to obtain a brightness difference value;
acquiring a first total number of all pixels in the vertical direction of the ith frame;
and the absolute value of the brightness difference value is divided by the first total number to obtain an average brightness gradient difference value.
Specifically, the intelligent device calculates an average gradient threshold D of the inter-frame reference line L, and the second threshold is a fixed judgment threshold constant D0:
d ═ absolute sum of pixel values luminance (corresponding to the reference line L of the previous frame-the reference line L of the next frame) ÷ number of pixels H
And when D < ═ D0, judging that the reference line is correct. Otherwise the reference line L should be recalculated, moving towards the edge.
Previous frame reference line pixel luminance: yb ═ H { y0, y1, y2
Luminance of reference line pixel of the latter frame: h total Ya { y0, y1, y2
Can be expressed as:
D=Abs(Yb-Ya)/H
abs is a function of the vector calculated magnitude.
Further, the intelligent device determines the size of the cutting area according to the target cutting boundary line, and the method comprises the following steps:
acquiring the distance x between a target shearing boundary line and the central line of a shearing area; since the position of the center line is half of the screen width and the cutout region is an axially symmetric region about the center line, it was confirmed that the width of the cutout region is 2x and the height of the cutout region is the screen height.
Thus, based on steps S10-S70, the present application aims to determine whether the current reference line is a graphic boundary according to the gradient of two adjacent frames and the specific brightness of the current frame, and particularly, the normal screen ratio of the mobile phone is used as an initial reference line to speed up the boundary search, so as to quickly calculate the effective video area, cut the effective video area, and then stretch the effective video area to the maximum display area of the television, thereby improving the viewing quality and the viewing effect.
Based on the above method for calculating the cropped area, the present application further provides a device for calculating the cropped area, please refer to fig. 3, and fig. 3 illustrates a functional module diagram of the device for calculating the cropped area in the present application. The device includes:
the initial brightness calculation unit 101 is configured to determine an initial shearing boundary line of a shearing region, and calculate an initial brightness average value corresponding to a pixel in a frame where the initial shearing boundary line is located;
a clipping boundary line determining unit 102, configured to, if the initial brightness average value is greater than a preset first threshold, move the initial clipping boundary line by i rows in a direction away from the center line of the clipping region, so as to obtain an ith clipping boundary line; wherein the initial value of i is 1, and i is a positive integer;
a cutting determination unit 103 configured to, if a distance between the ith cutting boundary line and the center line of the cutting region is greater than or equal to the first cutting distance, eliminate the need for cutting;
a cutting boundary line moving unit 104, configured to calculate an ith luminance average value corresponding to a pixel in a frame where an ith cutting boundary line is located, if a distance between the ith cutting boundary line and a center line of the cutting region is smaller than a first cutting distance; or if the ith brightness average value is larger than a preset first threshold, making i equal to i +1, and returning to execute moving the initial shearing boundary line to a direction away from the central line of the shearing area by i columns;
a target shearing boundary line determining unit 105, configured to take the ith shearing boundary line as a target shearing boundary line if the ith brightness average value is smaller than a preset first threshold; the calculation method for implementing the cropped regions is specifically the method described above.
Based on the calculation method of the shearing area, the application also provides intelligent equipment. Referring to fig. 4, fig. 4 illustrates a schematic structural diagram of the smart device 1 in the present application. The smart device 1 may include a processor 20 and a memory 22, with fig. 4 showing only some of the components of the smart device 1, but it will be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. The intelligent device 1 can be any networking-capable device such as a mobile phone, an ipad and a desktop computer.
The storage 22 may in some embodiments be an internal storage unit of the smart device 1, such as a memory of the smart device 1. The memory 22 may also be an external storage device of the Smart device 1 in other embodiments, such as a plug-in usb disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the Smart device 1. Further, the memory 22 may also include both an internal storage unit of the smart device 1 and an external storage device. The memory 22 is used for storing application software installed in the smart device 1 and various types of data, such as a display program code of a web page. The memory 22 may also be used to temporarily store data that has been output or is to be output. In one embodiment, the memory 22 stores a web page display program, and the web page display program can be executed by the processor 20 to perform the above-mentioned method.
The processor 20 may be, in some embodiments, a Central Processing Unit (CPU), a microprocessor, a mobile phone baseband processor or other data Processing chip, and is used for executing program codes stored in the memory 22 or Processing data, such as executing a calculation method of a clipping region.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor 20, implements the steps in the method of calculating a cropped area, in particular as described above.
Of course, it will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program instructing relevant hardware (such as a processor, a controller, etc.), and the program may be stored in a computer readable storage medium, and when executed, the program may include the processes of the above method embodiments. The storage medium may be a memory, a magnetic disk, an optical disk, etc.
It should be understood that the application of the present application is not limited to the above examples, and that modifications or changes may be made by those skilled in the art based on the above description, and all such modifications and changes are intended to fall within the scope of the appended claims.
Claims (10)
1. A method for calculating a cropped region, comprising:
determining an initial shearing boundary line of a shearing area;
calculating an initial brightness average value corresponding to pixels in a frame where the initial shearing boundary line is located;
if the initial brightness average value is larger than a preset first threshold value, moving the initial shearing boundary line to a direction far away from the center line of the shearing area by i rows to obtain an ith shearing boundary line; wherein the initial value of i is 1, and i is a positive integer;
if the distance between the ith shearing boundary line and the central line of the shearing area is greater than or equal to a first shearing distance, no shearing is needed;
if the distance between the ith shearing boundary line and the central line of the shearing area is less than the first shearing distance, calculating the ith brightness average value corresponding to the pixels in the frame where the ith shearing boundary line is located;
if the ith brightness average value is larger than the preset first threshold, making i equal to i +1, and returning to execute moving the initial shearing boundary line to a direction away from the central line of the shearing area by i columns;
and if the ith brightness average value is smaller than the preset first threshold value, taking the ith shearing boundary line as a target shearing boundary line.
2. The method of claim 1, further comprising:
if the initial brightness average value is smaller than a preset first threshold value, moving the initial shearing boundary line to a direction close to the central line of the shearing area by i rows to obtain an ith shearing boundary line; wherein the initial value of i is 1, and i is a positive integer;
if the distance between the ith shearing boundary line and the center line of the shearing area is smaller than or equal to a second shearing distance, taking a second shearing boundary line corresponding to the second shearing distance as a target shearing boundary line; wherein the first shearing distance is greater than the second shearing distance;
if the distance between the ith shearing boundary line and the central line of the shearing area is greater than the second shearing distance, calculating the ith brightness average value corresponding to the pixels in the frame where the ith shearing boundary line is located;
if the ith brightness average value is larger than the preset first threshold, making i equal to i +1, and returning to execute moving the initial shearing boundary line to a direction close to the central line of the shearing area by i columns;
and if the ith brightness average value is smaller than the preset first threshold value, taking the ith shearing boundary line as a target shearing boundary line.
3. The method according to claim 1 or 2, wherein after the i-th cut boundary line is taken as a target cut boundary line, the method further comprises:
determining whether a frame where the target shearing boundary line is located is a first frame of the shearing area;
if yes, no shearing is needed;
if not, calculating the average brightness gradient difference value of the frame where the ith shearing boundary line is located and the frame where the (i-1) th shearing boundary line is located;
if the average brightness gradient difference value is larger than a preset second threshold value, determining that the target shearing boundary line is incorrect, and re-confirming the target shearing boundary line;
and if the average brightness gradient difference value is smaller than or equal to a preset second threshold value, determining the size of the shearing area according to the target shearing boundary line.
4. The method according to claim 3, wherein the calculating the average brightness gradient difference between the frame where the i-th cut boundary line is located and the frame where the i-1-th cut boundary line is located comprises:
acquiring first brightness values of all pixels in the vertical direction of a frame where the ith shearing boundary line is located;
summing all the first brightness values to obtain a first total brightness;
acquiring second brightness values of all pixels in the vertical direction of a frame where the i-1 th shearing boundary line is located;
summing all the second brightness values to obtain a second total brightness;
the first total brightness and the second total brightness are subjected to difference to obtain a brightness difference value;
acquiring a first total number of all pixels in the vertical direction of the ith frame;
and dividing the absolute value of the brightness difference value by the first total number to obtain an average brightness gradient difference value.
5. The method of claim 3, wherein said determining the size of the clipping region based on the target clipping boundary line comprises:
acquiring the distance x between the target shearing boundary line and the central line of the shearing area;
confirming that the width of the cutting area is 2x, and the height of the cutting area is the screen height.
6. The method according to claim 1, wherein the calculating an initial brightness average value corresponding to a pixel in a frame where the initial shearing boundary line is located comprises:
acquiring a third brightness value and a second total number of all pixels in the vertical direction of the frame where the initial shearing boundary line is located;
summing all the third brightness values to obtain a third total brightness;
and dividing the third total brightness by the second total number to obtain the initial brightness average value.
7. The method of claim 1, wherein the centerline is located at one-half of the screen width, and the cropped region is an axisymmetric region centered on the centerline.
8. A device for computing a cropped area, comprising:
the initial brightness calculation unit is used for determining an initial shearing boundary line of a shearing area and calculating an initial brightness average value corresponding to pixels in a frame where the initial shearing boundary line is located;
a shearing boundary line determining unit, configured to, if the initial brightness average value is greater than a preset first threshold, move the initial shearing boundary line by i rows in a direction away from a center line of the shearing region, so as to obtain an ith shearing boundary line; wherein the initial value of i is 1, and i is a positive integer;
a cutting determination unit, configured to, if a distance between the ith cutting boundary line and the center line of the cutting region is greater than or equal to a first cutting distance, eliminate the need for cutting;
the shearing boundary line moving unit is used for calculating an ith brightness average value corresponding to the pixel in the frame where the ith shearing boundary line is located if the distance between the ith shearing boundary line and the center line of the shearing area is less than a first shearing distance; or if the ith brightness average value is greater than the preset first threshold, making i equal to i +1, and returning to execute moving the initial shearing boundary line to a direction away from the central line of the shearing area by i columns;
and the target shearing boundary line determining unit is used for taking the ith shearing boundary line as the target shearing boundary line if the ith brightness average value is smaller than the preset first threshold value.
9. An intelligent device, characterized in that the intelligent device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps in the calculation method of the clipping region according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which, when being executed by a processor, implements the steps in the method of calculating a cropped regions of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011321701.7A CN114527948B (en) | 2020-11-23 | 2020-11-23 | Method and device for calculating clipping region, intelligent device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011321701.7A CN114527948B (en) | 2020-11-23 | 2020-11-23 | Method and device for calculating clipping region, intelligent device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114527948A true CN114527948A (en) | 2022-05-24 |
CN114527948B CN114527948B (en) | 2024-03-12 |
Family
ID=81619906
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011321701.7A Active CN114527948B (en) | 2020-11-23 | 2020-11-23 | Method and device for calculating clipping region, intelligent device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114527948B (en) |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08214210A (en) * | 1993-12-17 | 1996-08-20 | Nippon Telegr & Teleph Corp <Ntt> | Method and device for detecting cutting point of video |
WO2002005547A2 (en) * | 2000-07-07 | 2002-01-17 | Koninklijke Philips Electronics N.V. | Window detection |
TW200917829A (en) * | 2007-10-05 | 2009-04-16 | Himax Tech Ltd | Method for detecting borders of active region in frame |
CN103079028A (en) * | 2011-10-25 | 2013-05-01 | 联咏科技股份有限公司 | Black edge detection method for image picture and image processing device |
JP2013210887A (en) * | 2012-03-30 | 2013-10-10 | Canon Inc | Image processing apparatus and control method therefor |
JP2014127026A (en) * | 2012-12-26 | 2014-07-07 | Nippon Soken Inc | Branch road determination device, boundary line recognition device |
US9060106B1 (en) * | 2012-06-19 | 2015-06-16 | Google Inc. | Border detection in videos |
KR101733028B1 (en) * | 2016-05-30 | 2017-05-08 | 경북대학교 산학협력단 | Method For Estimating Edge Displacement Againt Brightness |
CN107105184A (en) * | 2017-04-01 | 2017-08-29 | 深圳市蓝莓派科技有限公司 | A kind of same screen projective techniques of mobile terminal in portrait layout advertisement machine |
CN107464251A (en) * | 2016-06-03 | 2017-12-12 | 上海顺久电子科技有限公司 | The black edge detection method and device of a kind of image |
KR20180072517A (en) * | 2017-07-19 | 2018-06-29 | 주식회사 쓰리이 | Method for detecting borderline between iris and sclera |
CN111401165A (en) * | 2020-03-06 | 2020-07-10 | Tcl华星光电技术有限公司 | Station caption extraction method, display device and computer-readable storage medium |
CN111479162A (en) * | 2020-04-07 | 2020-07-31 | 广州酷狗计算机科技有限公司 | Live data transmission method and device and computer readable storage medium |
CN111695540A (en) * | 2020-06-17 | 2020-09-22 | 北京字节跳动网络技术有限公司 | Video frame identification method, video frame cutting device, electronic equipment and medium |
-
2020
- 2020-11-23 CN CN202011321701.7A patent/CN114527948B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08214210A (en) * | 1993-12-17 | 1996-08-20 | Nippon Telegr & Teleph Corp <Ntt> | Method and device for detecting cutting point of video |
WO2002005547A2 (en) * | 2000-07-07 | 2002-01-17 | Koninklijke Philips Electronics N.V. | Window detection |
TW200917829A (en) * | 2007-10-05 | 2009-04-16 | Himax Tech Ltd | Method for detecting borders of active region in frame |
CN103079028A (en) * | 2011-10-25 | 2013-05-01 | 联咏科技股份有限公司 | Black edge detection method for image picture and image processing device |
JP2013210887A (en) * | 2012-03-30 | 2013-10-10 | Canon Inc | Image processing apparatus and control method therefor |
US9060106B1 (en) * | 2012-06-19 | 2015-06-16 | Google Inc. | Border detection in videos |
JP2014127026A (en) * | 2012-12-26 | 2014-07-07 | Nippon Soken Inc | Branch road determination device, boundary line recognition device |
KR101733028B1 (en) * | 2016-05-30 | 2017-05-08 | 경북대학교 산학협력단 | Method For Estimating Edge Displacement Againt Brightness |
CN107464251A (en) * | 2016-06-03 | 2017-12-12 | 上海顺久电子科技有限公司 | The black edge detection method and device of a kind of image |
CN107105184A (en) * | 2017-04-01 | 2017-08-29 | 深圳市蓝莓派科技有限公司 | A kind of same screen projective techniques of mobile terminal in portrait layout advertisement machine |
KR20180072517A (en) * | 2017-07-19 | 2018-06-29 | 주식회사 쓰리이 | Method for detecting borderline between iris and sclera |
CN111401165A (en) * | 2020-03-06 | 2020-07-10 | Tcl华星光电技术有限公司 | Station caption extraction method, display device and computer-readable storage medium |
CN111479162A (en) * | 2020-04-07 | 2020-07-31 | 广州酷狗计算机科技有限公司 | Live data transmission method and device and computer readable storage medium |
CN111695540A (en) * | 2020-06-17 | 2020-09-22 | 北京字节跳动网络技术有限公司 | Video frame identification method, video frame cutting device, electronic equipment and medium |
Non-Patent Citations (1)
Title |
---|
徐新文;李国辉;朱为;: "基于图像分割和对象跟踪的新闻视频镜头边界检测方法", 中国图象图形学报, no. 08 * |
Also Published As
Publication number | Publication date |
---|---|
CN114527948B (en) | 2024-03-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9619861B2 (en) | Apparatus and method for improving quality of enlarged image | |
US8111949B2 (en) | Image processing device, image projection apparatus, image processing method, recording medium, and computer data signal | |
EP2587340A2 (en) | Data display apparatus and method for mobile terminal | |
US20130163812A1 (en) | Information processor, information processing method, and recording medium | |
CN108881743B (en) | Video image processing method, device and system based on splicing wall | |
US20230362328A1 (en) | Video frame insertion method and apparatus, and electronic device | |
JP2012513719A (en) | Generating image scaling curves | |
US8264587B2 (en) | Increasing frame rate for imaging | |
US8228432B2 (en) | Picture processing device, method therefor, and program | |
US20220247928A1 (en) | Image processing method and apparatus, aerial camera and storage medium | |
US20120308147A1 (en) | Image processing device, image processing method, and program | |
US20170127031A1 (en) | Display apparatus and method of controlling the apparatus | |
US20100103312A1 (en) | Video Display Device, Video Signal Processing Device, and Video Signal Processing Method | |
CN114527948A (en) | Calculation method and device of cut region, intelligent equipment and storage medium | |
US8934733B2 (en) | Method, apparatus, and non-transitory computer readable medium for enhancing image contrast | |
CN112911362B (en) | Video picture moving and scaling method and device, electronic equipment and readable storage medium | |
US20190007666A1 (en) | Image details processing method, apparatus, terminal, and storage medium | |
US20160253823A1 (en) | Image compression device, image compression method, and image compression program | |
CN112328145A (en) | Image display method, device, equipment and computer readable storage medium | |
CN111970516B (en) | Inter-frame prediction method, video encoding method, electronic device and storage device | |
JP2010009305A (en) | Image-processing device, image-processing method, and program | |
CN108012180B (en) | Program playing method, television and storage medium | |
US8144246B2 (en) | Video signal processing apparatus, method, and computer program product for converting interlaced video signals into progressive video signals | |
CN116828204A (en) | Processing method for on-screen display image | |
CN117369932A (en) | Wallpaper processing method and device, electronic equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |