Line drawing interruption identification method and device of electronic whiteboard, electronic whiteboard and medium
By binarizing, segmenting, and detecting edges in the electronic whiteboard image, and combining this with a connected component analysis algorithm, line drawing interruption points can be identified and recorded. This solves the problem of low recognition accuracy in existing technologies and improves the accuracy of line drawing interruption recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN KTC COMMERCIAL DISPLAY TECHNOLOGY CO LTD
- Filing Date
- 2023-06-13
- Publication Date
- 2026-06-05
AI Technical Summary
Existing algorithms for identifying line drawing interruptions on electronic whiteboards have low accuracy and cannot accurately identify line drawing interruptions, thus affecting the user experience.
By acquiring the image to be processed and performing binarization, connected component segmentation and merging, edge detection, and using a preset connected component analysis algorithm to identify and mark line breakpoints, the breakpoints are scanned and recorded.
It improves the accuracy of line break recognition in electronic whiteboards, ensuring the integrity and accuracy of connected components.
Smart Images

Figure CN116682127B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic whiteboard technology, and in particular to a method, apparatus, electronic whiteboard and medium for identifying line drawing interruptions on an electronic whiteboard. Background Technology
[0002] With the development of digital technology, interactive whiteboards have been widely used in education, business, and other fields. However, when using interactive whiteboards, line drawing often becomes interrupted, resulting in incomplete or incorrect connected component segmentation, which affects the effectiveness of the interactive whiteboard.
[0003] Several connected component algorithms have been proposed, such as those based on watershed transformation and connected component search. However, these algorithms have some problems in identifying line drawing interruptions. They can only roughly identify individual line drawing interruptions and cannot accurately identify them, resulting in low accuracy. Summary of the Invention
[0004] The purpose of this application is to provide a method, device, electronic whiteboard, and medium for identifying line drawing interruptions in an electronic whiteboard, so as to improve the accuracy of identifying line drawing interruptions in an electronic whiteboard.
[0005] To address the aforementioned technical problems, embodiments of this application provide a method for identifying line interruptions on an electronic whiteboard, comprising:
[0006] The image to be processed is acquired and binarized to obtain a black and white image;
[0007] By performing connected component segmentation and merging on the writing trajectories in the black and white image, a merged connected component image is obtained;
[0008] Edge detection is performed on the merged connected component image to obtain an edge image;
[0009] A preset connected component analysis algorithm is used to identify and label connected components in the edge image to obtain the target connected component;
[0010] For any of the target connected components, the set of boundary points in the target connected component is scanned to obtain line break points. When all the target connected components have been scanned, the identified line break points are recorded and marked to obtain the target result.
[0011] To address the aforementioned technical problems, embodiments of this application provide a line interruption recognition device for an electronic whiteboard, comprising:
[0012] The image acquisition unit is used to acquire the image to be processed and perform binarization processing on the image to be processed to obtain a black and white image;
[0013] The connected component segmentation processing unit is used to perform connected component segmentation and merging processing on the writing trajectory in the black and white image to obtain a connected component merged image;
[0014] An image edge detection unit is used to perform edge detection on the merged connected component image to obtain an edge image;
[0015] The connected component analysis unit is used to identify and label connected components in the edge image using a preset connected component analysis algorithm to obtain the target connected component.
[0016] The target result generation unit is used to scan the set of boundary points in any target connected component to obtain line interruption points. When all target connected components have been scanned, the identified line interruption points are recorded and marked to obtain the target result.
[0017] To solve the above-mentioned technical problems, one technical solution adopted by the present invention is to provide an electronic whiteboard, including one or more processors; and a memory for storing one or more programs, so that the one or more processors implement the line drawing interruption recognition method of the electronic whiteboard described in any one of the above-mentioned methods.
[0018] To solve the above-mentioned technical problems, one technical solution adopted by the present invention is: a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program, when executed by a processor, implements the line drawing interruption recognition method of the electronic whiteboard described in any one of the above-mentioned methods.
[0019] This invention provides a method, apparatus, electronic whiteboard, and medium for identifying line interruptions on an electronic whiteboard. The invention involves acquiring an image to be processed and binarizing it to obtain a black and white image. Connected component segmentation and merging are performed on the writing trajectory in the black and white image to obtain a merged connected component image. Edge detection is then performed on the merged connected component image to obtain an edge image. A preset connected component analysis algorithm is used to identify and mark the connected components in the edge image to obtain target connected components. For any target connected component, the set of boundary points in the target connected component is scanned to obtain line interruption points. When all target connected components have been scanned, the identified line interruption points are recorded and marked to obtain the target result. This invention, by segmenting and merging the connected components of the writing trajectory in the image to be processed, divides the image into different connected components and identifies and marks these components, enabling accurate and comprehensive scanning of line interruption points, thereby improving the accuracy of line interruption identification on an electronic whiteboard. Attached Figure Description
[0020] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart of an implementation method for line drawing interruption recognition of an electronic whiteboard according to an embodiment of this application;
[0022] Figure 2 This is a flowchart of an implementation of a sub-process in the line drawing interruption recognition method for electronic whiteboard provided in the embodiments of this application;
[0023] Figure 3 This is another implementation flowchart of a sub-process in the line drawing interruption recognition method for electronic whiteboard provided in the embodiments of this application;
[0024] Figure 4 This is another implementation flowchart of a sub-process in the line drawing interruption recognition method for electronic whiteboard provided in the embodiments of this application;
[0025] Figure 5 This is another implementation flowchart of a sub-process in the line drawing interruption recognition method for electronic whiteboard provided in the embodiments of this application;
[0026] Figure 6 This is another implementation flowchart of a sub-process in the line drawing interruption recognition method for electronic whiteboard provided in the embodiments of this application;
[0027] Figure 7 This is another implementation flowchart of a sub-process in the line drawing interruption recognition method for electronic whiteboard provided in the embodiments of this application;
[0028] Figure 8 This is a schematic diagram of the line drawing interruption recognition device for the electronic whiteboard provided in the embodiments of this application;
[0029] Figure 9 This is a schematic diagram of the electronic whiteboard provided in the embodiments of this application. Detailed Implementation
[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.
[0031] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0032] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0033] It should be noted that the line drawing interruption recognition method for electronic whiteboards provided in this application embodiment is generally executed by the electronic whiteboard, and correspondingly, the line drawing interruption recognition device for electronic whiteboards is generally configured in the electronic whiteboard.
[0034] Please see Figure 1 , Figure 1 This paper illustrates a specific implementation of a line drawing interruption recognition method for an electronic whiteboard.
[0035] It should be noted that if substantially the same result is obtained, the method of this invention is not based on... Figure 1 Limited to the order of the processes shown, this method includes the following steps:
[0036] S1. Obtain the image to be processed and perform binarization on the image to obtain a black and white image.
[0037] Specifically, the image to be processed generated on the electronic whiteboard is acquired. The image to be processed includes images of the traces written on the electronic whiteboard.
[0038] Please see Figure 2 , Figure 2 A specific implementation of step S1 is shown below:
[0039] S11. Obtain the image to be processed.
[0040] S12. Perform grayscale processing on the image to be processed to obtain a grayscale image.
[0041] Specifically, the input image to be processed is often a color image. In this embodiment, the input image to be processed is converted into a grayscale image. A grayscale image means that each pixel has only one color, i.e., a grayscale value. In a grayscale image, the grayscale value of each pixel represents the brightness information of that point; the larger the value, the brighter the image, and the smaller the value, the darker the image. In a specific embodiment, the image to be processed can first be converted into values of the three RGB channels, and then the maximum or minimum value method can be used: the maximum or minimum value of the three RGB channels is taken, i.e., Gray = max(R,G,B) or Gray = min(R,G,B), thereby calculating the grayscale value of each pixel. The grayscale values of all pixels are then recombined into a grayscale image.
[0042] It's important to note that during implementation, different grayscale methods can affect image brightness and contrast. Therefore, it's necessary to select the appropriate method based on the specific application scenario and adjust the corresponding parameters to achieve the best results. Furthermore, attention must be paid to the precision and value range of the image data type to avoid overflow or precision loss during calculations.
[0043] S13. Compare the gray values of all pixels in the grayscale image with the first threshold to perform threshold segmentation on the grayscale image and obtain a binarized image.
[0044] In this embodiment, a grayscale image is binarized to obtain a binarized image. Specifically, the grayscale values of all pixels in the image are compared with a first threshold; pixels with grayscale values greater than the first threshold are set to white, and pixels with grayscale values less than the first threshold are set to black. Further, this embodiment uses Otsu's Method for binarization, which automatically selects the optimal threshold by minimizing inter-class variance to obtain the best binarization effect. It should be noted that the first threshold is set according to actual conditions and is not limited here.
[0045] S14. The binarized image is denoised using mean filtering to obtain a black and white image.
[0046] Please see Figure 3 , Figure 3 A specific implementation of step S14 is shown below:
[0047] S141. Use a preset filter to traverse the binarized image to obtain the grayscale value of each pixel in the binarized image.
[0048] S142. For each pixel, perform a weighted average of the pixel grayscale values in the preset area corresponding to the pixel to obtain a new grayscale value.
[0049] S143. Replace the gray values of the corresponding pixels in the binarized image based on the new gray values to obtain the replaced image.
[0050] S144. By performing edge processing on the replaced image, a black and white image is obtained.
[0051] Specifically, since the handwriting trajectory on the electronic whiteboard contains noise, the binarized image needs to be denoised. The denoising process uses mean filtering, and its specific steps are as follows: First, determine the filter size: choose an appropriate filter size, typically a 3x3 or 5x5 matrix. Then, traverse each pixel in the image from left to right and top to bottom to obtain the grayscale value of each pixel. Next, for each pixel, perform a weighted average of the grayscale values of its surrounding pixels to obtain the new grayscale value of the current pixel. The weights in the weighted average calculation can be adjusted according to the filter size, usually using equal weights. Then, based on the new grayscale value, replace the corresponding pixel's grayscale value in the binarized image to obtain the replaced image. Finally, to avoid edge blurring in the filtered image, edge processing is required to obtain a black and white image.
[0052] S2. By performing connected component segmentation and merging on the writing trajectory in the black and white image, a merged connected component image is obtained.
[0053] Specifically, in this embodiment of the application, based on the binarized image, a connected component algorithm is used to segment the handwritten trajectory into connected components to obtain different parts in the connected components, and the connected components are also merged.
[0054] Please see Figure 4 , Figure 4 A specific implementation of step S2 is shown below:
[0055] S21. Obtain any pixel in the black and white image as a seed point, and construct an initial region based on the seed point.
[0056] S22. For each seed point, calculate the similarity between the seed point and its neighboring pixels.
[0057] S23. If the similarity is greater than the second threshold, then the adjacent pixels are assigned to the initial region corresponding to the seed point in order to perform connected component segmentation on the writing trajectory in the black and white image.
[0058] S24. Merge adjacent initial regions to obtain merged connected components. If the similarity between two adjacent merged connected components is greater than the third threshold, merge the two adjacent merged connected components to perform connected component merging processing on the writing trajectory in the black and white image.
[0059] S25. When all pixels in the black and white image are included in the merged connected components or when the number of merged connected components reaches a preset value, stop the connected component merging process and obtain the merged connected component image.
[0060] In this embodiment, any pixel in the black and white image is obtained as a seed point, and an initial region is constructed based on the seed point. Then, for each seed point, the similarity between the seed point and its neighboring pixels is calculated. This similarity can be calculated using the pixel value or a similarity algorithm. Next, it is determined whether the similarity is greater than a second threshold. If the similarity is greater than the second threshold, the neighboring pixels are assigned to the initial region corresponding to the seed point to perform connected component segmentation on the writing trajectory in the black and white image. Further, for each newly added pixel, its similarity with its neighboring pixels is also calculated. If the similarity is greater than the threshold, new pixels are added to the initial region until no more pixels meet the criteria. Then, adjacent initial regions are merged to obtain merged connected components. If the similarity between two adjacent merged connected components is greater than a third threshold, the two adjacent merged connected components are merged to perform connected component merging on the writing trajectory in the black and white image. This process continues until all pixels in the black and white image are included in the merged connected components or the number of merged connected components reaches a preset value, at which point the connected component merging process stops, resulting in a merged connected component image.
[0061] It should be noted that the second threshold, the third threshold, and the preset value are set according to the actual situation, and are not limited here.
[0062] S3. Perform edge detection on the merged connected component image to obtain the edge image.
[0063] Specifically, edge contours with significant brightness changes are identified in the merged connected component image and extracted to form an edge image.
[0064] Please see Figure 5 , Figure 5 A specific implementation of step S3 is shown below:
[0065] S31. Using the Sobel operator, convolution operation is performed on the connected component merged image to obtain the gradient value of each pixel.
[0066] Specifically, the gradient values of pixels are calculated based on the changes in image brightness. The gradient calculation uses the Sobel operator, employing a 3x3 or 5x5 matrix as the convolution kernel to perform convolution operations on the image and calculate the gradient value for each pixel. The Sobel operator can calculate gradient values in both the horizontal and vertical directions, yielding the gradient magnitude and direction.
[0067] S32. Using non-maximum suppression, the pixels are filtered based on their gradient values to obtain initial pixels, where each initial pixel corresponds to a target gradient value.
[0068] Specifically, the calculated gradient values need to be subjected to non-maximum suppression to retain the positions with the largest gradient changes and suppress values at other positions. This is done by determining the gradient direction for each pixel; if the gradient value is largest in that direction, the pixel is retained as the initial pixel; otherwise, its value is set to 0.
[0069] S33. Obtain the initial pixel point whose target gradient value is higher than the fourth threshold, and obtain the target pixel point.
[0070] S34. Using a preset edge connection method, edge connection processing is performed based on the target pixel points to obtain the edge contour, and when all edge contours are generated, the edge image is obtained.
[0071] Specifically, the preset edge connection methods include chain code method, piecewise linear interpolation method, etc., which can form a complete edge from continuous edge points for subsequent connected component segmentation. In the embodiments of this application, pixels with target gradient values higher than the fourth threshold are considered strong edges, so edge connection processing is performed based on target pixels to obtain edge contours, and when all edge contours are generated, the edge image is obtained.
[0072] Furthermore, the fourth threshold is determined using the Otsu adaptive thresholding algorithm or a threshold segmentation method based on statistical analysis.
[0073] S4. Using a preset connected component analysis algorithm, the connected components in the edge image are identified and labeled to obtain the target connected component.
[0074] Specifically, connected components in an edge image refer to connected regions formed by adjacent edge points. For a binary edge image, connected component analysis algorithms can be used to identify and extract these connected components for further processing and analysis.
[0075] Please see Figure 6 , Figure 6 A specific implementation of step S4 is shown below:
[0076] S41. Traverse the edge image to obtain the unprocessed pixels in the edge image.
[0077] Specifically, the entire edge image is traversed, and pixels with a value of 1 are taken as unprocessed pixels to obtain the unprocessed pixels in the edge image.
[0078] S42. Traverse the unprocessed pixels along the preset path, obtain the adjacent unprocessed pixels corresponding to the unprocessed pixels, and include the unprocessed pixels and their adjacent unprocessed pixels in the current connected component, and mark the unprocessed pixels and their adjacent unprocessed pixels as processed.
[0079] Specifically, starting from the top left corner, the system traverses all unprocessed pixels in the image. If the current pixel is unprocessed, it searches for all adjacent pixels, adds them to the current connected component, and marks them as processed. Furthermore, the traversal along the preset path can start not only from the top left corner but also from other paths, with the aim of identifying all unprocessed pixels in the image and assigning them to their corresponding connected components.
[0080] S43. When all unprocessed pixels are assigned to their corresponding current connected components, identify all connected components in the edge image and mark all connected components in the edge image to obtain the target connected component.
[0081] Specifically, when all unprocessed pixels are assigned to their corresponding current connected components, all connected components in the edge image are identified. Simultaneously, all connected components in the edge image are labeled with different colors or markers to obtain the target connected components.
[0082] S5. For any target connected component, scan the set of boundary points in the target connected component to obtain the line drawing interruption points. When all target connected components have been scanned, record and mark the identified line drawing interruption points to obtain the target result.
[0083] Specifically, each connected component is divided into multiple sub-connected components based on the line break points, and each sub-connected component is labeled. An image gradient-based algorithm can be used to identify these break points. Specifically, the gradient values around each pixel can be calculated, and it can be determined whether each pixel is an edge point. If multiple edge points exist within a connected component, it indicates the presence of a line break point. After further connected component analysis, the set of boundary points for each connected component can be obtained. For a continuous straight line, all its boundary points should be continuous; if a break point appears, it means the line is broken. Therefore, the line break points can be identified by scanning the set of boundary points.
[0084] Please see Figure 7 , Figure 7 A specific implementation of step S5 is shown below:
[0085] S51. For any target connected component, sort the boundary points in the boundary point set according to their positions to obtain serialized boundary points.
[0086] S52. Calculate the distance between all adjacent boundary points in the serialized boundary points to obtain the target distance.
[0087] S53. If the target distance is greater than the fifth threshold, it is determined that there is a line drawing interruption point between the two boundary points corresponding to the target distance, and the current position in the line drawing is recorded.
[0088] S54. When all target connected components have been scanned, the identified line break points are recorded and marked to obtain the target result.
[0089] In this embodiment, for any target connected component, the boundary points in the boundary point set are sorted according to their positions to obtain serialized boundary points. These serialized boundary points are then scanned and calculated to determine the distances between all adjacent boundary points, thus obtaining the target distance. If the target distance is greater than a fifth threshold, a line-drawing interruption point is determined between the two boundary points corresponding to the target distance, and the current position in the line is recorded. When all target connected components have been scanned, the identified line-drawing interruption points are recorded and marked to obtain the target result. The target result includes the positions and markings of all image interruption points in the image to be processed.
[0090] It should be noted that the fifth threshold is set according to the actual situation and is not limited here.
[0091] This invention provides an embodiment that acquires an image to be processed and binarizes it to obtain a black and white image. It then performs connected component segmentation and merging on the writing trajectory in the black and white image to obtain a merged connected component image. Edge detection is performed on the merged connected component image to obtain an edge image. A preset connected component analysis algorithm is used to identify and mark the connected components in the edge image to obtain target connected components. For any target connected component, the set of boundary points in the target connected component is scanned to obtain line break points. When all target connected components have been scanned, the identified line break points are recorded and marked to obtain the target result. This embodiment of the application, by segmenting and merging the connected components of the writing trajectory in the image to be processed, divides the image into different connected components and identifies and marks these components, enabling accurate and comprehensive scanning of line break points, thereby improving the accuracy of identifying line breaks in electronic whiteboards.
[0092] Please refer to Figure 8 As a response to the above Figure 1 The implementation of the method shown in this application provides an embodiment of a line drawing interruption recognition device for an electronic whiteboard. This device embodiment is similar to... Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic whiteboards.
[0093] like Figure 8 As shown, the line interruption recognition device for the electronic whiteboard in this embodiment includes: an image acquisition unit 61, a connected component segmentation processing unit 62, an image edge detection unit 63, a connected component analysis unit 64, and a target result generation unit 65, wherein:
[0094] The image acquisition unit 61 is used to acquire the image to be processed and perform binarization processing on the image to be processed to obtain a black and white image;
[0095] The connected component segmentation processing unit 62 is used to obtain a connected component merged image by performing connected component segmentation and merging processing on the writing trajectory in the black and white image;
[0096] Image edge detection unit 63 is used to perform edge detection on the merged connected component image to obtain an edge image;
[0097] The connected component analysis unit 64 is used to identify and label connected components in the edge image using a preset connected component analysis algorithm to obtain the target connected component.
[0098] The target result generation unit 65 is used to scan the set of boundary points in any target connected component to obtain line break points. When all target connected components have been scanned, the identified line break points are recorded and marked to obtain the target result.
[0099] Furthermore, the image acquisition unit 61 includes:
[0100] An image acquisition unit is used to acquire the image to be processed.
[0101] The grayscale processing unit is used to perform grayscale processing on the image to be processed to obtain a grayscale image;
[0102] The binarization image generation unit is used to compare the gray values of all pixels in the grayscale image with a first threshold to perform threshold segmentation on the grayscale image and obtain a binarized image.
[0103] The image denoising unit is used to denoise the binarized image using mean filtering to obtain a black and white image.
[0104] Furthermore, the image denoising unit includes:
[0105] The grayscale value acquisition unit is used to traverse the binarized image using a preset filter to obtain the grayscale value of each pixel in the binarized image.
[0106] The weighted average processing unit is used to perform weighted average processing on the pixel grayscale value of the preset area corresponding to each pixel to obtain a new grayscale value.
[0107] The gray value replacement unit is used to replace the gray value of the corresponding pixel in the binarized image based on the new gray value, so as to obtain the replaced image;
[0108] The edge processing unit is used to obtain a black and white image by performing edge processing on the replaced image.
[0109] Furthermore, the connected component segmentation processing unit 62 includes:
[0110] The initial region construction unit is used to obtain any pixel in the black and white image as a seed point and construct the initial region based on the seed point;
[0111] The similarity calculation unit is used to calculate the similarity between each seed point and its neighboring pixels.
[0112] The connected component segmentation unit is used to divide adjacent pixels into the initial region corresponding to the seed point if the similarity is greater than the second threshold, so as to perform connected component segmentation processing on the writing trajectory in the black and white image.
[0113] The connected component merging unit is used to merge adjacent initial regions to obtain merged connected components. If the similarity between two adjacent merged connected components is greater than a third threshold, the two adjacent merged connected components are merged to perform connected component merging processing on the writing trajectory in the black and white image.
[0114] The connected component merging image generation unit is used to stop the connected component merging process and obtain a connected component merged image when all pixels in the black and white image are included in the merged connected components or when the number of merged connected components reaches a preset value.
[0115] Furthermore, the image edge detection unit 63 includes:
[0116] The gradient value calculation unit is used to perform convolution operations on the connected component merged image using the Sobel operator to obtain the gradient value of each pixel.
[0117] The target gradient value generation unit is used to filter pixels based on their gradient values using a non-maximum suppression method to obtain initial pixels, where each initial pixel corresponds to a target gradient value.
[0118] The target pixel acquisition unit is used to acquire initial pixels whose target gradient values are higher than the fourth threshold, and thus obtain the target pixels.
[0119] The edge contour generation unit is used to perform edge connection processing based on target pixels using a preset edge connection method to obtain edge contours, and obtains the edge image when all edge contours are generated.
[0120] Furthermore, the connected component analysis unit 64 includes:
[0121] The unprocessed pixel acquisition unit is used to traverse the edge image to obtain unprocessed pixels in the edge image;
[0122] The unprocessed pixel classification unit is used to traverse unprocessed pixels from a preset path, obtain the unprocessed pixels that are adjacent to the unprocessed pixels, classify the unprocessed pixels and their adjacent unprocessed pixels into the current connected component, and mark the unprocessed pixels and their adjacent unprocessed pixels as processed.
[0123] The target connected component generation unit is used to identify all connected components in the edge image when all unprocessed pixels are assigned to the corresponding current connected components, and to mark all connected components in the edge image to obtain the target connected component.
[0124] Furthermore, the target result generation unit 65 includes:
[0125] The boundary point sorting unit is used to sort the boundary points in the boundary point set according to their positions for any target connected component, thus obtaining serialized boundary points.
[0126] The target distance generation unit is used to calculate the distance between all adjacent boundary points in the serialized boundary points to obtain the target distance.
[0127] The line drawing interruption point identification unit is used to determine that there is a line drawing interruption point between the two boundary points corresponding to the target distance if the target distance is greater than the fifth threshold, and to record the current position in the line drawing.
[0128] The line breakpoint marking unit is used to record and mark the identified line breakpoints when all target connected components have been scanned, so as to obtain the target result.
[0129] To address the aforementioned technical problems, embodiments of this application also provide an electronic whiteboard. Please refer to [link / reference needed]. Figure 9 , Figure 9 This is a basic structural block diagram of the electronic whiteboard in this embodiment.
[0130] The electronic whiteboard 8 includes a memory 81, a processor 82, and a network interface 83 that are interconnected via a system bus. It should be noted that only an electronic whiteboard 8 with three components—memory 81, processor 82, and network interface 83—is shown in the figure. However, it should be understood that it is not required to implement all of the components shown; more or fewer components can be implemented alternatively. For example, the electronic whiteboard should also include a screen for writing.
[0131] The memory 81 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 81 may be an internal storage unit of the electronic whiteboard 8, such as the hard disk or memory of the electronic whiteboard 8. In other embodiments, the memory 81 may also be an external storage device of the electronic whiteboard 8, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic whiteboard 8. Of course, the memory 81 may also include both the internal storage unit of the electronic whiteboard 8 and its external storage device. In this embodiment, the memory 81 is typically used to store the operating system and various application software installed on the electronic whiteboard 8, such as the program code of the line drawing interruption recognition method of the electronic whiteboard. In addition, the memory 81 can also be used to temporarily store various types of data that have been output or will be output.
[0132] In some embodiments, processor 82 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. This processor 82 is typically used to control the overall operation of the electronic whiteboard 8. In this embodiment, processor 82 is used to run program code stored in memory 81 or process data, for example, to run the program code of the above-described line drawing interruption recognition method for the electronic whiteboard, to implement various embodiments of the line drawing interruption recognition method for the electronic whiteboard.
[0133] The network interface 83 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the electronic whiteboard 8 and other electronic devices.
[0134] This application also provides another embodiment, namely, a computer-readable storage medium storing a computer program that can be executed by at least one processor to cause the at least one processor to perform the steps of the line drawing interruption recognition method for an electronic whiteboard as described above.
[0135] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of the various embodiments of this application.
[0136] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
Claims
1. A method for identifying line drawing interruptions on an electronic whiteboard, characterized in that, include: The image to be processed is acquired and binarized to obtain a black and white image; By performing connected component segmentation and merging on the writing trajectories in the black and white image, a merged connected component image is obtained; Edge detection is performed on the merged connected component image to obtain an edge image; A preset connected component analysis algorithm is used to identify and label connected components in the edge image to obtain the target connected component; For any of the target connected components, the set of boundary points in the target connected component is scanned to obtain line break points. When all the target connected components have been scanned, the identified line break points are recorded and marked to obtain the target result. For any of the target connected components, the set of boundary points in the target connected component is scanned to obtain line break points. When all the target connected components have been scanned, the identified line break points are recorded and marked to obtain the target result, including: For any of the target connected components, the boundary points in the boundary point set are sorted according to their positions to obtain serialized boundary points; Calculate the distance between all adjacent boundary points in the serialized boundary points to obtain the target distance; If the target distance is greater than the fifth threshold, it is determined that there is a line interruption point between the two boundary points corresponding to the target distance, and the current position in the line is recorded. When all the target connected components have been scanned, the identified line break points are recorded and marked to obtain the target result.
2. The method for identifying line interruptions on an electronic whiteboard according to claim 1, characterized in that, The step of acquiring the image to be processed and performing binarization processing on the image to be processed to obtain a black and white image includes: Obtain the image to be processed; The image to be processed is converted to grayscale to obtain a grayscale image; The grayscale values of all pixels in the grayscale image are compared with a first threshold to perform threshold segmentation on the grayscale image and obtain a binarized image. The binarized image is denoised using mean filtering to obtain the black and white image.
3. The method for identifying line interruptions on an electronic whiteboard according to claim 2, characterized in that, The step of denoising the binarized image using mean filtering to obtain the black and white image includes: The binarized image is traversed using a preset filter to obtain the grayscale value of each pixel in the binarized image; For each pixel, a weighted average of the pixel grayscale values in the preset region corresponding to the pixel is performed to obtain a new grayscale value. The gray values of corresponding pixels in the binarized image are replaced based on the new gray values to obtain the replaced image; The black and white image is obtained by performing edge processing on the replaced image.
4. The method for identifying line interruptions on an electronic whiteboard according to claim 1, characterized in that, The process of segmenting and merging the written trajectories in the black and white image to obtain a merged connected component image includes: Obtain any pixel in the black and white image as a seed point, and construct an initial region based on the seed point; For each seed point, calculate the similarity between the seed point and its neighboring pixels; If the similarity is greater than the second threshold, the adjacent pixels are assigned to the initial region corresponding to the seed point to perform connected component segmentation on the writing trajectory in the black and white image. The adjacent initial regions are merged to obtain merged connected components. If the similarity between two adjacent merged connected components is greater than a third threshold, the two adjacent merged connected components are merged to perform connected component merging processing on the writing trajectory in the black and white image. When all pixels in the black and white image are included in the merged connected components or when the number of merged connected components reaches a preset value, the connected component merging process is stopped, and the merged connected component image is obtained.
5. The method for identifying line interruptions on an electronic whiteboard according to claim 1, characterized in that, The step of performing edge detection on the merged connected component image to obtain an edge image includes: The Sobel operator is used to perform convolution operation on the connected component merged image to obtain the gradient value of each pixel; The non-maximum suppression method is used to filter the pixels based on their gradient values to obtain initial pixels, wherein each initial pixel corresponds to a target gradient value. Obtain initial pixels whose target gradient value is higher than the fourth threshold to obtain the target pixels; Using a preset edge connection method, edge connection processing is performed based on the target pixels to obtain edge contours, and when all edge contours are generated, the edge image is obtained.
6. The method for identifying line interruptions on an electronic whiteboard according to claim 1, characterized in that, The step involves employing a preset connected component analysis algorithm to identify and label connected components in the edge image to obtain the target connected component, including: Traverse the edge image to obtain unprocessed pixels in the edge image; Traverse the unprocessed pixels along the preset path, obtain the adjacent unprocessed pixels corresponding to the unprocessed pixels, and include the unprocessed pixels and the adjacent unprocessed pixels in the current connected component, and mark the unprocessed pixels and the adjacent unprocessed pixels as processed. When all unprocessed pixels are assigned to the corresponding current connected component, all connected components in the edge image are identified and marked to obtain the target connected component.
7. A line interruption recognition device for an electronic whiteboard, characterized in that, include: The image acquisition unit is used to acquire the image to be processed and perform binarization processing on the image to be processed to obtain a black and white image; The connected component segmentation processing unit is used to perform connected component segmentation and merging processing on the writing trajectory in the black and white image to obtain a connected component merged image; An image edge detection unit is used to perform edge detection on the merged connected component image to obtain an edge image; The connected component analysis unit is used to identify and label connected components in the edge image using a preset connected component analysis algorithm to obtain the target connected component. The target result generation unit is used to scan the set of boundary points in any target connected component to obtain line break points. When all target connected components have been scanned, the identified line break points are recorded and marked to obtain the target result. The target result generation unit includes: A boundary point sorting unit is used to sort the boundary points in the boundary point set according to their positions for any of the target connected components, thereby obtaining serialized boundary points. The target distance generation unit is used to calculate the distance between all adjacent boundary points in the serialized boundary points to obtain the target distance. The line drawing interruption point identification unit is used to determine that there is a line drawing interruption point between the two boundary points corresponding to the target distance if the target distance is greater than the fifth threshold, and to record the current position in the line drawing. The line interruption point marking unit is used to record and mark the identified line interruption points when all the target connected components have been scanned, so as to obtain the target result.
8. An electronic whiteboard, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the line drawing interruption recognition method for the electronic whiteboard as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the line drawing interruption recognition method for the electronic whiteboard as described in any one of claims 1 to 6.