Method, device, storage medium and electronic device for determining image overflow
By obtaining the current frame image and the previous frame image, using numerical difference operation and binarization processing algorithm to generate the first image, and determining the pixels according to the mask area, the problem of low image overflow efficiency in the existing technology is solved, and more efficient image display management is achieved.
Patent Information
- Application Number
- CN202210160156.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-22
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-02-22
AI Technical Summary
The efficiency of determining image overflow in the prior art is low, resulting in inconvenient operation or incomplete content display on a non-rectangular screen.
By obtaining the current frame image and the previous frame image, a first image is generated using a numerical difference operation and a binarization processing algorithm, and the first pixel and the second pixel are determined according to the set mask area, and the number of pixels is counted to determine image overflow.
The efficiency of determining image overflow is improved, human resource consumption is reduced, software development costs are saved, and the image is ensured to be fully displayed on the display screen.
Smart Images

Figure CN114675797B_ABST
Abstract
Description
Technical field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, storage medium and electronic device for determining image overflow. [Background Technology]
[0002] Electronic devices present visual effect information of various applications. Regardless of the platform, the visual element content needs to be presented to the video memory buffer in order to be output to the display screen. Visual content includes a variety of visual units, such as images, graphics, text, area fills, etc. The physical shape of the display screen of an electronic device is circular, rounded rectangle, etc., while the shape of the logical display interface of the display screen is usually circular or rectangular. Generally speaking, during the product development stage, the User Experience (UX) design department will output detailed visual effect diagrams, and the software development team will complete the program and final effect output. However, during the entire project delivery process, the visual effects presented by the software program may have key display information that exceeds or approaches the outer edge of the product, resulting in inconvenient operation on non-rectangular screens, or only partial content can be displayed.
[0003] In the prior art, workers usually find that the visual effects presented by the software program exceed the outer edge range of the electronic device when performing visual acceptance, thereby reducing the efficiency of determining image overflow. [Summary of the invention]
[0004] In view of this, embodiments of the present invention provide a method, apparatus, storage medium, and electronic device for determining image overflow, so as to solve the problem of low efficiency in determining image overflow in the prior art.
[0005] In a first aspect, an embodiment of the present invention provides a method for determining image overflow, including:
[0006] Get the current frame image and the previous frame image;
[0007] generating a first image corresponding to the current frame image according to the current frame image and the previous frame image;
[0008] Based on the first image and at least one set mask area, at least one first pixel and at least one second pixel in the first image are determined, the first pixel does not correspond to any pixel of the mask area, and the second pixel corresponds to a pixel of any mask area.
[0009] In a possible implementation, after determining at least one first pixel and at least one second pixel in the first image based on the first image and at least one set mask area, the method further includes:
[0010] counting a first number of the first pixels and a second number of at least one of the second pixels;
[0011] Statistical information corresponding to the current frame image is generated according to the first number, at least one second number, a mask area corresponding to the second number of at least one second pixel, and the acquired identification information of the current frame image.
[0012] In a possible implementation, the identification information is window information.
[0013] In a possible implementation, generating a first image corresponding to the current frame image according to the current frame image and the previous frame image includes:
[0014] performing a difference operation on the current frame image and the previous frame image according to a numerical difference operation algorithm to generate a second image;
[0015] The second image is processed according to a binarization processing algorithm to generate the first image corresponding to the current frame image.
[0016] In a possible implementation, before performing a difference operation on the current frame image and the previous frame image according to the acquired numerical difference operation algorithm to generate the second image, the method further includes:
[0017] Get the refresh drawing overall shield entry;
[0018] The set detection processing judgment function is registered in the refresh drawing overall mask entry, and the detection processing judgment function includes the numerical difference operation algorithm and the binarization processing algorithm.
[0019] In a possible implementation, each of the mask areas is located in a total area, and the total area includes at least one mask area and a blank area outside all of the mask areas;
[0020] The determining, based on the first image and at least one set mask area, at least one first pixel and at least one second pixel in the first image includes:
[0021] Aligning edges of the total area with edges of the first image so that pixels within the total area correspond to pixels of the first image;
[0022] determining a pixel in the first image corresponding to a pixel in the blank area as the first pixel;
[0023] A pixel in the first image corresponding to a pixel in each mask area is determined as the second pixel corresponding to the mask area.
[0024] In a possible implementation, after generating the statistical information corresponding to the current frame image, the method further includes:
[0025] Determining whether the first number is greater than a set pixel threshold;
[0026] If it is determined that the first number is greater than the set pixel threshold, statistical information corresponding to the current frame image is displayed.
[0027] In a second aspect, an embodiment of the present invention provides a device for determining image overflow, including:
[0028] A first acquisition module is used to acquire a current frame image and a previous frame image;
[0029] A first generating module, configured to generate a first image corresponding to the current frame image according to the current frame image and the previous frame image;
[0030] The first determination module is used to determine at least one first pixel and at least one second pixel in the first image based on the first image and at least one set mask area, where the first pixel does not correspond to any pixel of the mask area, and the second pixel corresponds to a pixel of any mask area.
[0031] In a third aspect, an embodiment of the present invention provides a storage medium, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the method for determining image overflow in the first aspect or any possible implementation of the first aspect.
[0032] In a fourth aspect, an embodiment of the present invention provides an electronic device comprising a display screen; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the device, cause the device to execute the method for determining image overflow in the first aspect or any possible implementation of the first aspect.
[0033] In the technical solution provided by the embodiment of the present invention, a current frame image and a previous frame image are obtained; a first image corresponding to the current frame image is generated based on the current frame image and the previous frame image; and at least one first pixel and at least one second pixel in the first image are determined based on the first image and at least one set mask area, the first pixel does not correspond to any pixel in all mask areas, and the second pixel corresponds to a pixel in any mask area, thereby improving the efficiency of determining image overflow.
Brief Description of the Drawings
[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0035] Figure 1 A flowchart of a method for determining image overflow provided by an embodiment of the present invention;
[0036] Figure 2 A schematic diagram of determining image overflow provided by an embodiment of the present invention;
[0037] Figure 3 A flowchart of another method for determining image overflow provided by an embodiment of the present invention;
[0038] Figure 4 A flowchart for generating a first image provided by an embodiment of the present invention;
[0039] Figure 5 A schematic structural diagram of a device for determining image overflow provided by an embodiment of the present invention;
[0040] Figure 6 A schematic diagram of an electronic device provided by an embodiment of the present invention. [Specific implementation method]
[0041] In order to better understand the technical solution of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0042] It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative work are within the scope of protection of the present invention.
[0043] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "an", "the" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.
[0044] It should be understood that the term "and / or" as used herein is merely a description of the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0045] It should be understood that although the terms first, second, third, etc. may be used to describe numbers in embodiments of the present invention, these numbers should not be limited to these terms. These terms are merely used to distinguish numbers from each other. For example, a first number may also be referred to as a second number, and similarly, a second number may also be referred to as a first number without departing from the scope of embodiments of the present invention.
[0046] The word "if," as used herein, may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.
[0047] Figure 1 A flowchart of a method for determining image overflow provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, including:
[0048] Step 101: Obtain the current frame image and the previous frame image.
[0049] Each step of the embodiment of the present invention may be performed by an electronic device, including but not limited to a mobile phone, a tablet computer, a portable PC, a desktop computer, a wearable device, etc.
[0050] The electronic device's window is an independent graphical user interface (GUI) unit that includes sub-item GUI controls. A user can draw an image through the window. A worker can draw an image through the electronic device's window. The electronic device acquires multiple windows, each containing an image, thereby enabling the electronic device to acquire multiple images; select any one of the acquired multiple images as a current frame image; and acquire the previous frame image of the current frame image from the multiple images.
[0051] Step 102: Generate a first image corresponding to the current frame image according to the current frame image and the previous frame image.
[0052] In an embodiment of the present invention, the electronic device calculates the current frame image and the previous frame image according to the set detection processing judgment function to generate a first image corresponding to the current frame image, wherein the detection processing judgment function includes a numerical difference operation algorithm and a binarization processing algorithm.
[0053] Step 103: Determine at least one first pixel and at least one second pixel in the first image based on the first image and at least one set mask area, wherein the first pixel does not correspond to any pixel in any mask area, and the second pixel corresponds to any pixel in any mask area.
[0054] In an embodiment of the present invention, the electronic device includes a display screen. The physical shape of the display screen is usually a circle or a rounded rectangle, while the shape of the logical display interface of the display screen is usually smaller than the physical shape of the display screen. The shape of the logical display interface is usually a circle or a rectangle. If the edge of the current frame image exceeds the edge of the logical display interface of the display screen, the current frame image has an image overflow. For example, Figure 2 A schematic diagram of determining image overflow provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, Figure 2 It shows multiple windows, a GUI control layer, and a Graphics Device Interface (GDI), wherein the multiple windows include window 1, window 2, ..., window n; Figure 2 Also shown are multiple mask areas and blank areas, wherein the multiple mask areas include mask area 1 and mask area 2; Figure 2 Also shown is a liquid crystal display (LCD). Figure 2 As shown, mask area 1 is annular, and mask area 2 is circular. Any pixel corresponding to the blank area is a first pixel, which cannot be displayed on the display's logical display interface. That is, the first pixel is a pixel in the current frame image that overflows the display's logical display interface. Any pixel corresponding to mask area 1 or mask area 2 is a second pixel, which can be displayed on the display's logical display interface in the current frame image.
[0055] In the technical solution of the method for determining image overflow provided by an embodiment of the present invention, a current frame image and a previous frame image are obtained; a first image corresponding to the current frame image is generated based on the current frame image and the previous frame image; and at least one first pixel and at least one second pixel in the first image are determined based on the first image and at least one set mask area, the first pixel does not correspond to any pixel in all mask areas, and the second pixel corresponds to a pixel in any mask area, thereby improving the efficiency of determining image overflow.
[0056] Figure 3 A flowchart of another method for determining image overflow provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, including:
[0057] Step 201: Get the refresh drawing overall shield entry.
[0058] In an embodiment of the present invention, the electronic device obtains a video composed of multiple windows, the video includes a refresh drawing overall shielding entry, and the electronic device obtains the refresh drawing overall shielding entry.
[0059] Step 202: register the set detection processing judgment function into the refresh drawing overall shield entry, where the detection processing judgment function includes a numerical difference operation algorithm and a binarization processing algorithm.
[0060] In an embodiment of the present invention, the staff can set a detection processing judgment function, and the electronic device will register the set detection processing judgment function to the refresh drawing overall shield entrance, so that the electronic device can obtain the numerical difference operation algorithm and the binarization processing algorithm, thereby improving the recognition rate of image overflow, saving human resources, and reducing the cost of software development.
[0061] Step 203: Acquire the current frame image and the previous frame image.
[0062] In an embodiment of the present invention, before step 203, it also includes: the electronic device records the window information of at least one pre-marked window, the window information includes a window identification number (identity, ID) and / or a window name, wherein the window information of each window is the identification information of the window; traverses at least one window information to obtain the window information of the window where the current frame image is located. For example, if a staff member obtains 20 windows and marks 10 of the 20 windows, the 10 windows are determined to determine whether there is an image overflow. The electronic device records the window information of the 10 pre-marked windows; selects any one window information from the 10 window information, determines the window corresponding to the window information, and determines the image in the window as the current frame image; and obtains the previous frame image of the current frame image from multiple images.
[0063] Step 204 : performing a difference operation on the current frame image and the previous frame image according to a numerical difference operation algorithm to generate a second image.
[0064] In an embodiment of the present invention, a current frame image includes multiple pixels, a previous frame image also includes multiple pixels, and the current frame image and the previous frame image are the same size. The electronic device aligns the edges of the current frame image with the edges of the previous frame image so that pixels in the current frame image correspond to pixels in the previous frame image; calculates the difference between the numerical values of the pixels in the current frame image and the numerical values of the pixels in the previous frame image according to a numerical difference calculation algorithm; and generates a second image based on the difference between the numerical values of the pixels in the current frame image and the numerical values of the pixels in the previous frame image.
[0065] Step 205: Process the second image according to a binarization processing algorithm to generate a first image corresponding to the current frame image.
[0066] In the embodiment of the present invention, Figure 4 A flowchart of generating a first image is provided in an embodiment of the present invention, such as Figure 4 As shown, step 205 may specifically include:
[0067] Step 2051: Obtain the pixel value of each pixel of the second image.
[0068] In the embodiment of the present invention, for example, the pixel value of each pixel includes pixel values of three channels: red (red, R), green (green, G), and blue (blue, B).
[0069] Step 2052: Generate a first image corresponding to the current frame image according to the determination criterion formula and the pixel values of multiple pixels in the second image.
[0070] In the embodiment of the present invention, the judgment criterion formula Calculate the pixel values of multiple pixels and generate a binary value corresponding to each pixel. Wherein, Color is the binary value, t is the threshold segmentation value, R is the red pixel value, G is the green pixel value, and B is the blue pixel value. In the above judgment criterion formula, it is judged whether the three pixel values corresponding to any pixel are all greater than the threshold segmentation value. If it is judged that the three pixel values corresponding to the pixel are all greater than the threshold segmentation value, the binary value corresponding to the pixel is 1; if it is judged that any one of the three pixel values corresponding to the pixel is less than or equal to the threshold segmentation value, the binary value corresponding to the pixel is 0.
[0071] A binary image corresponding to the current frame image is generated according to the binary value corresponding to each pixel, and the binary image is used as the first image.
[0072] Step 206: Align the edge of the total area with the edge of the first image so that pixels in the total area correspond to pixels in the first image. Each mask area is located in the total area, and the total area includes at least one mask area and blank areas outside all mask areas.
[0073] In the embodiment of the present invention, the total area includes a plurality of pixels, and the size of the total area is the same as the size of the current frame image. Figure 2 As shown, the total area includes mask area 1, mask area 2, and a blank area. Because the first image and the total area are equal in size, the electronic device can align the edges of the total area with the edges of the first image. Once the edges of the total area and the edges of the first image are aligned, the pixels within the total area can be aligned with the pixels of the first image.
[0074] Step 207: Determine the pixel in the first image that corresponds to the pixel in the blank area as the first pixel.
[0075] In the embodiment of the present invention, the blank area includes a plurality of pixels. Figure 2 As shown, the electronic device determines the pixel in the first image corresponding to the pixel in the blank area as the first pixel. The first pixel is an overflow pixel in the first image and cannot be displayed in the logical display interface of the display screen.
[0076] Step 208: Determine the pixel in the first image corresponding to the pixel in each mask area as the second pixel corresponding to the mask area.
[0077] In the embodiment of the present invention, each mask area includes a plurality of pixels. Figure 2 As shown, the electronic device determines the pixel corresponding to the pixel in mask area 1 as the second pixel corresponding to mask area 1. The second pixel corresponding to mask area 1 is the pixel at the edge position in the logical display interface of the display screen, and there is a risk that it cannot be displayed in the logical display interface of the display screen; the pixel corresponding to the pixel in mask area 2 is determined as the second pixel corresponding to mask area 2, which can be displayed in the logical display interface of the display screen.
[0078] Step 209: Count a first number of first pixels and a second number of at least one second pixel.
[0079] In an embodiment of the present invention, the electronic device counts a first number of first pixels and counts a second number of second pixels corresponding to each mask area. Figure 2 As shown, the electronic device counts a first number of first pixels corresponding to the blank area; counts a second number of second pixels corresponding to mask area 1; and counts a second number of second pixels corresponding to mask area 2.
[0080] Step 210: Generate statistical information corresponding to the current frame image according to the first quantity, the at least one second quantity, the mask area corresponding to the second quantity of at least one second pixel, and the acquired identification information of the current frame image.
[0081] In the embodiment of the present invention, the identification information is window information, which includes the window identification number and / or the window name, and the statistical information includes the identification information of the current frame image, the first number, at least one second number, and the mask area corresponding to the second number of at least one second pixel. For example, Figure 2 As shown, the name of the window corresponding to the current frame image is window 1, and window 1 is identification information.
[0082] Step 211 , determining whether the first number is greater than a set pixel threshold; if so, executing step 212 ; if not, executing step 203 .
[0083] In an embodiment of the present invention, the electronic device determines whether the first number is greater than the set pixel threshold; if it is determined that the first number is greater than the set pixel threshold, step 212 is executed; if it is determined that the first number is less than or equal to the set pixel threshold, step 203 is executed to determine whether there is an image overflow in the next current frame image.
[0084] Step 212: Display statistical information corresponding to the current frame image.
[0085] In the embodiment of the present invention, the display screen can also be used to display statistical information corresponding to the current frame image. The staff adjusts the current frame image according to the statistical information so that the pixels of the current frame image no longer overflow.
[0086] In one possible implementation, the method further includes: the electronic device displays the current frame image. In an embodiment of the present invention, the electronic device includes a display screen, and the display screen is used to display the current frame image. For example, the step of the electronic device displaying the current frame image can be performed after step 203.
[0087] In the technical solution of the method for determining image overflow provided by an embodiment of the present invention, a current frame image and a previous frame image are obtained; a first image corresponding to the current frame image is generated based on the current frame image and the previous frame image; and at least one first pixel and at least one second pixel in the first image are determined based on the first image and at least one set mask area, the first pixel does not correspond to any pixel in all mask areas, and the second pixel corresponds to a pixel in any mask area, thereby improving the efficiency of determining image overflow.
[0088] Figure 5 A schematic diagram of a device for determining image overflow provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the device includes: a first acquisition module 11, a first generation module 12 and a first determination module 13.
[0089] The first acquisition module 11 is connected to the first generation module 12 , and the first generation module 12 is connected to the first determination module 13 .
[0090] The first acquisition module 11 is used to acquire the current frame image and the previous frame image; the first generation module 12 is used to generate a first image corresponding to the current frame image based on the current frame image and the previous frame image; the first determination module 13 is used to determine at least one first pixel and at least one second pixel in the first image based on the first image and at least one set mask area, the first pixel does not correspond to any pixel in all mask areas, and the second pixel corresponds to a pixel in any mask area.
[0091] The device further includes a statistical module 14 and a second generating module 15. The statistical module 14 is connected to the first determining module 13 and the second generating module 15.
[0092] The statistical module 14 is used to count the first number of first pixels and the second number of at least one second pixel; the second generation module 15 is used to generate statistical information corresponding to the current frame image based on the first number, the at least one second number, the mask area corresponding to the second number of at least one second pixel and the identification information of the acquired current frame image.
[0093] In the embodiment of the present invention, the identification information is window information.
[0094] In the embodiment of the present invention, the first generation module 12 includes: a first generation submodule 121 and a second generation submodule 122. The first generation submodule 121 and the second generation submodule 122 are connected.
[0095] The first generation submodule 121 is used to perform a difference operation on the current frame image and the previous frame image according to a numerical difference operation algorithm to generate a second image; the second generation submodule 122 is used to process the second image according to a binarization processing algorithm to generate a first image corresponding to the current frame image.
[0096] In the embodiment of the present invention, the device further includes: a second acquisition module 16 and a registration module 17. The second acquisition module 16 is connected to the registration module 17, and the registration module 17 is connected to the first acquisition module 11.
[0097] The second acquisition module 16 is used to obtain the refresh drawing overall shield entry; the registration module 17 is used to register the set detection processing judgment function into the refresh drawing overall shield entry, and the detection processing judgment function includes a numerical difference operation algorithm and a binarization processing algorithm.
[0098] In the embodiment of the present invention, the first determination module 13 includes: a corresponding submodule 131, a first determination submodule 132, and a second determination submodule 133. The corresponding submodule 131 is connected to the first determination submodule 132, and the first determination submodule 132 is connected to the second determination submodule 133.
[0099] Each mask region is located within the total region, which includes at least one mask region and a blank region outside all mask regions. The correspondence submodule 131 is configured to align the edges of the total region with the edges of the first image, so that pixels within the total region correspond to pixels in the first image. The first determination submodule 132 is configured to determine pixels in the first image that correspond to pixels in the blank region as first pixels. The second determination submodule 133 is configured to determine pixels in the first image that correspond to pixels within each mask region as second pixels corresponding to the mask region.
[0100] In the embodiment of the present invention, the device further includes: a judgment module 18 and a display module 19. The judgment module 18 is connected to the second generation module 15 and the display module 19.
[0101] The judging module 18 is used to judge whether the first number is greater than the set pixel threshold; the display module 19 is used to display the statistical information corresponding to the current frame image if the judging module 18 judges that the first number is greater than the set pixel threshold.
[0102] In the technical solution of the device for determining image overflow provided by an embodiment of the present invention, a current frame image and a previous frame image are obtained; a first image corresponding to the current frame image is generated based on the current frame image and the previous frame image; and at least one first pixel and at least one second pixel in the first image are determined based on the first image and at least one set mask area, the first pixel does not correspond to any pixel in all mask areas, and the second pixel corresponds to a pixel in any mask area, thereby improving the efficiency of determining image overflow.
[0103] An embodiment of the present invention provides a storage medium, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the steps of the embodiment of the above-mentioned method for determining image overflow. For a specific description, please refer to the embodiment of the above-mentioned method for determining image overflow.
[0104] An embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions. When the program instructions are loaded and executed by the processor, the steps of the embodiment of the above-mentioned method for determining image overflow are implemented. For a specific description, please refer to the embodiment of the above-mentioned method for determining image overflow.
[0105] Figure 6 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 6 As shown, the electronic device 30 of this embodiment includes: a processor 31, a memory 32, and a computer program 33 stored in the memory 32 and executable on the processor 31. When executed by the processor 31, the computer program 33 implements the method for determining image overflow in the embodiment. To avoid repetition, a detailed description is not given here. Alternatively, when executed by the processor 31, the computer program implements the functions of each model / unit in the apparatus for determining image overflow in the embodiment. To avoid repetition, a detailed description is not given here.
[0106] The electronic device 30 includes, but is not limited to, a processor 31 and a memory 32. Those skilled in the art will understand that Figure 6 It is only an example of the electronic device 30 and does not constitute a limitation of the electronic device 30. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 30 may also include input and output devices, network access devices, buses, etc.
[0107] The processor 31 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0108] The memory 32 can be an internal storage unit of the electronic device 30, such as a hard drive or memory of the electronic device 30. The memory 32 can also be an external storage device of the electronic device 30, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped on the electronic device 30. Furthermore, the memory 32 can include both an internal storage unit of the electronic device 30 and an external storage device. The memory 32 is used to store computer programs and other programs and data required by the electronic device 30. The memory 32 can also be used to temporarily store data that has been output or is about to be output.
[0109] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0110] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, which may be electrical, mechanical or other forms.
[0111] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0112] In addition, the functional units in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional units.
[0113] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform some steps of the method described in various embodiments of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.
[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for determining image overflow, characterized in that: include: Get the current frame image and the previous frame image; generating a first image corresponding to the current frame image according to the current frame image and the previous frame image; Determining, based on the first image and at least one set mask area, at least one first pixel and at least one second pixel in the first image, wherein the first pixel does not correspond to any pixel in any of the mask areas, and the second pixel corresponds to a pixel in any of the mask areas, the first pixel being a pixel in the current frame image that overflows a logical display interface of a display screen and is not displayed in the logical display interface, and the second pixel being a pixel in the current frame image that can be displayed in the logical display interface of the display screen; The generating a first image corresponding to the current frame image according to the current frame image and the previous frame image includes: performing a difference operation on the current frame image and the previous frame image according to a numerical difference operation algorithm to generate a second image; Processing the second image according to a binarization processing algorithm to generate the first image corresponding to the current frame image; After determining at least one first pixel and at least one second pixel in the first image according to the first image and the set at least one mask area, the method further includes: counting a first number of the first pixels and a second number of at least one of the second pixels; generating statistical information corresponding to the current frame image according to the first number, at least one second number, a mask area corresponding to the second number of at least one second pixel, and the acquired identification information of the current frame image; After generating the statistical information corresponding to the current frame image, the method further includes: Determining whether the first number is greater than a set pixel threshold; If it is determined that the first number is greater than the set pixel threshold, statistical information corresponding to the current frame image is displayed.
2. The method according to claim 1, characterized in that The identification information is window information.
3. The method according to claim 1, characterized in that Before performing a difference operation on the current frame image and the previous frame image according to a numerical difference operation algorithm to generate a second image, the method further includes: Get the refresh drawing overall shield entry; The set detection processing judgment function is registered in the refresh drawing overall mask entry, and the detection processing judgment function includes the numerical difference operation algorithm and the binarization processing algorithm.
4. The method according to claim 1, wherein Each of the mask areas is located in a total area, and the total area includes at least one mask area and a blank area located outside all of the mask areas; The determining, based on the first image and at least one set mask area, at least one first pixel and at least one second pixel in the first image includes: Aligning edges of the total area with edges of the first image so that pixels within the total area correspond to pixels of the first image; determining a pixel in the first image corresponding to a pixel in the blank area as the first pixel; A pixel in the first image corresponding to a pixel in each mask area is determined as the second pixel corresponding to the mask area.
5. A device for determining image overflow, characterized in that: include: A first acquisition module is used to acquire a current frame image and a previous frame image; A first generating module, configured to generate a first image corresponding to the current frame image according to the current frame image and the previous frame image; a first determining module, configured to determine, based on the first image and at least one set mask area, at least one first pixel and at least one second pixel in the first image, wherein the first pixel does not correspond to any pixel in any of the mask areas, and the second pixel corresponds to a pixel in any of the mask areas; the first pixel is a pixel in the current frame image that overflows a logical display interface of the display screen and is not displayed in the logical display interface; and the second pixel is a pixel in the current frame image that can be displayed in the logical display interface of the display screen; The generating a first image corresponding to the current frame image according to the current frame image and the previous frame image includes: performing a difference operation on the current frame image and the previous frame image according to a numerical difference operation algorithm to generate a second image; Processing the second image according to a binarization processing algorithm to generate the first image corresponding to the current frame image; After determining at least one first pixel and at least one second pixel in the first image according to the first image and the set at least one mask area, the method further includes: counting a first number of the first pixels and a second number of at least one of the second pixels; generating statistical information corresponding to the current frame image according to the first number, at least one second number, a mask area corresponding to the second number of at least one second pixel, and the acquired identification information of the current frame image; After generating the statistical information corresponding to the current frame image, the method further includes: Determining whether the first number is greater than a set pixel threshold; If it is determined that the first number is greater than the set pixel threshold, statistical information corresponding to the current frame image is displayed.
6. A storage medium, characterized in that The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the method for determining image overflow according to any one of claims 1 to 4.
7. An electronic device, characterized in that: include: Display screen; one or more processors; Memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the device, enable the device to perform the method for determining image overflow according to any one of claims 1 to 4.
Citation Information
Patent Citations
Projection image correction method and laser projection system
CN113259637A
Method for converting pixel number, program for implementing the program, and pixel number converter
JP2011101270A