CN114445455A - Blackboard tracking method and system - Google Patents

Blackboard tracking method and system Download PDF

Info

Publication number
CN114445455A
CN114445455A CN202111584660.5A CN202111584660A CN114445455A CN 114445455 A CN114445455 A CN 114445455A CN 202111584660 A CN202111584660 A CN 202111584660A CN 114445455 A CN114445455 A CN 114445455A
Authority
CN
China
Prior art keywords
blackboard
corners
positions
image frame
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111584660.5A
Other languages
Chinese (zh)
Inventor
赵玺
骆新
赵巍
姚威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shineon Technology Co ltd
Original Assignee
Shineon Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shineon Technology Co ltd filed Critical Shineon Technology Co ltd
Priority to CN202111584660.5A priority Critical patent/CN114445455A/en
Publication of CN114445455A publication Critical patent/CN114445455A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the application discloses a blackboard tracking method and a system, wherein the method comprises the following steps: acquiring a blackboard image frame, wherein the blackboard is square; calculating the initial positions of four corners of the blackboard according to the blackboard image frame; calculating first positions of four corners of a blackboard according to a newly acquired blackboard image frame and initial positions of the four corners of the blackboard image frame; and calculating the adjusting range of the positions of the four corners according to the first positions of the four corners of the blackboard and the specific point of each frame so as to determine the real-time positions of the four corners of the blackboard. The blackboard positioning is efficiently and accurately realized, and technical support is provided for remote teaching.

Description

