Blackboard display processing method, device, equipment and storage medium
By superimposing sub-images of the blackboard image and the current image frame in the occlusion area, the problem of the speaker blocking the occlusion in high-resolution video is solved, real-time processing and clear display are achieved.
Patent Information
- Application Number
- CN202310612030.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-29
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2043-05-29
AI Technical Summary
In high-resolution videos, the problem of the main speaker blocking the book's content can't be processed in real time, and playback stuttering or frame dropping occurs.
By obtaining the position information of the occlusion area of the previous image frame and the current image frame, the third area is determined, and the sub-images of the blackboard image and the current image frame are superimposed in this area, the corresponding positions of the original image are replaced, the image superposition overhead is reduced, and real-time processing is realized.
Real-time processing of ultra-high-definition input images is realized to avoid playback lag or frame drops, and ensure the clear display of the contents of the blackboard.
Smart Images

Figure CN116703706B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of artificial intelligence visual recognition, and more specifically, to a blackboard display processing method, device, equipment and storage medium. Background Art
[0002] Blackboard writing, recorded on whiteboards or blackboards, is an important medium for conveying information during meetings, lectures, and teaching sessions. Participants, audiences, and students can better understand the speaker's message by viewing this recording. Therefore, during remote meetings or teaching sessions, video recordings of the blackboard writing are often used to allow participants to view the speaker's writing. However, when recording blackboard writing, the speaker often obscures the writing while explaining, preventing participants from viewing the entire content.
[0003] To address the issue of blackboard writing being obscured in videos, existing technologies typically synthesize multiple video frames to create an unobstructed blackboard image. This image is then superimposed with the current image frame showing the speaker, resulting in a target video frame that clearly shows both the speaker and the blackboard writing. However, with increasingly higher video resolutions, the superposition process is taking longer and longer. For ultra-high-definition input images, real-time processing is impossible, resulting in playback freezes or frame drops. Summary of the Invention
[0004] To overcome at least one of the drawbacks of the prior art, the present invention provides a blackboard display processing method, a video switching method, a device, a device, and a storage medium. To solve the above technical problems, the present invention adopts the following technical solutions.
[0005] In a first aspect, the present invention provides a method for processing blackboard display, comprising the steps of:
[0006] Obtaining first region position information of an obstruction region in a previous image frame and second region position information of an obstruction region in a current image frame, wherein both the previous image frame and the current image frame are images captured by a camera;
[0007] Determine a third area according to the first area location information and the second area location information, wherein the range of the third area includes the first area and the second area;
[0008] Acquire a blackboard writing image and a current image frame, wherein the blackboard writing image is an unobstructed image of the blackboard writing content;
[0009] Extracting a first sub-image at a position of the third area in the blackboard image, and extracting a second sub-image at a position of the third area in the current image frame;
[0010] superimposing the first sub-image and the second sub-image to obtain a third sub-image;
[0011] Get the previous frame of effect image;
[0012] The sub-image at the position of the third area in the previous frame effect image is replaced by the third sub-image to obtain a replaced image, the replaced image is output, and the replaced image is used as the current frame effect image.
[0013] In one embodiment, the steps are further included:
[0014] When continuously outputting N frames of the replaced image as the effect image, obtain the latest updated blackboard image, superimpose the latest updated blackboard image and the N+1th frame image frame to obtain the initial effect image, output the initial effect image, and use the initial effect image as the N+1th frame effect image, wherein N is a preset number threshold, and the N+1th frame image frame is the image captured by the camera.
[0015] In one embodiment, before determining the third area based on the first area location information and the second area location information, the method further includes the following steps:
[0016] Calculating the overlap between the first area and the second area based on the first area position information and the second area position information;
[0017] When the degree of overlap is within a preset threshold range, determining the third area according to the first area position information and the second area position information is performed.
[0018] In one embodiment, the steps are further included:
[0019] When the degree of overlap is not within a preset threshold range, the blackboard image and the current image frame are superimposed to obtain an initial effect image, which is output and used as the current frame effect image.
[0020] In one embodiment, the position information is a mask map;
[0021] The process of determining the third area based on the first area location information and the second area location information comprises the steps of:
[0022] Perform a logical OR operation on the first region position information and the second region position information to obtain a third region.
[0023] In one embodiment, the position information is rectangular coordinate information;
[0024] The process of determining the third area based on the first area location information and the second area location information comprises the steps of:
[0025] The minimum circumscribed rectangle of the first rectangular area corresponding to the first area position information and the second rectangular area corresponding to the second area position information is taken as the third area.
[0026] In one embodiment, the blackboard writing image is consistent with the blackboard writing image used in generating the previous frame effect image.
[0027] In a second aspect, the present invention provides a blackboard display processing device, comprising:
[0028] an acquisition module, configured to acquire first region position information of an obstruction region in a previous image frame and second region position information of an obstruction region in a current image frame, acquire a blackboard image and a current image frame, and acquire a previous frame effect image, wherein both the previous image frame and the current image frame are images captured by a camera, and the blackboard image is an unobstructed image of the blackboard content;
[0029] a determination module, configured to determine a third area based on the first area location information and the second area location information, wherein the range of the third area includes the first area and the second area;
[0030] An extraction module, configured to extract a first sub-image at a position in the third area of the blackboard image, and extract a second sub-image at a position in the third area of the current image frame;
[0031] A superposition module, configured to superimpose the first sub-image and the second sub-image to obtain a third sub-image;
[0032] The replacement module is used to replace the sub-image at the position of the third area in the previous frame effect image with the third sub-image to obtain the replaced image, output the replaced image, and use the replaced image as the current frame effect image.
[0033] In a third aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-mentioned methods when executing the program.
[0034] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program implements the method of any of the above-mentioned embodiments when executed by a processor.
[0035] In the present invention, by obtaining the position information of the area of local change, image superposition is performed only on the local area where the change occurs, and the corresponding position of the original image is replaced by the superimposed image. Since image superposition is only performed on the local area, the overhead during superposition is reduced, and the superimposed effect image can be quickly generated. Even for ultra-high-definition input images, real-time processing can be achieved without playback freezes or frame drops. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flowchart of embodiment 1 of the present invention.
[0037] Figure 2 It is the previous image frame of the first embodiment of the present invention.
[0038] Figure 3 is the current image frame in the first embodiment of the present invention.
[0039] Figure 4 This is the blackboard writing image of the first embodiment of the present invention.
[0040] Figure 5 This is the previous frame of effect image in the first embodiment of the present invention.
[0041] Figure 6 It is the mask image of the previous image frame in the first embodiment of the present invention.
[0042] Figure 7 It is the mask image of the current image frame in the first embodiment of the present invention.
[0043] Figure 8 This is the third area of an implementation manner of Example 1 of the present invention.
[0044] Figure 9 It is the rectangular area of the previous image frame in the first embodiment of the present invention.
[0045] Figure 10 is the rectangular area of the current image frame in the first embodiment of the present invention.
[0046] Figure 11 This is the third area of another implementation of the first embodiment of the present invention.
[0047] Figure 12 This is the first sub-region of the blackboard image in an implementation manner of the first embodiment of the present invention.
[0048] Figure 13 It is the second sub-region of the current image frame in an implementation manner of the first embodiment of the present invention.
[0049] Figure 14 This is the first sub-region of the blackboard image in another implementation manner of the first embodiment of the present invention.
[0050] Figure 15 It is the second sub-region of the current image frame in another implementation manner of the first embodiment of the present invention.
[0051] Figure 16 This is the third sub-region of an implementation manner of the first embodiment of the present invention.
[0052] Figure 17This is the third sub-region of another implementation manner of the first embodiment of the present invention.
[0053] Figure 18 This is the current frame effect image of the first embodiment of the present invention.
[0054] Figure 19 It is a schematic diagram of the overall structure of embodiment 2 of the present invention. DETAILED DESCRIPTION
[0055] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0056] It should be noted that the terms "first, second, ..." used in the embodiments of the present invention are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that the terms "first, second, ..." may interchangeably represent a specific order or precedence, where permitted. It should be understood that the objects distinguished by "first, second, ..." may be interchangeable, where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.
[0057] Example 1
[0058] See Figure 1 , Figure 1 This is a flow chart of a method for processing a blackboard display provided in the first embodiment of the present invention, the method comprising: step S110, step S120, step S130, step S140, step S150, step S160 and step S170. It should be noted that step S110 to step S170 are merely reference numerals for the purpose of clearly explaining the embodiment and the appendix. Figure 1 The corresponding relationship does not limit the order of the steps in the method in this embodiment.
[0059] Step S110, obtaining first region position information of an obstruction region in a previous image frame and second region position information of an obstruction region in a current image frame, wherein both the previous image frame and the current image frame are images captured by a camera;
[0060] Step S120, determining a third area according to the first area location information and the second area location information, wherein the range of the third area includes the first area and the second area;
[0061] Step S130, acquiring a blackboard writing image and a current image frame, wherein the blackboard writing image is an unobstructed image of the blackboard writing content;
[0062] Step S140, extracting the first sub-image at the position of the third area in the blackboard image, and extracting the second sub-image at the position of the third area in the current image frame;
[0063] Step S150, superimposing the first sub-image and the second sub-image to obtain a third sub-image;
[0064] Step S160, obtaining the previous frame of effect image;
[0065] Step S170: Replace the sub-image at the position of the third area in the previous frame effect image with the third sub-image to obtain a replaced image, output the replaced image, and use the replaced image as the current frame effect image.
[0066] like Figure 2 As shown, Figure 2 is the last image frame captured by the camera, Figure 3 is the current image frame captured by the camera. Figure 4 It is an unobstructed blackboard image obtained by extracting the handwriting on the blackboard through multi-frame video synthesis. Figure 5 The previous frame is created by superimposing the blackboard image with the previous image frame, creating an effect image that includes both the teacher and the blackboard image. It is understood that this method can be used in various scenarios where blackboard writing can be displayed, including but not limited to blackboards, whiteboards, multimedia display boards, smart blackboards, etc. However, for ease of description, this embodiment uses a classroom teaching scenario as an example, where the blackboard display board is a blackboard, and the content on the blackboard is the teacher's writing.
[0067] It should be noted here that the image frames captured by the camera can be Figure 3 As shown, its size is almost the same as that of the blackboard writing image, or it can be much larger than the blackboard writing image, that is, the blackboard writing area is only a part of the image frame. At this time, the effect image is an image superimposed by partial areas, that is, the blackboard writing image is placed on the blackboard writing area position in the image frame and superimposed to generate an image.
[0068] It should be noted here that image overlay fusion mainly involves the transparency overlay of the complete blackboard content image and the captured image frame, including the following two types:
[0069] 1. It can be alpha linear superposition, O_t = alpha*I_t + (1-alpha)*K_t, where O_t is the effect image, I_t is the captured image frame data, and K_t is the complete blackboard content image;
[0070] 2. It can replace the handwriting content: non-blackboard content area: O_t = alpha * I_t, blackboard content area: O_t = K_t. By reducing the transparency of the non-blackboard content area, the blackboard content information is highlighted;
[0071] In step S110, the first region position information of the occluder region in the previous image frame and the second region position information of the occluder region in the current image frame are obtained. In a classroom setting, the occluder is typically the teacher's body, but it could also be a teaching aid or an object in the teacher's hand. Furthermore, the camera captures a fixed-focus image and does not rotate during shooting, so the content of the image captured by the camera remains essentially unchanged. The positions of the first and second regions only change when the teacher moves.
[0072] After obtaining the first region position information and the second region position information, a third region can be determined based on the first region position information and the second region position information. The third region includes the first region and the second region. The third region is actually the region where the image has changed between the previous video frame and the current video frame.
[0073] In one embodiment, Figure 6 and 7 As shown, the region location information is a mask map. Figure 6 is the first position information of the occlusion area in the previous image frame, Figure 7 is the second position information of the occlusion area in the current image frame.
[0074] The process of step S120 includes: step S121.
[0075] Step S121 , performing a logical OR operation on the first region location information and the second region location information to obtain a third region.
[0076] like Figure 8 As shown, Figure 8 The white portion in FIG is the third region obtained by performing a logical OR operation on the first region position information and the second region position information.
[0077] This implementation can more accurately identify the area that needs to be replaced, but the computing power will increase.
[0078] In one embodiment, Figure 9 and 10 As shown, the area location information is rectangular coordinate information. Figure 9 The dotted box in is the first rectangular area corresponding to the rectangular coordinate information of the occlusion area in the previous image frame. Figure 10 The dotted box in is the second rectangular area corresponding to the rectangular coordinate information of the occlusion area in the current image frame.
[0079] The process of step S120 includes: step S122.
[0080] Step S122 : taking the minimum circumscribed rectangle of the first rectangular area corresponding to the first area position information and the second rectangular area corresponding to the second area position information as the third area.
[0081] like Figure 11 As shown, the dotted box in the figure is the minimum circumscribed rectangle of the first rectangular area and the second rectangular area, that is, the third area.
[0082] Step S130: Acquire Figure 4 The blackboard image shown and Figure 3 The current image frame is shown.
[0083] It should be noted here that, for the blackboard image obtained in step S130, the extraction and update of the complete blackboard image are divided into two cases:
[0084] 1. Directly input an image that records the complete blackboard content. For example, the handwriting on the electronic screen can be directly obtained by directly acquiring the current electronic screen output to obtain the complete blackboard content. Each time, the previous blackboard content image is replaced with the new blackboard content.
[0085] 2. Update the generated complete blackboard content image based on the previous frame image. First, extract the first frame of blackboard content, remove the target occluders through the target detection structure, and supplement them with pixel values with the same color as the blackboard background to obtain the initial complete blackboard content; then, during the next update, obtain the target occluder position through target detection, replace the target occluder area of the current frame's extracted content with the corresponding area content of the previous complete blackboard content, and output the current frame's extracted content as the new complete blackboard content image.
[0086] It should also be noted that, since the blackboard image is updated, the blackboard image used in the previous frame of the effect image or the latest updated blackboard image can be selected when obtaining the blackboard image in step S130. Preferably, the blackboard image used in the previous frame of the effect image is selected, as this will produce a better effect.
[0087] In step S140, the blackboard image and the sub-image at the third region position in the current image frame are extracted respectively. Figure 8 As shown, the first sub-region of the blackboard image is as follows Figure 12 As shown, the second sub-region of the current image frame is as follows Figure 13 As shown; if the third area is as Figure 11 As shown, the first sub-region of the blackboard image is as follows Figure 14 As shown, the second sub-region of the current image frame is as follows Figure 15 shown.
[0088] In step S150 , the two sub-images are superimposed to obtain a third sub-image. Figure 12 and Figure 13 The superimposed third sub-image is as follows Figure 16 As shown, Figure 14 and Figure 15 The superimposed third sub-image is as follows Figure 17 shown.
[0089] Then, the previous frame effect image is obtained, and the third sub-image is used to replace the sub-image at the third region position in the previous frame effect image to obtain the replaced image. Figure 18 As shown, the replaced image is output and used as the current frame effect image.
[0090] It should be noted that the current frame effect image obtained by this method will become the previous frame effect image at the next moment, so the previous frame effect image obtained in step S160 may be Figure 5 Type, that is, the image of the blackboard and the image frame are directly superimposed, or it may be Figure 18 The type is obtained by replacing part of the sub-image.
[0091] In this method, by obtaining the position information of the area with local changes, image superposition is performed only on the local area with changes, and the corresponding position of the original image is replaced with the superimposed image. Since image superposition is only performed on the local area, the overhead of superposition is reduced, and the superimposed effect image can be quickly generated. Even for ultra-high-definition input images, real-time processing can be achieved without playback freezes or frame drops.
[0092] In one embodiment, the method further includes: step S180.
[0093] Step S180, when continuously outputting N frames of the replaced image as the effect image, obtain the latest updated blackboard image, superimpose the latest updated blackboard image and the N+1th frame image frame to obtain an initial effect image, output the initial effect image, and use the initial effect image as the N+1th frame effect image, wherein N is a preset number threshold, and the N+1th frame image frame is the image captured by the camera.
[0094] In the process of replacing part of the sub-image to generate the effect image, errors may occur. These errors may accumulate in the subsequent effect image, causing the superposition effect to gradually deteriorate. Therefore, when many consecutive frames are generated by replacing part of the sub-image to generate the effect image, the effect image must be "reset", that is, a threshold N is set. When the image formed by partial superposition exceeds the connected N frames, the effect image (i.e., the initial effect image) is generated by directly superimposing the blackboard image and the image frame, and the initial effect image is used as the output. In order to ensure that the blackboard content in the initial effect image is the latest, the blackboard image used for superposition should be the latest updated blackboard image.
[0095] It should be noted here that if step S130 chooses to obtain the blackboard image used in the previous frame of the effect image, N is preferably the interval threshold for refreshing the blackboard image content. This ensures that the initial effect image is generated each time using the blackboard image that has just been updated in real time, so that the blackboard display processing speed reaches real-time speed.
[0096] In one embodiment, before step S120, the process further includes: step S210.
[0097] Step S210, calculating the overlap between the first area and the second area based on the first area position information and the second area position information;
[0098] When the degree of overlap is within the preset threshold range, step S120 is executed.
[0099] In one embodiment, the method further includes: step S220.
[0100] Step S220: When the overlap degree is not within a preset threshold range, superimpose the blackboard image and the current image frame to obtain an initial effect image, output the initial effect image, and use the initial effect image as the current frame effect image.
[0101] The calculation of the degree of overlap is added to the above two implementations. The degree of overlap can be used to determine whether there is a significant change in the area between the two frames captured by the camera. If the calculated degree of overlap is within the preset threshold range, it means that there is no significant change in the image, and the method of using local replacement to obtain the effect image is still appropriate. If the calculated degree of overlap is not within the preset threshold range, it means that there is a significant change in the area. In this case, the method of using local replacement to obtain the effect image is not suitable, and the effect image needs to be regenerated by directly superimposing the blackboard image and the image frame.
[0102] Example 2
[0103] Corresponding to the blackboard display processing method of embodiment 1, as Figure 19As shown, the present invention further provides a blackboard display processing device 19 , comprising: an acquisition module 191 , a determination module 192 , an extraction module 193 , an overlay module 194 and a replacement module 195 .
[0104] An acquisition module 191 is configured to acquire first region position information of an obstruction region in a previous image frame and second region position information of an obstruction region in a current image frame, acquire a blackboard image and a current image frame, and acquire a previous frame effect image, wherein both the previous image frame and the current image frame are images captured by a camera, and the blackboard image is an unobstructed image of the blackboard content;
[0105] A determination module 192 is configured to determine a third area based on the first area location information and the second area location information, wherein the third area includes the first area and the second area;
[0106] An extraction module 193 is configured to extract a first sub-image at a position in the third region of the blackboard image and a second sub-image at a position in the third region of the current image frame;
[0107] A superposition module 194 is configured to superimpose the first sub-image and the second sub-image to obtain a third sub-image;
[0108] The replacement module 195 is used to replace the sub-image at the position of the third area in the previous frame effect image with the third sub-image to obtain a replaced image, output the replaced image, and use the replaced image as the current frame effect image.
[0109] In this device, by obtaining the position information of the area with local changes, image superposition is only performed on the local area with changes, and the corresponding position of the original image is replaced with the superimposed image. Since image superposition is only performed on the local area, the overhead of superposition is reduced, and the superimposed effect image can be quickly generated. Even for ultra-high-definition input images, real-time processing is achieved without playback freezes or frame drops.
[0110] In one embodiment, the overlay module is also used to obtain the latest updated blackboard image when continuously outputting N frames of the replaced image as the effect image, superimpose the latest updated blackboard image and the current image frame to obtain an initial effect image, output the initial effect image, and use the initial effect image as the N+1th frame effect image, wherein N is a preset number threshold, and the N+1th frame image frame is the image captured by the camera.
[0111] In one embodiment, a judgment module is also included.
[0112] The judgment module is used to calculate the overlap between the first area and the second area based on the first area position information and the second area position information. When the overlap is within a preset threshold range, the control determination module executes the determination of the third area based on the first area position information and the second area position information.
[0113] In one embodiment, the judgment module is also used to control the superposition module to superimpose the blackboard image and the current image frame when the overlap degree is not within a preset threshold range, to obtain an initial effect image, output the initial effect image, and use the initial effect image as the current frame effect image.
[0114] In one embodiment, the location information is a mask image; the determination module performs the process of determining the third area based on the first area location information and the second area location information, including the steps of:
[0115] Perform a logical OR operation on the first region position information and the second region position information to obtain a third region.
[0116] In one embodiment, the location information is rectangular coordinate information; the determination module performs the process of determining the third area based on the first area location information and the second area location information, including the steps of:
[0117] The minimum circumscribed rectangle of the first rectangular area corresponding to the first area position information and the second rectangular area corresponding to the second area position information is taken as the third area.
[0118] In one embodiment, the blackboard image acquired by the acquisition module is consistent with the blackboard image used in generating the previous frame of effect image.
[0119] Example 3
[0120] An embodiment of the present invention further provides a storage medium on which computer instructions are stored. When the instructions are executed by a processor, the blackboard display processing method of any of the above embodiments is implemented.
[0121] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, random access memory (RAM), read-only memory (ROM), magnetic disk or optical disk, etc. Various media that can store program codes.
[0122] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, RAM, ROM, magnetic disks or optical disks.
[0123] Corresponding to the above-mentioned computer storage medium, in one embodiment, a computer device is also provided, which includes a memory, an encoder, and a computer program stored in the memory and runnable on the encoder, wherein when the encoder executes the program, it implements any one of the blackboard display processing methods in the above-mentioned embodiments.
[0124] The above-mentioned computer equipment obtains the position information of the area of local change, only superimposes images on the local area where the change occurs, and replaces the corresponding position of the original image with the superimposed image. Since only the local area is superimposed, the overhead during superposition is reduced, and the superimposed effect image can be quickly generated. Even for ultra-high-definition input images, real-time processing can be achieved without playback lag or frame drops.
[0125] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0126] Obviously, the above embodiments of the present invention are merely examples for the purpose of clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description. It is not necessary and impossible to enumerate all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the claims of the present invention.
Claims
1. A blackboard display processing method, characterized in that: Including steps: Obtaining first region position information of an obstruction region in a previous image frame and second region position information of an obstruction region in a current image frame, wherein the previous image frame and the current image frame are both images captured by the same camera; Determine a third area according to the first area location information and the second area location information, wherein the range of the third area includes the first area and the second area; Acquire a blackboard writing image and a current image frame, wherein the blackboard writing image is an unobstructed image of the blackboard writing content; Extracting a first sub-image at a position of the third area in the blackboard image, and extracting a second sub-image at a position of the third area in the current image frame; superimposing the first sub-image and the second sub-image to obtain a third sub-image; Get the previous frame of effect image; The sub-image at the position of the third area in the previous frame effect image is replaced with the third sub-image to obtain a replaced image, and the replaced image is output, and the replaced image is used as the current Previous frame effect image; When continuously outputting N frames of the replaced image as the effect image, the latest updated blackboard image is obtained, and the latest updated blackboard image and the N+1th frame image are superimposed to obtain the initial effect image. Outputting the initial effect image, and using the initial effect image as the N+1th frame effect image, wherein N is a preset number threshold, and the N+1th frame image frame is the image captured by the camera; Before determining the third area according to the first area location information and the second area location information, the method further includes the following steps: Calculating the overlap between the first area and the second area based on the first area position information and the second area position information; When the overlap degree is within a preset threshold range, determining the third area according to the first area position information and the second area position information; When the degree of overlap is not within a preset threshold range, the blackboard image and the current image frame are superimposed. An initial effect image is obtained, the initial effect image is output, and the initial effect image is used as a current frame effect image.
2. The blackboard display processing method according to claim 1, characterized in that: The position information is a mask map; The process of determining the third area based on the first area location information and the second area location information comprises the steps of: Perform a logical OR operation on the first region position information and the second region position information to obtain a third region.
3. The blackboard display processing method according to claim 1, characterized in that: The position information is rectangular coordinate information; The process of determining the third area based on the first area location information and the second area location information comprises the steps of: The minimum circumscribed rectangle of the first rectangular area corresponding to the first area position information and the second rectangular area corresponding to the second area position information is taken as the third area.
4. The blackboard display processing method according to claim 1, characterized in that: The blackboard writing image is consistent with the blackboard writing image used in generating the previous frame effect image.
5. A blackboard display processing device, characterized in that: include: An acquisition module is used to acquire the first area position information of the occluder area in the previous image frame and the second area position information of the occluder area in the current image frame, and acquire the blackboard image and the current image frame. Obtaining a previous frame of effect image, wherein the previous image frame and the current image frame are both images captured by a camera, and the blackboard image is an unobstructed image of the blackboard content; a determining module, configured to determine a third area according to the first area location information and the second area location information, wherein the range of the third area includes the first area and the second area; An extraction module, configured to extract a first sub-image at a position in the third area of the blackboard image, and extract a second sub-image at a position in the third area of the current image frame; A superposition module, configured to superimpose the first sub-image and the second sub-image to obtain a third sub-image; a replacement module, configured to replace the sub-image at the position of the third region in the previous frame effect image with the third sub-image to obtain a replaced image, output the replaced image, and use the replaced image as the current frame effect image; The superposition module is further configured to: when continuously outputting N frames of the replaced image as the effect image, Obtain the latest updated blackboard image, superimpose the latest updated blackboard image and the current image frame to obtain an initial effect image, output the initial effect image, and use the initial effect image as the N+1th frame effect image, wherein N is a preset number threshold, and the N+1th frame image frame is the image captured by the camera; The blackboard display processing device further includes: The judgment module is used to calculate the overlap between the first area and the second area based on the first area position information and the second area position information. When the overlap is within a preset threshold range, the control determination module executes the determination of the third area based on the first area position information and the second area position information. When the overlap is not within the preset threshold range, the control superposition module superimposes the blackboard image and the current image frame to obtain an initial effect image, outputs the initial effect image, and uses the initial effect image as the current frame effect image.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Blackboard writing extraction and intelligent identification method and system
CN111008969A
Video frame processing method and device, related equipment and storage medium
CN114120163A