Blackboard tracking method and system
Technical Field
The embodiment of the application relates to the technical field of image recognition, in particular to a blackboard tracking method and system.
Background
When carrying out the course and recording or live, can make things convenient for the mr to carry out the multimedia presentation to the knowledge point of giving lessons with the help of multimedia equipment usually to make the student have more directly perceived, more profound understanding and understanding to the teaching content, thereby promote the teaching effect.
In the process of remote teaching, the situation that the blackboard runs out of a lens or is shielded occurs, so that the teaching efficiency is greatly reduced.
Disclosure of Invention
Therefore, the embodiment of the application provides a blackboard tracking method and system, which can efficiently and accurately realize the positioning of the blackboard and provide technical support for remote teaching.
In order to achieve the above object, the embodiments of the present application provide the following technical solutions:
according to a first aspect of embodiments of the present application, there is provided a blackboard tracking method, including:
acquiring a blackboard image frame, wherein the blackboard is square;
calculating the initial positions of four corners of the blackboard according to the blackboard image frame;
calculating first positions of four corners of a blackboard according to a newly acquired blackboard image frame and initial positions of the four corners of the blackboard image frame;
and calculating the adjusting range of the positions of the four corners according to the first positions of the four corners of the blackboard and the specific point of each frame so as to determine the real-time positions of the four corners of the blackboard.
Optionally, the calculating the initial positions of the four corners of the blackboard according to the blackboard image frame includes:
calculating the RGB background color according to the blackboard image frame;
converting the RGB background color to a background color of a YCrCb color space, and converting the RGB image to a YCrCb image;
performing difference value calculation according to the background color of the YCrCb color space and the YCrCb image to obtain an image to be processed;
performing transverse detection and longitudinal detection on the image to be processed, and detecting the positions of four frames of the blackboard;
and performing linear intersection calculation based on the positions of the four frames to obtain the initial positions of the four corners of the blackboard.
Optionally, the performing horizontal detection and vertical detection on the image to be processed to detect positions of four frames of a blackboard includes:
setting a plurality of sampling points in the image to be processed, so that each sampling point is sampled in the upward, downward, left or right direction;
if the difference between the average value of three channels of the YCrCb color space of the sampling point and the background color exceeds a set threshold, judging that the frame of the blackboard is detected, recording the coordinates of the point and stopping the detection in the direction;
and calculating the positions of the four frames of the blackboard based on the point coordinates of the frames of the blackboard in the up, down, left and right directions detected by the sampling points.
Optionally, the calculating the first positions of the four corners of the blackboard according to the newly acquired blackboard image frame and the initial positions of the four corners of the blackboard image frame includes:
first positions of four corners of a blackboard are detected within a pixel range set in up, down, left and right directions of initial positions of the four corners of the blackboard in the blackboard image frame.
Optionally, calculating an adjustment range of the positions of the four corners according to the first positions of the four corners of the blackboard and the specific point of each frame to determine the real-time positions of the four corners of the blackboard, including:
determining a specific point of each frame of the blackboard according to the first positions of the four corners of the blackboard;
performing moving sampling in the up-down direction, the left-right direction or the right direction of a specific point of each frame of the blackboard by using sampling points;
if the difference between the average value of three channels of the YCrCb color space of the sampling point and the background color exceeds a set threshold, judging that the frame of the blackboard is detected, and recording the moving distance of the sampling point;
if the moving distance is 0, judging that the specific point of the frame belongs to the blackboard frame, and adjusting the range to be 0;
if the moving distance is not 0, calculating the position of a new frame according to the specific point of each frame, and obtaining the second positions of the four corners of the blackboard based on the straight line intersection calculation to be used as the real-time positions of the four corners of the blackboard.
Optionally, after calculating the initial positions of the four corners of the blackboard according to the blackboard image frame, the method further comprises:
judging whether the blackboard is shielded or not according to the newly acquired blackboard image frame and the blackboard image frame:
and if the image is blocked, using the real-time positions of the four corners of the blackboard detected by the previous blackboard image frame as the first positions of the four corners of the blackboard.
Optionally, determining whether the blackboard is blocked according to the newly acquired blackboard image frame and the blackboard image frame includes:
calculating the difference value of the gray scale space according to the newly acquired blackboard image frame and the same position of the blackboard image frame to obtain a gray scale average value;
if the average gray level value exceeds a set threshold value, judging that the blackboard is shielded; if not, the blackboard is judged not to be shielded.
According to a second aspect of embodiments of the present application, there is provided a blackboard tracking system, the system including:
the image acquisition module is used for acquiring a blackboard image frame, and the blackboard is square;
the initial position calculating module is used for calculating the initial positions of the four corners of the blackboard according to the blackboard image frame;
the position estimation module is used for calculating first positions of the four corners of the blackboard according to the newly acquired blackboard image frame and initial positions of the four corners of the blackboard image frame;
and the position determining module is used for calculating the adjusting range of the positions of the four corners according to the first positions of the four corners of the blackboard and the specific point of each frame so as to determine the real-time positions of the four corners of the blackboard.
According to a third aspect of embodiments of the present application, there is provided an electronic apparatus, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the computer program to implement the method of the first aspect.
According to a fourth aspect of embodiments herein, there is provided a computer readable storage medium having stored thereon computer readable instructions executable by a processor to implement the method of the first aspect described above.
In summary, the embodiment of the present application provides a method and a system for tracking a blackboard, in which a square blackboard is obtained by acquiring a blackboard image frame; calculating the initial positions of four corners of the blackboard according to the blackboard image frame; calculating first positions of four corners of a blackboard according to a newly acquired blackboard image frame and initial positions of the four corners of the blackboard image frame; and calculating the adjusting range of the positions of the four corners according to the first positions of the four corners of the blackboard and the specific point of each frame so as to determine the real-time positions of the four corners of the blackboard. The blackboard positioning is efficiently and accurately realized, and technical support is provided for remote teaching.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary, and that other embodiments can be derived from the drawings provided by those of ordinary skill in the art without inventive effort.
The structures, ratios, sizes, and the like shown in the present specification are only used for matching with the contents disclosed in the specification, so that those skilled in the art can understand and read the present invention, and do not limit the conditions for implementing the present invention, so that the present invention has no technical significance, and any structural modifications, changes in the ratio relationship, or adjustments of the sizes, without affecting the functions and purposes of the present invention, should still fall within the scope of the present invention.
Fig. 1 is a schematic flow chart of a blackboard tracking method according to an embodiment of the present application;
FIG. 2 is a flow chart of an embodiment of blackboard tracking provided by an embodiment of the present application;
fig. 3 is a block diagram of a blackboard tracking system provided in an embodiment of the present application;
fig. 4 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 5 is a schematic diagram of a computer-readable storage medium provided in an embodiment of the present application.
Detailed Description
The present invention is described in terms of specific embodiments, and other advantages and benefits of the present invention will become apparent to those skilled in the art from the following disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Multimedia demonstration needs more facilities to cooperate, if can be under most basic teaching environment through fixing a position the blackboard, the multimedia information that will demonstrate directly shows in the blackboard region through technical means, realizes no facility multimedia remote teaching, can save the construction cost that the multimedia taught undoubtedly greatly, realizes more convenient remote multimedia and teaches. In order to achieve the above object, it is first solved the identification and accurate positioning of the blackboard.
According to the embodiment of the application, the blackboard is continuously and accurately positioned by identifying the accurate position of the blackboard and analyzing the input picture.
Fig. 1 shows a flow of a blackboard tracking method provided in an embodiment of the present application, including the following steps:
step 101: acquiring a blackboard image frame, wherein the blackboard is square;
step 102: calculating initial positions of four corners of the blackboard according to the blackboard image frame;
step 103: calculating first positions of four corners of a blackboard according to a newly acquired blackboard image frame and initial positions of the four corners of the blackboard image frame;
step 104: and calculating the adjusting range of the positions of the four corners according to the first positions of the four corners of the blackboard and the specific point of each frame so as to determine the real-time positions of the four corners of the blackboard.
In a possible implementation manner, in step 102, the calculating initial positions of four corners of the blackboard according to the blackboard image frame includes:
calculating the RGB background color according to the blackboard image frame; converting the RGB background color to a background color of a YCrCb color space, and converting the RGB image to a YCrCb image; performing difference value calculation according to the background color of the YCrCb color space and the YCrCb image to obtain an image to be processed; performing transverse detection and longitudinal detection on the image to be processed, and detecting the positions of four frames of the blackboard; and performing linear intersection calculation based on the positions of the four frames to obtain the initial positions of the four corners of the blackboard.
In a possible embodiment, the detecting the positions of four frames of a blackboard by performing the horizontal detection and the vertical detection on the image to be processed includes:
setting a plurality of sampling points in the image to be processed, so that each sampling point is sampled in the upward, downward, left or right direction; if the difference between the average value of three channels of the YCrCb color space of the sampling point and the background color exceeds a set threshold, judging that the frame of the blackboard is detected, recording the coordinates of the point and stopping the detection in the direction; and calculating the positions of the four frames of the blackboard based on the point coordinates of the frames of the blackboard in the up, down, left and right directions detected by the sampling points.
In a possible implementation manner, in step 103, the calculating a first position of the four blackboard corners according to the newly acquired blackboard image frame and the initial positions of the four blackboard corners of the blackboard image frame includes:
first positions of four corners of a blackboard are detected within a pixel range set in up, down, left and right directions of initial positions of the four corners of the blackboard in the blackboard image frame.
In a possible embodiment, in step 104, calculating an adjustment range of the four corners position according to the first position of the four corners of the blackboard and the specific point of each frame to determine the real-time position of the four corners of the blackboard, including:
determining a specific point of each frame of the blackboard according to the first positions of the four corners of the blackboard; performing moving sampling in the up-down direction, the left-right direction or the right direction of a specific point of each frame of the blackboard by using sampling points; if the difference between the average value of three channels of the YCrCb color space of the sampling point and the background color exceeds a set threshold, judging that the frame of the blackboard is detected, and recording the moving distance of the sampling point; if the moving distance is 0, judging that the specific point of the frame belongs to the blackboard frame, and adjusting the range to be 0; if the moving distance is not 0, calculating the position of a new frame according to the specific point of each frame, and obtaining the second positions of the four corners of the blackboard based on the straight line intersection calculation to be used as the real-time positions of the four corners of the blackboard.
In a possible implementation, after step 102, the method further comprises:
judging whether the blackboard is shielded or not according to the newly acquired blackboard image frame and the blackboard image frame: and if the image is blocked, using the real-time positions of the four corners of the blackboard detected by the previous blackboard image frame as the first positions of the four corners of the blackboard.
In a possible implementation manner, the determining whether the blackboard is blocked according to the newly acquired blackboard image frame and the blackboard image frame includes:
calculating the difference value of the gray scale space according to the newly acquired blackboard image frame and the same position of the blackboard image frame to obtain a gray scale average value; if the average gray level value exceeds a set threshold value, judging that the blackboard is shielded; if not, the blackboard is judged not to be shielded.
The following is further explained in conjunction with the embodiment of the blackboard-tracking method of fig. 2.
Firstly, preprocessing blackboard tracking by using a preprocessing module to establish a blackboard identification and accurate positioning processing flow and configuration related variables; the related variables comprise a background color storage variable, an image storage variable, a four-corner coordinate storage variable and the like.
In the second aspect, after reading the image, it is determined whether the system has been initialized, and the system is initialized when it is required that the four corners of the blackboard are not occluded, where the limitation is that no occlusion is possible, and the system needs to be reinitialized if there is an occlusion.
In a third aspect, calculating the initial positions of the four corners of the blackboard according to the blackboard image frame specifically includes:
firstly, calculating RGB background color according to a blackboard image frame; converting the RGB background color to a background color of a YCrCb color space, and converting the RGB image to a YCrCb image; the specific conversion mode can be as follows: Y-0.2990R +0.5870G + 0.1140B; 0.5000R-0.4187G-0.0813B + 128; cb ═ 0.1687R-0.3313G +0.5000B + 128.
Further, difference value calculation is carried out according to the background color and the image of the YCrCb color space to obtain a high-quality and low-confusion image to be processed, and blackboard boundary detection is carried out on the basis; the blackboard boundary detection mode comprises transverse detection and longitudinal detection. And after the image to be processed is transversely detected and longitudinally detected, the positions of four frames of the blackboard can be detected.
The process of performing cross sampling on a blackboard image frame when there is no occlusion, which is provided by the embodiment of the present application, is illustrated below, where the cross sampling is performed by performing horizontal detection on a half height position of a picture and performing longitudinal detection on a half width position of the picture.
Taking transverse detection as an example, 2 sampling points are selected from the interior of the blackboard at a certain pixel distance, and each sampling point is sampled in the up-down direction respectively, so that the positions of the upper frame and the lower frame can be detected. Taking the above frame as an example, taking 5 × 5 pixels around the sampling point as a sampling block, making the sampling block move upward, if the average value of the YCrCb three channels of the sampling block and the background color of the blackboard generate a large difference, for example, the difference exceeds 10, determining that the blackboard frame is detected, recording the coordinates of the point, and stopping the continuous detection in the direction. In the same way, the coordinates of the upper frame corresponding to the other sampling point can be obtained, and the straight line where the upper frame is located can be obtained according to the principle that two points determine one straight line. And obtaining the straight line of the lower frame in the same way. And performing longitudinal detection in the same way, wherein the longitudinal detection movement direction is towards the left and the right. Therefore, the straight lines where the four frames are respectively located can be obtained, namely the positions of the four frames of the blackboard are detected.
And then carrying out linear intersection calculation based on the positions of the four frames to obtain the initial positions of the four corners of the blackboard. The straight line intersection calculation is to calculate the straight line intersection point by using a plane coordinate system. The calculation method has the characteristics of high precision and strong anti-interference capability.
In the fourth aspect, the positions of the four corners of the blackboard are updated in a small range by adopting a zooming detection window mechanism. In order to improve the response speed of the system, when continuously and newly input image frames are processed, the position information of the blackboard angle output by the previous frame is referred.
A new blackboard angular position is detected in a small range (a set pixel range, for example, 25 pixels, around the blackboard angle detected in the previous frame) based on the YCrCb difference image obtained by performing a difference calculation on the background color after converting the new image frame into the YCrCb color space by the method similar to that in the second aspect. It should be noted that, if occlusion is detected, estimation is performed by using distance information of the previous frame, that is, the previous position is temporarily used as the estimated position.
In a fifth aspect, in the embodiment of the present application, the occlusion detection module is used to detect whether there is any other occlusion object between the blackboard and the lens, and the difference of the gray space between the current image region-of-interest image frame and the previous image frame may be calculated, and the average gray value of the current image region-of-interest image frame is evaluated, and if the average gray value exceeds a set threshold, it is determined that occlusion occurs. The occlusion detection module is used for preventing the output result from seriously deviating from the target (namely, the calculated blackboard angular position is output to deviate from the actual blackboard angular position by more than a set pixel range) due to the tracking or detection failure caused by occlusion.
If the occlusion is detected, the blackboard angular position of the previous image frame is directly used as an estimated position, and the real-time position is calculated in the subsequent secondary detection, so that the most accurate and stable blackboard four-corner positioning information is obtained.
The sixth aspect, the above-mentioned secondary detection and adjustment. After the positions of the four corners of the blackboard in the fourth aspect are obtained, several specific points are secondarily detected, the specific points may include a middle point, a quarter point and a three-quarter point of the frame, and whether the positions of the specific points are in the frame of the blackboard or not is judged.
The specific judgment method may be: taking the specific point of the frame as an example, selecting a 5 × 5 pixel block (for example, a pixel block of 2 pixels at the left and right of the point and 5 pixels at the bottom of the point) below the point to try to move upward, and if the average value of the YCrCb channels of the sampling block and the background color of the blackboard generate a large difference, for example, the difference exceeds 10, then it is considered that the blackboard frame is detected, and the moving distance is recorded. If the moving distance is 0, the position of the specific point is considered to be in the blackboard frame; if the moving distance is not 0, the coordinates of the specific point are updated according to the moving distance, and other frames are similar.
And calculating a straight line where the new frame is located according to the newly calculated specific point of the frame, then performing intersection calculation to obtain the positions of the four corners of the blackboard, and replacing the estimated positions of the blackboard corners calculated in the fourth aspect to be used as the real-time positions of the four corners of the blackboard.
Therefore, the blackboard tracking method provided by the embodiment of the application can quickly and conveniently realize accurate positioning of the blackboard position, has good effects of resisting partial shielding and preventing the position jump of the blackboard angle, and finally outputs accurate and smooth information of the blackboard angle position, thereby providing a feasible basis for realizing the facility-free multimedia remote teaching, and realizing live broadcast lessons and recorded broadcast lessons with the help of the technology.
In summary, the embodiment of the present application provides a blackboard tracking method, in which a square blackboard is obtained by obtaining a blackboard image frame; calculating the initial positions of four corners of the blackboard according to the blackboard image frame; calculating first positions of four corners of a blackboard according to a newly acquired blackboard image frame and initial positions of the four corners of the blackboard image frame; and calculating the adjusting range of the positions of the four corners according to the first positions of the four corners of the blackboard and the specific point of each frame so as to determine the real-time positions of the four corners of the blackboard. The blackboard positioning is efficiently and accurately realized, and technical support is provided for remote teaching.
Based on the same technical concept, an embodiment of the present application further provides a blackboard tracking system, as shown in fig. 3, the system includes:
the image acquisition module 301 is configured to acquire an image frame of a blackboard, where the blackboard is square;
an initial position calculating module 302, configured to calculate initial positions of four corners of the blackboard according to the blackboard image frame;
the position estimation module 303 is configured to calculate first positions of four corners of the blackboard according to a newly acquired blackboard image frame and initial positions of the four corners of the blackboard image frame;
and the position determining module 304 is configured to calculate an adjustment range of the positions of the four corners according to the first positions of the four corners of the blackboard and the specific point of each frame, so as to determine real-time positions of the four corners of the blackboard.
The embodiment of the application also provides electronic equipment corresponding to the method provided by the embodiment. Referring to fig. 4, a schematic diagram of an electronic device provided in some embodiments of the present application is shown. The electronic device 20 may include: the system comprises a processor 200, a memory 201, a bus 202 and a communication interface 203, wherein the processor 200, the communication interface 203 and the memory 201 are connected through the bus 202; the memory 201 stores a computer program that can be executed on the processor 200, and the processor 200 executes the computer program to perform the method provided by any of the foregoing embodiments of the present application.
The Memory 201 may include a high-speed Random Access Memory (RAM) and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one physical port 203 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
Bus 202 can be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used for storing a program, and the processor 200 executes the program after receiving an execution instruction, and the method disclosed by any of the foregoing embodiments of the present application may be applied to the processor 200, or implemented by the processor 200.
The processor 200 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 200. The Processor 200 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 201, and the processor 200 reads the information in the memory 201 and completes the steps of the method in combination with the hardware thereof.
The electronic device provided by the embodiment of the application and the method provided by the embodiment of the application have the same inventive concept and have the same beneficial effects as the method adopted, operated or realized by the electronic device.
Referring to fig. 5, the computer-readable storage medium is an optical disc 30, on which a computer program (i.e., a program product) is stored, and when the computer program is executed by a processor, the computer program performs the method of any of the foregoing embodiments.
It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory, or other optical and magnetic storage media, which are not described in detail herein.
The computer-readable storage medium provided by the above-mentioned embodiments of the present application and the method provided by the embodiments of the present application have the same advantages as the method adopted, executed or implemented by the application program stored in the computer-readable storage medium.
It should be noted that:
the algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may be used with the teachings herein. The required structure for constructing such a device will be apparent from the description above. In addition, this application is not directed to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the present application as described herein, and any descriptions of specific languages are provided above to disclose the best modes of the present application.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the application, various features of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the application and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: this application is intended to cover such departures from the present disclosure as come within known or customary practice in the art to which this invention pertains. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the application and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the creation apparatus of a virtual machine according to embodiments of the present application. The present application may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present application may be stored on a computer readable medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The above description is only for the preferred embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A blackboard tracking method, characterized in that it comprises:
acquiring a blackboard image frame, wherein the blackboard is square;
calculating the initial positions of four corners of the blackboard according to the blackboard image frame;
calculating first positions of four corners of a blackboard according to a newly acquired blackboard image frame and initial positions of the four corners of the blackboard image frame;
and calculating the adjusting range of the positions of the four corners according to the first positions of the four corners of the blackboard and the specific point of each frame so as to determine the real-time positions of the four corners of the blackboard.
2. The method of claim 1, wherein calculating the initial positions of the four corners of the blackboard from the blackboard image frame comprises:
calculating the RGB background color according to the blackboard image frame;
converting the RGB background color to a background color of a YCrCb color space, and converting the RGB image to a YCrCb image;
performing difference calculation according to the background color of the YCrCb color space and the YCrCb image to obtain an image to be processed;
performing transverse detection and longitudinal detection on the image to be processed, and detecting the positions of four frames of the blackboard;
and performing linear intersection calculation based on the positions of the four frames to obtain the initial positions of the four corners of the blackboard.
3. The method of claim 2, wherein the detecting the positions of the four borders of the blackboard by performing the horizontal detection and the vertical detection on the image to be processed comprises:
setting a plurality of sampling points in the image to be processed, so that each sampling point is sampled in the upward, downward, left or right direction;
if the difference between the average value of three channels of the YCrCb color space of the sampling point and the background color exceeds a set threshold, judging that the frame of the blackboard is detected, recording the coordinates of the point and stopping the detection in the direction;
and calculating the positions of the four frames of the blackboard based on the point coordinates of the frames of the blackboard in the up, down, left and right directions detected by the sampling points.
4. The method of claim 1, wherein calculating the first positions of the four blackboard corners based on the newly acquired blackboard image frame and the initial positions of the four blackboard corners of the blackboard image frame comprises:
first positions of four corners of a blackboard are detected within a pixel range set in up, down, left and right directions of initial positions of the four corners of the blackboard in the blackboard image frame.
5. The method of claim 1, wherein calculating the adjustment range of the four corners' positions based on the first positions of the four corners of the blackboard and the specific point of each frame to determine the real-time positions of the four corners of the blackboard, comprises:
determining a specific point of each frame of the blackboard according to the first positions of the four corners of the blackboard;
performing moving sampling in the up-down direction, the left-right direction or the right direction of a specific point of each frame of the blackboard by using sampling points;
if the difference between the average value of three channels of the YCrCb color space of the sampling point and the background color exceeds a set threshold, judging that the frame of the blackboard is detected, and recording the moving distance of the sampling point;
if the moving distance is 0, judging that the specific point of the frame belongs to the blackboard frame, and adjusting the range to be 0;
if the moving distance is not 0, calculating the position of a new frame according to the specific point of each frame, and obtaining the second positions of the four corners of the blackboard based on the straight line intersection calculation to be used as the real-time positions of the four corners of the blackboard.
6. The method of claim 1, after calculating the initial positions of the four corners of the blackboard from the blackboard image frame, the method further comprising:
judging whether the blackboard is shielded or not according to the newly acquired blackboard image frame and the blackboard image frame:
and if the image is blocked, using the real-time positions of the four corners of the blackboard detected by the previous blackboard image frame as the first positions of the four corners of the blackboard.
7. The method of claim 6, wherein determining whether the blackboard is occluded based on the newly acquired blackboard image frame and the blackboard image frame comprises:
calculating the difference value of the gray scale space according to the newly acquired blackboard image frame and the same position of the blackboard image frame to obtain a gray scale average value;
if the average gray level value exceeds a set threshold value, judging that the blackboard is shielded; if not, the blackboard is judged not to be shielded.
8. A blackboard tracking system, the system comprising:
the image acquisition module is used for acquiring a blackboard image frame, and the blackboard is square;
the initial position calculating module is used for calculating the initial positions of the four corners of the blackboard according to the blackboard image frame;
the position estimation module is used for calculating first positions of the four corners of the blackboard according to the newly acquired blackboard image frame and initial positions of the four corners of the blackboard image frame;
and the position determining module is used for calculating the adjusting range of the positions of the four corners according to the first positions of the four corners of the blackboard and the specific point of each frame so as to determine the real-time positions of the four corners of the blackboard.
9. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor executes when executing the computer program to implement the method according to any of claims 1-7.
10. A computer-readable storage medium having computer-readable instructions stored thereon, the computer-readable instructions being executable by a processor to implement the method of any one of claims 1-7.
CN202111584660.5A 2021-12-22 2021-12-22 Blackboard tracking method and system Pending CN114445455A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111584660.5A CN114445455A (en) 2021-12-22 2021-12-22 Blackboard tracking method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111584660.5A CN114445455A (en) 2021-12-22 2021-12-22 Blackboard tracking method and system

Publications (1)

Publication Number Publication Date
CN114445455A true CN114445455A (en) 2022-05-06

Family

ID=81364057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111584660.5A Pending CN114445455A (en) 2021-12-22 2021-12-22 Blackboard tracking method and system

Country Status (1)

Country Link
CN (1) CN114445455A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115229804A (en) * 2022-09-21 2022-10-25 荣耀终端有限公司 Method and device for attaching component

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020149613A1 (en) * 2001-03-05 2002-10-17 Philips Electronics North America Corp. Automatic positioning of display depending upon the viewer's location
CN108038825A (en) * 2017-12-12 2018-05-15 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN111367485A (en) * 2020-03-16 2020-07-03 安博思华智能科技有限责任公司 Method, device, medium and electronic equipment for controlling combined multimedia blackboard
CN212324227U (en) * 2020-07-31 2021-01-08 四川广炜科技有限公司 Blackboard writing positioning camera
CN112269479A (en) * 2020-10-23 2021-01-26 合肥德纳达信息科技有限公司 Accurate positioning system and method for interactive intelligent blackboard
CN112348815A (en) * 2021-01-07 2021-02-09 新东方教育科技集团有限公司 Image processing method, image processing apparatus, and non-transitory storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020149613A1 (en) * 2001-03-05 2002-10-17 Philips Electronics North America Corp. Automatic positioning of display depending upon the viewer's location
CN108038825A (en) * 2017-12-12 2018-05-15 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN111367485A (en) * 2020-03-16 2020-07-03 安博思华智能科技有限责任公司 Method, device, medium and electronic equipment for controlling combined multimedia blackboard
CN212324227U (en) * 2020-07-31 2021-01-08 四川广炜科技有限公司 Blackboard writing positioning camera
CN112269479A (en) * 2020-10-23 2021-01-26 合肥德纳达信息科技有限公司 Accurate positioning system and method for interactive intelligent blackboard
CN112348815A (en) * 2021-01-07 2021-02-09 新东方教育科技集团有限公司 Image processing method, image processing apparatus, and non-transitory storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
樊凌 等: "基于目标跟踪的视频录播系统的探索与研究", 中国教育技术装备, no. 15, 25 May 2010 (2010-05-25), pages 87 - 89 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115229804A (en) * 2022-09-21 2022-10-25 荣耀终端有限公司 Method and device for attaching component
CN115229804B (en) * 2022-09-21 2023-02-17 荣耀终端有限公司 Method and device for attaching component

Similar Documents

Publication Publication Date Title
CN111340752B (en) Screen detection method and device, electronic equipment and computer readable storage medium
US9202277B2 (en) Device for determining disappearing direction and method thereof, apparatus for video camera calibration and method thereof
CN104517109B (en) A kind of bearing calibration of QR codes image and system
CN113160161B (en) Method and device for detecting defects at edge of target
CN107451976B (en) A kind of image processing method and device
US9197891B1 (en) Systems and methods for periodic structure handling for motion compensation
CN106062824A (en) Edge detection device, edge detection method, and program
CN114387346A (en) Image recognition and prediction model processing method, three-dimensional modeling method and device
CN114445455A (en) Blackboard tracking method and system
CN113781661B (en) Immersion scene-oriented multi-projection space layout evaluation method and system
US12097421B2 (en) Golf ball set-top detection method, system and storage medium
KR20200096426A (en) Moving body detecting device, moving body detecting method, and moving body detecting program
CN112634141B (en) License plate correction method, device, equipment and medium
CN114692034A (en) Image display method, image display device, electronic equipment and computer storage medium
CN113496513A (en) Target object detection method and device
CN114937216B (en) Method, device, equipment and medium for stabilizing sequence images based on ship tracks
CN116740375A (en) Image feature extraction method, system and medium
CN115170679A (en) Calibration method and device for road side camera, electronic equipment and storage medium
RU2019132178A (en) Method and device for determining the direction of rotation of a target object, a computer-readable medium and an electronic device
CN115239789A (en) Method and device for determining liquid volume, storage medium and terminal
CN117036985B (en) Small target detection method and device for video satellite image
CN113379591B (en) Speed determination method, speed determination device, electronic device and storage medium
WO2013144447A1 (en) A method, an apparatus and a computer program for tracking an object in images
US20230386055A1 (en) Image feature matching method, computer device, and storage medium
CN113822884B (en) Mura defect detection method and system based on wavelet transformation

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