WO2020168818A1 - Image processing method, system and device, storage medium, and blackboard device - Google Patents

Image processing method, system and device, storage medium, and blackboard device Download PDF

Info

Publication number
WO2020168818A1
WO2020168818A1 PCT/CN2019/127758 CN2019127758W WO2020168818A1 WO 2020168818 A1 WO2020168818 A1 WO 2020168818A1 CN 2019127758 W CN2019127758 W CN 2019127758W WO 2020168818 A1 WO2020168818 A1 WO 2020168818A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
pixels
blackboard
pixel
type
Prior art date
Application number
PCT/CN2019/127758
Other languages
French (fr)
Chinese (zh)
Inventor
邹超洋
Original Assignee
广州视源电子科技股份有限公司
广州视睿电子科技有限公司
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 广州视源电子科技股份有限公司, 广州视睿电子科技有限公司 filed Critical 广州视源电子科技股份有限公司
Publication of WO2020168818A1 publication Critical patent/WO2020168818A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Definitions

  • This application relates to image processing technology, such as an image processing method, system, device, storage medium, and blackboard device.
  • Image threshold segmentation algorithm is a commonly used image segmentation method. Because of its simple implementation, small calculation amount, and stable performance, it has become the most basic and most widely used segmentation technology in image segmentation. It is widely used in extracting target objects from images. In the program.
  • commonly used threshold segmentation algorithms mainly include two ideas, one is a global threshold segmentation algorithm, and the other is a local threshold segmentation algorithm.
  • the global threshold segmentation algorithm it mainly uses different measurement indicators to find the optimal global threshold, so as to use this optimal global threshold to segment the image, but it is basically impossible for the target scene to have multiple peaks and valleys.
  • Adaptation that is, if there are multiple peaks and valleys in the image, the global threshold segmentation algorithm cannot segment the foreground and the background well. Therefore, it can be seen that for the image with reflection, the global threshold is used The segmentation algorithm cannot extract the target image from the image well, and the accuracy of the target image extraction is low.
  • embodiments of the present invention provide an image processing method, system, device, storage medium, and blackboard device, which can effectively extract a target image from a blackboard image.
  • an embodiment of the present invention provides an image processing method, including:
  • the threshold segmentation process of the image block is specifically performing pixel threshold segmentation on at least one image block of the first blackboard image Processing, so that the pixels of the at least one image block are divided into first type pixels or second type pixels;
  • the pixel is taken as the target pixel
  • a target image is extracted from the first blackboard image.
  • the threshold segmentation processing of the image block at least once is specifically: the threshold segmentation processing of the image block at least twice;
  • the attributes of the image blocks used in the threshold segmentation processing of each image block are different, and the attributes include the number, size, shape, and/or selection position of the image block.
  • the number of the image blocks is at least two, and the at least two image blocks are obtained by evenly dividing the first blackboard image.
  • the threshold segmentation algorithm used in the step of performing pixel threshold segmentation processing on the first blackboard image is a global threshold segmentation algorithm, and/or the threshold segmentation algorithm for the first blackboard image
  • the threshold segmentation algorithm used in the step of threshold segmentation processing for at least one image block is a global threshold segmentation algorithm.
  • the step of performing threshold segmentation processing on pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels It includes:
  • the step of performing image block threshold segmentation processing at least once on the first blackboard image includes:
  • At least one image block threshold segmentation process and binarization process After performing at least one image block threshold segmentation process and binarization process on the first blackboard image, at least one third blackboard image is obtained;
  • threshold segmentation processing and binarization processing of the image block include:
  • the step of determining that the number of times that the pixel of the first blackboard image is classified into the first type of pixel is within a first threshold range, then the step of using the pixel as a target pixel includes:
  • the fourth blackboard image After the second blackboard image and the at least one third blackboard image are summed to obtain the fourth blackboard image, it is determined that the pixel value of the fourth blackboard image is within the second threshold range, then the This pixel is regarded as the target pixel;
  • the second threshold value range is determined according to the first threshold value range.
  • an embodiment of the present invention also provides an image processing system, including:
  • the first acquiring unit is configured to acquire the first blackboard image
  • a first processing unit configured to perform threshold segmentation processing on pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first-type pixels or second-type pixels;
  • the second processing unit is configured to perform threshold segmentation processing of image blocks at least once on the first blackboard image; wherein the threshold segmentation processing of the image blocks is specifically: performing at least one image of the first blackboard image Performing threshold segmentation processing of pixels on the block, so that the pixels of the at least one image block are divided into first type pixels or second type pixels;
  • the third processing unit is configured to determine that the number of times that the pixels of the first blackboard image are divided into the first type of pixels is within a first threshold range, and then the pixels are used as target pixels;
  • the fourth processing unit is configured to extract a target image from the first blackboard image by using the target pixel.
  • an embodiment of the present invention also provides an image processing device, which includes:
  • At least one processor At least one processor
  • At least one memory for storing at least one program
  • the at least one processor When the at least one program is executed by the at least one processor, the at least one processor implements the image processing method.
  • an embodiment of the present invention also provides a storage medium in which instructions executable by a processor are stored, and the instructions executable by the processor are used to execute the image processing method when executed by the processor.
  • an embodiment of the present invention provides a blackboard device, including a blackboard, a camera, and a terminal device connected to the camera;
  • the camera is used to photograph the blackboard
  • the terminal equipment includes:
  • At least one processor At least one processor
  • At least one memory for storing at least one program
  • the at least one processor When the at least one program is executed by the at least one processor, the at least one processor implements the image processing method.
  • the embodiment of the present invention performs threshold segmentation processing on the first blackboard image and performs pixel points on each image block in the first blackboard image. According to the threshold segmentation processing, it is possible to determine whether the pixel is the target pixel according to the number of times the pixel is divided into the first type of pixel. It can be seen that the embodiment of the present invention has the effect of local threshold segmentation, and the pixel is divided The target pixel is determined for the number of times of the first type of pixel. Compared with the traditional solution, this can effectively solve the problem of image reflection and greatly improve the accuracy of extracting the target image from the blackboard image.
  • Fig. 1 is a flowchart of steps in a first specific embodiment of an image processing method according to an embodiment of the present invention
  • Figure 2 is a schematic diagram of an image obtained after a graph is segmented using a traditional local threshold segmentation algorithm
  • FIG. 3 is a flowchart of steps in a second specific embodiment of an image processing method according to an embodiment of the present invention.
  • FIG. 4 is a block diagram of a specific embodiment of an image processing system according to an embodiment of the present invention.
  • FIG. 5 is a block diagram of a specific embodiment of an image processing apparatus according to an embodiment of the present invention.
  • Fig. 6 is a structural block diagram of a specific embodiment of a blackboard device according to an embodiment of the present invention.
  • step numbers in the following embodiments they are set only for ease of elaboration, and there is no limitation on the order between the steps.
  • the execution order of the steps in the embodiments can be adapted according to the understanding of those skilled in the art.
  • the "up”, “down”, “left”, “right”, “front”, and “rear” mentioned in the following embodiments are only used to clearly describe the positional relationship, and are relative positional relationships, not absolute The position relationship can be adjusted adaptively according to the understanding of those skilled in the art.
  • the image processing solution provided by the embodiment of the present invention can be applied to a smart blackboard scene, so as to extract a target object (such as handwriting on the blackboard) from the blackboard image.
  • a target object such as handwriting on the blackboard
  • the smart blackboard scene it mainly includes a blackboard device.
  • the blackboard device includes a blackboard, a camera, and a terminal device connected to the camera.
  • the camera can be set on the blackboard and used to photograph the blackboard.
  • the terminal device is mainly used to perform image processing on the blackboard image taken by the camera, so as to realize the operation of displaying and recording the blackboard image.
  • an embodiment of the present invention provides an image processing method for extracting a target image from a blackboard image, as shown in FIG. 1, and the steps involved are as follows.
  • the first blackboard image it may be directly the original blackboard image captured by a camera, or it may be a blackboard image obtained after image preprocessing is performed on the original blackboard image captured by the camera (wherein, the The image preprocessing can include, but is not limited to, image filtering, de-manipulation, morphological image processing, etc.).
  • the former has the advantages of simple steps and high processing efficiency, while the latter has the advantages of improving recognition accuracy.
  • the image area obtained by the positioning is used as the first blackboard image, which not only improves processing efficiency but also improves accuracy. Therefore, as to which blackboard image is acquired as the first blackboard image, this can be set and selected according to the actual situation, and there is no excessive limitation here.
  • S102 Perform threshold segmentation processing on pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels. Performing this step is equivalent to that the corresponding pixel in the first blackboard image has been subjected to a pixel type division process. If the pixel is divided into the first type of pixel, then the pixel is divided into the first type of pixel. The number of times of a type of pixel is increased by 1. If the pixel is classified into a second type of pixel, the number of times the pixel is classified into a second type of pixel is 1.
  • the specific processing steps are: threshold judgment is performed on the pixel points in the image one by one through the feature threshold, so that according to the judgment result, the pixel points in the image are divided into at least Two types of pixels. For example, when a certain pixel point i is within the threshold range corresponding to the type A pixel point, the pixel point i is classified as the type A pixel point.
  • the feature mentioned in the feature threshold it refers to the feature of the image, such as the grayscale and color of the image. Therefore, if the image subjected to the threshold segmentation process is different, the obtained feature threshold is also different. It must be the same, and how to obtain the feature threshold will vary according to the algorithm used.
  • the method for obtaining the feature threshold includes, but is not limited to, algorithms with the largest inter-class variance (such as the Otsu algorithm), The maximum variance threshold algorithm, the bimodal selection threshold algorithm, etc., are not too limited here. It can be seen that, for the step of performing the threshold segmentation processing on the pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into the first type of pixels or the second type of pixels, the In order to threshold the pixels in the first blackboard image according to the characteristic threshold of the first blackboard image, and divide the pixels in the first blackboard image into the first type of pixels or the second type of pixels according to the judgment result point.
  • algorithms with the largest inter-class variance such as the Otsu algorithm
  • the maximum variance threshold algorithm such as the Otsu algorithm
  • the bimodal selection threshold algorithm etc.
  • the first type of pixel it is essentially the target type of pixel, and among all the pixels of the image, except for the first type of pixel, the pixel is the second type of pixel, for example, a total of There are three threshold ranges, namely Threshold Range 1, Threshold Range 2, and Threshold Range 3. Through these three threshold ranges, the pixels in the image can be divided into three types of pixels, and the pixel values fall into Threshold Range 1. The pixels in are type 1 pixels, the pixels whose pixel values fall within the threshold range 2 are type 2 pixels, and the pixels whose pixel values fall within the threshold range 3 are type 3 pixels.
  • type 1 pixel is Target type pixels
  • type 1 pixels are the first type pixels
  • type 2 pixels and type 3 pixels belong to the second type pixels
  • type 1 pixels and type 3 pixels are the target type pixels
  • type 1 pixel and type 3 pixel are the first type pixel
  • type 2 pixel is the second type pixel. If the number of pixel types to be divided is more, the same is true.
  • S103 Perform at least one image block threshold segmentation process on the first blackboard image; wherein the threshold segmentation process of the image block is specifically: performing pixel point segmentation on at least one image block of the first blackboard image. Threshold segmentation processing, so that the pixels of the at least one image block are divided into first type pixels or second type pixels. Regarding the threshold segmentation process, the first type pixel point, and the second type pixel point described in this step, they are the same as the analytical definition of the above step S102.
  • this step is mainly to perform threshold segmentation processing on at least one image block in the first blackboard image, that is, in this step, the object to be subjected to threshold segmentation processing is the image block in the first blackboard image Therefore, at this time, the characteristic threshold of the corresponding image block will be different from the characteristic threshold of the corresponding first blackboard image (of course, there may also be the case where the characteristic threshold of the corresponding image block is the same as the characteristic threshold of the corresponding first blackboard image), that is, this The type of pixel points will be different.
  • the threshold segmentation processing of the image block at least once, when the threshold segmentation processing of the image block is performed once, if the pixels in the image block (which are essentially the pixels in the first blackboard image) are divided into first Type pixel, the number of times that the pixel is divided into the first type pixel is increased by 1. If the pixel in the image block is divided into the second type pixel, then the pixel is divided into the second type pixel Increase the number of points by 1.
  • the pixel i in the first blackboard image is divided into the first type of pixel after the step S102 is performed, after the step S103 is performed (assuming that the threshold segmentation process of the image block is performed at least once at this time) Specifically, it is the threshold segmentation processing of the image block for three times), and it is determined that the pixel i is divided into the first type of pixel during the threshold segmentation processing of the three image blocks. At this time, the pixel i is divided into the first type of pixel.
  • the number of pixels of a type is 4.
  • the selection and acquisition methods from the first blackboard image can be selected according to the actual situation, and when the threshold segmentation processing of each image block is performed, the selection and acquisition methods of the image blocks can be the same. Not exactly the same or completely different.
  • the image block performs threshold segmentation processing, and then perform the remaining times of image block threshold segmentation processing, the selected acquisition position, size, and shape of the image block can be adjusted, for example, compared to the image block acquired the first time, the second time,
  • the selection and acquisition position of the 3rd and/or 4th image block can be moved up/down/left/right by the corresponding distance, or the size or shape of the image block can be adjusted, such as the size becomes larger or smaller, and the shape changes from square Or the rectangle becomes round or irregular. If the selection and acquisition method of the image block remains unchanged, the number of executions of the threshold segmentation processing of the image block may be 1.
  • the number of image blocks should be selected as multiple, and the multiple The extraction positions of the image blocks on the first blackboard image are set as evenly as possible everywhere in the first blackboard image.
  • the multiple image blocks are preferably obtained by dividing the first blackboard image.
  • the first blackboard image is divided into image regions, and the image regions obtained after the division are equivalent to image blocks. It can be seen that, for the step S103, it is equivalent to performing local threshold segmentation processing on the first blackboard image.
  • step S102 and step S103 the execution order between the two can be interchanged, that is, step S103 is executed first and then step S102 is executed.
  • the number of times the pixels in the first blackboard image are classified into the first type of pixels is counted, and then the counted times are thresholded to determine whether the times are If it falls within the first threshold range, it means that the pixel is the target pixel.
  • the type classification processing is the processing of dividing the pixel point i into a first type pixel point or a second type pixel point
  • the pixel point When the number of times i is divided into the first type pixel is greater than or equal to a preset threshold (such as 2), that is, when it falls within the first threshold range, it means that the pixel i is the target pixel.
  • a preset threshold such as 2
  • the total number of times, d is expressed as a percentage, d is greater than or equal to 50%; b is expressed as a value greater than or equal to c.
  • d it is also possible to set d to be less than 50%, but if d is greater than or equal to 50%, the judgment accuracy of the target pixel will be higher, which is suitable for scenes with unsatisfactory external environmental factors.
  • the target pixels extract a target image from the first blackboard image. If the target pixel corresponds to the foreground of the blackboard image, that is, the handwriting, then the extracted target image is the foreground image. If the target pixel corresponds to the background of the blackboard image, then the extracted target image is Background image.
  • the blackboard image is first subjected to the threshold segmentation processing of the entire image, and then the pixels of the first blackboard image are divided into the first type of pixels or the second type of pixels, and then After threshold segmentation is performed on the image block of the blackboard image, the pixels of the image block are divided into the first type pixel point or the second type pixel point to achieve the effect of local threshold segmentation of the blackboard image, and then pass the pixel point
  • the number of times that pixels are classified into the first type is thresholded to determine the target pixel. In this way, the determined target pixel is used to extract the corresponding image from the first blackboard image, that is, the target image. Its validity and accuracy High, and it can solve the problem of judging the foreground as the background due to the reflection of the image.
  • the at least one image block threshold segmentation process is specifically: at least two image block threshold segmentation processes; each of the at least two image block threshold segmentation processes
  • the attributes of the image blocks used in the threshold segmentation process are different, and the attributes include the number, size, shape, and/or selection position of the image block. Wherein, the difference means completely different or partly different.
  • the step of image block threshold segmentation processing is performed at least twice, and in each processing, the attribute parameters of the image block are not the same (that is, each time the image block threshold segmentation processing is performed When the image block selection and extraction method has been adjusted), this means that each time the threshold segmentation process of the image block is performed, for the threshold judgment of the same pixel, the characteristic threshold used will be different each time , Which is equivalent to the feature threshold value used is randomly changed. It can be seen that in this case, by counting the number of times the pixel is divided into the first type of pixel and the threshold judgment, the confirmation of the target pixel can be further improved Accuracy, thereby improving the accuracy and efficiency of target extraction.
  • the attributes of the image block will be different, so that the characteristic threshold will change randomly, so that even if one or two of the pixels belonging to the foreground are judged as The background pixel, but as long as the pixel is judged as the foreground pixel 3 or more times (for example, the pixel has undergone a total of 5 types of classification processing), then the pixel will eventually be judged as the foreground pixel pixel.
  • the method of this embodiment to achieve the extraction of the target image, its accuracy and effectiveness are further improved, and it can solve the problem that the traditional local threshold segmentation method is easy to judge the partial area of the filled figure as the background image. , That is, to solve the problem that the traditional local threshold segmentation method cannot handle the problem of whether the current neighborhood is divided into the global foreground or the global background.
  • the number of the image blocks is at least two, and the at least two image blocks are obtained by evenly dividing the first blackboard image. Since the handwriting written on the blackboard may spread all over the blackboard, it is difficult to determine the image area with reflective image area and/or the image area where the filled figure is located. Therefore, in order to better adapt to the blackboard scene, use the even division Way to obtain at least two image blocks, so that the foreground handwriting of the blackboard image can be obtained well. Moreover, the image blocks are obtained by dividing in an average manner, which can reduce the workload of program design and utilize the design, modification and adjustment of the staff.
  • the threshold segmentation algorithm used in the step of performing pixel threshold segmentation processing on the first blackboard image is a global threshold segmentation algorithm, and/or, the first blackboard image
  • the threshold segmentation algorithm used in the step of threshold segmentation processing for at least one image block of a blackboard image is a global threshold segmentation algorithm. That is equivalent to the step of performing pixel threshold segmentation processing on the first blackboard image, which specifically includes using a first threshold segmentation algorithm to perform pixel threshold segmentation processing on the first blackboard image;
  • the step of performing pixel threshold segmentation processing on at least one image block of the first blackboard image specifically includes using a second threshold segmentation algorithm to perform pixel pixel processing on at least one image block of the first blackboard image.
  • Point threshold segmentation processing wherein the first threshold segmentation algorithm and/or the second threshold segmentation algorithm are global threshold segmentation algorithms. Since in this embodiment, the first threshold segmentation algorithm and/or the second threshold segmentation algorithm adopts a global threshold segmentation algorithm, it can further reduce the traditional local threshold segmentation algorithm that can easily determine the partial area of the filled figure as a background. The problem of the image guarantees the accuracy of the segmentation of the foreground image and the background image.
  • the threshold segmentation processing is performed on the pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into the first type of pixels or the second type of pixels
  • This step S102 includes:
  • the step S1021 is implemented by performing threshold segmentation processing and binarization processing on the first blackboard image, which not only achieves the pixel processing of the first blackboard image
  • the purpose of threshold segmentation is to mark the pixels classified as the first type as 255 or 1 (that is, the pixels of the first type are set as white pixels), and for the pixels classified as the second type Marked as 0 (that is, the second type of pixel is set as a black pixel), so that the pixel value after the pixel binarization can facilitate the subsequent statistics of the number of times the pixel is divided into the first type of pixel .
  • the pixel value range is 0 to 255, and the pixel value corresponding to the white pixel is 255; while in the color space represented by floating point numbers, the pixel value range It is 0 to 1, and the pixel value corresponding to the white pixel is 1.
  • the pixel value 1 should be selected to represent the white pixels, that is, the color space of the image should be represented by a floating point number, so that when the first blackboard image is determined
  • the pixel value of the pixel in the binarized image is 1, it means that in the current binarized image, the pixel is divided into the first type of pixel, that is, the foreground pixel, which also indicates the pixel
  • the number of times the pixels are classified into the first type plus one.
  • the step S103 of performing image block threshold segmentation processing on the first blackboard image at least once includes:
  • At least one third blackboard image is obtained.
  • the threshold segmentation processing and binarization processing of the image block include:
  • the above step S1031 is implemented by performing threshold segmentation processing and binarization processing on the at least one image block, which not only achieves the threshold segmentation processing of pixels on the image block It also realizes that the pixels classified into the first type are marked as 255 or 1 (that is, the pixels of the first type are set as white pixels), and the pixels classified as the second type are marked as 0 (That is, the second-type pixel is set as a black pixel). In this way, the pixel value after the pixel is binarized can facilitate subsequent statistics on the number of times the pixel is classified into the first-type pixel.
  • a pixel value of 1 should be optionally used to represent white pixels, that is, a floating point number should be selected to represent the color space of the image, so that when the pixel in the binary image of the image block is determined When the value is 1, it means that in the current binarized image, the pixel is divided into the first type of pixel, that is, the foreground pixel, and it also indicates the number of times the pixel is divided into the first type of pixel plus 1.
  • the second threshold range is determined according to the first threshold range.
  • the at least A third blackboard image is also a binarized image of the first blackboard image. Therefore, by performing pixel value summation processing on the second blackboard image and the at least one third blackboard image, it is equivalent to counting the number of times each pixel is judged to be the first type of pixel to obtain each pixel The total number of times H is judged to be the first type of pixel. At this time, a threshold judgment can be performed on the total number of times H, so as to finally determine whether the corresponding pixel is the target pixel.
  • the second threshold range is the same as the first threshold range. If the first type of pixel is not set as a white pixel, but with another color, that is, the second threshold The pixel value corresponding to one type of pixel is not 1. In this case, the first threshold range needs to be multiplied by a corresponding multiple to obtain the required second threshold range.
  • the number of executions of the threshold segmentation processing of the image block can be selected from 2 to 4 times.
  • the embodiment of the present invention provides an image processing method, which is specifically applied to the writing scene of a smart blackboard device, and is mainly used to extract the handwriting image (ie, the target foreground image) on the blackboard image.
  • the specific steps are As follows.
  • the first blackboard image is an original blackboard image captured by a camera or a blackboard image obtained after preprocessing the original blackboard image captured by a camera.
  • S202 Perform threshold segmentation processing on pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels.
  • the step S202 is specifically that the Otsu algorithm is used to obtain the optimal feature threshold of the first blackboard image, and then the optimal feature threshold is used to threshold the pixels in the first blackboard image one by one, thereby
  • the pixels in the first blackboard image are divided into foreground type pixels (i.e., first type pixels) and background type pixels (second type pixels), so as to realize the first blackboard image.
  • Global threshold segmentation then the pixels classified into the foreground type are set as white pixels, and the pixels classified as the background type are set as black pixels, so that the first blackboard image is binarized to obtain the first Two blackboard image.
  • the second blackboard image is a binary image, that is, the first segmented mask image (mask1).
  • S203 Perform at least one image block threshold segmentation process on the first blackboard image; wherein the threshold segmentation process of the image block is specifically: performing pixel point segmentation on at least one image block of the first blackboard image. Threshold segmentation processing, so that the pixels of the at least one image block are divided into first type pixels or second type pixels.
  • the number of executions n of the threshold segmentation processing of the image block can be selected as 3, and each time the threshold segmentation processing of the image block is executed, the size of the image block used is different each time, that is, the first
  • the size of the image block used in the second execution of the threshold segmentation process of the image block is size 1
  • the size of the image block used in the second execution of the threshold segmentation process of the image block is size 2
  • the size of the image block used in the segmentation process is size 3. Size 1, size 2 and size 3 are all different, and because the image block described in this embodiment is obtained by evenly dividing the first blackboard image Therefore, by adjusting the number of divided image blocks, the size of the image blocks can be adjusted.
  • threshold segmentation processing is performed on each image block separately, that is, at this time, the image block is used as the input image to perform the threshold segmentation processing of the pixels in the image block. That is to say, the optimal feature threshold obtained at this time is obtained after processing the image block, that is, threshold segmentation is performed on an image block, which can be selected as using Otsu algorithm to obtain the optimal feature of the image block Threshold, and then through the optimal feature threshold, threshold judgment is performed on the pixels in the image block one by one, so that according to the judgment result, the pixels in the image block are divided into foreground type pixels (i.e.
  • the sum of mask1 and mask_i is to add up the pixel values of the same pixel in the second blackboard image and the three third blackboard images.
  • the fourth blackboard image ie, the second mask image mask2
  • the value after the sum of the pixel values corresponding to the same pixel, such as pixel j in the fourth blackboard image, its pixel value is the pixel value of pixel j in mask1, the pixel value of pixel j in mask_1, mask_2
  • the threshold range used can be [2 , 4], at this time, after the fourth blackboard image is thresholded by using the threshold range, the pixels falling within the threshold range, that is, pixels with a pixel value greater than or equal to 2, are set to white
  • the pixel point, that is, the pixel value is set to 1
  • the pixel point that does not fall into the threshold range, that is, the pixel point with a pixel value less than 2 is set as a black pixel point, that is, the pixel value is set to 0, which is equivalent to
  • the fifth blackboard image is obtained, and the fifth blackboard image is the third mask image mask3.
  • the pixels at the corresponding positions are obtained from the first blackboard image.
  • the final required handwriting image since the pixel values of the foreground pixels in mask3 are all 1, according to the pixels with the pixel value of 1 in mask3, the pixels at the corresponding positions are obtained from the first blackboard image. The final required handwriting image.
  • this embodiment can achieve the local threshold segmentation of the first blackboard image by thresholding the image block, and at the same time, the attributes of the image block used are different each time the threshold segmentation process of the image block is performed, so as to achieve multiple Scale threshold segmentation, which can not only solve the problem of the blackboard image being unable to segment the foreground and background due to reflections, but also solve the traditional local threshold segmentation because the size of the selected neighborhood is too small to cover the entire image. Lead to the problem of segmenting a certain part of the graph into the background. It can be seen that by using the method of the embodiment of the present invention, the foreground and background can be segmented effectively and accurately, and it is very suitable for the scene of the smart blackboard device. Because the blackboard is easy to reflect light, the blackboard image often has a reflective area, and In class, I often draw filling figures on the blackboard.
  • an embodiment of the present invention also provides an image processing system, including:
  • the first acquiring unit 301 is configured to acquire a first blackboard image
  • the first processing unit 302 is configured to perform threshold segmentation processing on pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels;
  • the second processing unit 303 is configured to perform threshold segmentation processing of an image block at least once on the first blackboard image; wherein the threshold segmentation processing of the image block is specifically performed on at least one of the first blackboard image Performing threshold segmentation processing of pixels on the image block, so that the pixels of the at least one image block are divided into first type pixels or second type pixels;
  • the third processing unit 304 is configured to determine that the number of times that the pixels of the first blackboard image are classified into the first type of pixels is within a first threshold range, and then use the pixel as a target pixel;
  • the fourth processing unit 305 is configured to use the target pixels to extract a target image from the first blackboard image.
  • the blackboard image is first subjected to the threshold segmentation processing of the entire image, and then the pixels of the first blackboard image are divided into the first type of pixels or the second type of pixels, and then After threshold segmentation is performed on the image block of the blackboard image, the pixels of the image block are divided into the first type pixel point or the second type pixel point to achieve the effect of local threshold segmentation of the blackboard image, and then pass the pixel point
  • the number of times that pixels are classified into the first type is thresholded to determine the target pixel. In this way, the determined target pixel is used to extract the corresponding image from the first blackboard image, that is, the target image. Its validity and accuracy High, and it can solve the problem of judging the foreground as the background due to the reflection of the image.
  • the threshold segmentation processing of the image block at least once is specifically: the threshold segmentation processing of the image block at least twice.
  • the attributes of the image blocks used in the threshold segmentation processing of each image block are different, and the attributes include the number, size, shape, and/or selection position of the image block.
  • the number of the image blocks is at least two, and the at least two image blocks are obtained by evenly dividing the first blackboard image.
  • the threshold segmentation algorithm used in the step of performing pixel threshold segmentation processing on the first blackboard image is a global threshold segmentation algorithm, and/or, the first blackboard image
  • the threshold segmentation algorithm used in the step of threshold segmentation processing for at least one image block of a blackboard image is a global threshold segmentation algorithm.
  • the first processing unit 302 includes:
  • the first processing module is configured to perform threshold segmentation processing on pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels, and then The pixels of the first type are set as white pixels, and the pixels of the second type are set as black pixels, thereby obtaining a second blackboard image.
  • the second processing unit 303 includes:
  • the second processing module is configured to perform at least one image block threshold segmentation process and binarization process on the first blackboard image to obtain at least one third blackboard image.
  • the threshold segmentation processing and binarization processing of the image block include:
  • the third processing unit 304 includes:
  • the third processing module is configured to perform sum processing on the second blackboard image and the at least one third blackboard image to obtain the fourth blackboard image, and then determine that the pixel value of the fourth blackboard image is in the first Within the second threshold range, the pixel is taken as the target pixel; wherein, the second threshold range is determined according to the first threshold range.
  • an embodiment of the present invention also provides an image processing device, which includes:
  • At least one processor 401 At least one processor 401;
  • the at least one processor 401 When the at least one program is executed by the at least one processor 401, the at least one processor 401 implements the steps of the image processing method described in the foregoing method embodiment.
  • the blackboard image is first subjected to the threshold segmentation processing of the entire image, and then the pixels of the first blackboard image are divided into the first type of pixels or the second type of pixels, and then After threshold segmentation is performed on the image block of the blackboard image, the pixels of the image block are divided into the first type pixel point or the second type pixel point to achieve the effect of local threshold segmentation of the blackboard image, and then pass the pixel point
  • the number of times that pixels are classified into the first type is thresholded to determine the target pixel. In this way, the determined target pixel is used to extract the corresponding image from the first blackboard image, that is, the target image.
  • an embodiment of the present invention also provides a storage medium in which instructions executable by a processor are stored, and the instructions executable by the processor are used to execute the one described in the foregoing method embodiment when executed by the processor.
  • This image processing method steps That is to say, the content in the above method embodiment is applicable to this storage medium embodiment, and the specific functions implemented by this storage medium embodiment are the same as the above method embodiment, and the beneficial effects achieved are the same as those achieved by the above method embodiment. The beneficial effects are also the same.
  • an embodiment of the present invention also provides a blackboard device, including a blackboard 501, a camera 502, and a terminal device 503 connected to the camera 502.
  • the camera 502 is used to photograph the blackboard 501.
  • the terminal device 503 includes:
  • At least one processor At least one processor
  • At least one memory is used to store at least one program.
  • the at least one processor When the at least one program is executed by the at least one processor, the at least one processor implements the steps of an image processing method described in the foregoing method embodiment.
  • the entire image of the blackboard image is first subjected to threshold segmentation processing, and then the pixels of the first blackboard image are divided into first type pixels or second type pixels, and then After threshold segmentation is performed on the image block of the blackboard image, the pixels of the image block are divided into the first type of pixel or the second type of pixel to achieve the effect of the local threshold segmentation of the blackboard image.
  • the number of times the pixels are divided into the first type is used for threshold judgment to determine the target pixel.
  • the determined target pixel is used to extract the corresponding image from the first blackboard image, that is, the target image, which is highly effective and accurate , And can solve the problem of judging the foreground as the background due to the reflection of the image.
  • the terminal device 503 it is realized by a combination of software and hardware, and it can be a computer, a mobile phone, an interactive smart tablet, a display device with smart processing functions (such as a smart TV, a smart display), and other devices.
  • the memory it may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • processor and the memory can be connected by a bus, and the processor and the memory can be integrated in the same circuit board or independently arranged in different circuit boards, and the connection between the processor and the memory can be
  • the fixed and non-detachable connection can also be a detachable connection.
  • the communication method between the terminal device 503 and the camera 502 can be a wired connection (such as a serial port wired connection, a universal serial bus (Universal Serial Bus, USB) interface wired connection, etc.), or a wireless connection (such as Infrared, Bluetooth, Zigbee, wireless fidelity (Wireless Fidelity, Wifi, etc.), these communication connection modes are not too limited in this embodiment, and can be selected according to actual conditions/requirements.
  • a wired connection such as a serial port wired connection, a universal serial bus (Universal Serial Bus, USB) interface wired connection, etc.
  • a wireless connection such as Infrared, Bluetooth, Zigbee, wireless fidelity (Wireless Fidelity, Wifi, etc.
  • the camera 502 is directly arranged on the blackboard 501 (for example, above the blackboard 501), so that the writing board can be directly installed during use, which is convenient for operation and use.

Landscapes

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

Abstract

An image processing method, system and device, a storage medium and a blackboard device. Said method comprises: acquiring a first blackboard image (S101); performing threshold segmentation processing of a pixel point on the first blackboard image (S102); performing at least one threshold segmentation processing of an image block on the first blackboard image (S103); if it is determined that the number of times that the pixel point of the first blackboard image is classified into a first type of pixel points is within a first threshold range, taking the pixel point as a target pixel point (S104); and using the target pixel point to extract a target image from the first blackboard image (S105).

Description

一种图像处理方法、系统、装置、存储介质及黑板装置Image processing method, system, device, storage medium and blackboard device
本申请要求在2019年02月20日提交中国专利局、申请号为201910127218.6的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office with an application number of 201910127218.6 on February 20, 2019. The entire content of the application is incorporated into this application by reference.
技术领域Technical field
本申请涉及图像处理技术,例如涉及一种图像处理方法、系统、装置、存储介质及黑板装置。This application relates to image processing technology, such as an image processing method, system, device, storage medium, and blackboard device.
背景技术Background technique
图像阈值分割算法是一种常用的图像分割方法,因其实现简单、计算量小、性能较稳定而成为图像分割中最基本和应用最广泛的分割技术,普遍应用于从图像中提取目标对象的方案中。目前,常用的阈值分割算法主要包含有两种思路,一种是全局阈值分割算法,另一种是局部阈值分割算法。对于所述全局阈值分割算法,其主要是通过不同的衡量指标来寻找最优全局阈值,从而利用此最优全局阈值来对图像进行分割,但是其对于目标场景存在多波峰波谷的情况下基本无法适应,也就是说,若图像中存有像素多波峰波谷的情况,全局阈值分割算法则无法很好对前景和背景进行分割,因此由此可见,对于有反光情况的图像而言,利用全局阈值分割算法是无法很好从图像中提取目标图像出来,目标图像提取的准确率较低。Image threshold segmentation algorithm is a commonly used image segmentation method. Because of its simple implementation, small calculation amount, and stable performance, it has become the most basic and most widely used segmentation technology in image segmentation. It is widely used in extracting target objects from images. In the program. Currently, commonly used threshold segmentation algorithms mainly include two ideas, one is a global threshold segmentation algorithm, and the other is a local threshold segmentation algorithm. For the global threshold segmentation algorithm, it mainly uses different measurement indicators to find the optimal global threshold, so as to use this optimal global threshold to segment the image, but it is basically impossible for the target scene to have multiple peaks and valleys. Adaptation, that is, if there are multiple peaks and valleys in the image, the global threshold segmentation algorithm cannot segment the foreground and the background well. Therefore, it can be seen that for the image with reflection, the global threshold is used The segmentation algorithm cannot extract the target image from the image well, and the accuracy of the target image extraction is low.
发明内容Summary of the invention
有鉴于此,本发明实施例提供一种图像处理方法、系统、装置、存储介质及黑板装置,能有效地从黑板图像中提取目标图像。In view of this, embodiments of the present invention provide an image processing method, system, device, storage medium, and blackboard device, which can effectively extract a target image from a blackboard image.
一方面,本发明实施例提供了一种图像处理方法,包括:On the one hand, an embodiment of the present invention provides an image processing method, including:
获取第一黑板图像;Acquiring the first blackboard image;
对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点;Performing threshold segmentation processing on the pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels;
对所述第一黑板图像进行至少一次图像块的阈值分割处理;其中,所述图像块的阈值分割处理,其具体为,对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理,以令所述至少一个图像块的像素点被分为第一类型像素点或第二类型像素点;Perform at least one image block threshold segmentation process on the first blackboard image; wherein the threshold segmentation process of the image block is specifically performing pixel threshold segmentation on at least one image block of the first blackboard image Processing, so that the pixels of the at least one image block are divided into first type pixels or second type pixels;
判断出所述第一黑板图像的像素点被分为第一类型像素点的次数处于第一 阈值范围内,则将该像素点作为目标像素点;It is determined that the number of times the pixels of the first blackboard image are classified into the first type of pixels is within the first threshold range, then the pixel is taken as the target pixel;
利用所述目标像素点,从所述第一黑板图像中提取出目标图像。Using the target pixels, a target image is extracted from the first blackboard image.
可选地,所述至少一次图像块的阈值分割处理,其具体为:至少两次图像块的阈值分割处理;Optionally, the threshold segmentation processing of the image block at least once is specifically: the threshold segmentation processing of the image block at least twice;
所述至少两次图像块的阈值分割处理中每一次图像块的阈值分割处理所采用的图像块的属性不相同,所述属性包括个数、尺寸、形状和/或图像块的选取位置。In the threshold segmentation processing of the at least two image blocks, the attributes of the image blocks used in the threshold segmentation processing of each image block are different, and the attributes include the number, size, shape, and/or selection position of the image block.
可选地,所述图像块的个数为至少两个,所述至少两个图像块是通过对所述第一黑板图像进行平均划分后得到。Optionally, the number of the image blocks is at least two, and the at least two image blocks are obtained by evenly dividing the first blackboard image.
可选地,所述对所述第一黑板图像进行像素点的阈值分割处理这一步骤中所采用的阈值分割算法为全局阈值分割算法,和/或,所述对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理这一步骤中所采用的阈值分割算法为全局阈值分割算法。Optionally, the threshold segmentation algorithm used in the step of performing pixel threshold segmentation processing on the first blackboard image is a global threshold segmentation algorithm, and/or the threshold segmentation algorithm for the first blackboard image The threshold segmentation algorithm used in the step of threshold segmentation processing for at least one image block is a global threshold segmentation algorithm.
可选地,所述对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点这一步骤,其包括:Optionally, the step of performing threshold segmentation processing on pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels, It includes:
对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点后,将所述第一类型像素点置为白色像素点,将所述第二类型像素点置为黑色像素点,从而得到第二黑板图像。Perform threshold segmentation processing on the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels, and then the first type pixels Set as white pixels, and set the second type of pixels as black pixels, thereby obtaining a second blackboard image.
可选地,所述对所述第一黑板图像进行至少一次图像块的阈值分割处理这一步骤,其包括:Optionally, the step of performing image block threshold segmentation processing at least once on the first blackboard image includes:
对所述第一黑板图像进行至少一次图像块的阈值分割处理和二值化处理后,得到至少一个第三黑板图像;After performing at least one image block threshold segmentation process and binarization process on the first blackboard image, at least one third blackboard image is obtained;
其中,所述图像块的阈值分割处理和二值化处理,其包括:Wherein, the threshold segmentation processing and binarization processing of the image block include:
对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理,以令所述至少一个图像块的像素点被分为第一类型像素点或第二类型像素点后,将所述第一类型像素点置为白色像素点,将所述第二类型像素点置为黑色像素点,从而得到第三黑板图像。Perform pixel threshold segmentation processing on at least one image block of the first blackboard image, so that the pixels of the at least one image block are divided into the first type of pixel or the second type of pixel, and then the The pixels of the first type are set as white pixels, and the pixels of the second type are set as black pixels, thereby obtaining a third blackboard image.
可选地,所述判断出所述第一黑板图像的像素点被分为第一类型像素点的次数处于第一阈值范围内,则将该像素点作为目标像素点这一步骤,其包括:Optionally, the step of determining that the number of times that the pixel of the first blackboard image is classified into the first type of pixel is within a first threshold range, then the step of using the pixel as a target pixel includes:
将所述第二黑板图像和所述至少一个第三黑板图像进行求和处理后,得到第四黑板图像后,判断出第四黑板图像的像素点的像素值处于第二阈值范围内,则将该像素点作为目标像素点;After the second blackboard image and the at least one third blackboard image are summed to obtain the fourth blackboard image, it is determined that the pixel value of the fourth blackboard image is within the second threshold range, then the This pixel is regarded as the target pixel;
其中,所述第二阈值范围是根据第一阈值范围来确定得出。Wherein, the second threshold value range is determined according to the first threshold value range.
另一方面,本发明实施例还提供了一种图像处理系统,包括:On the other hand, an embodiment of the present invention also provides an image processing system, including:
第一获取单元,设置为获取第一黑板图像;The first acquiring unit is configured to acquire the first blackboard image;
第一处理单元,设置为对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点;A first processing unit, configured to perform threshold segmentation processing on pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first-type pixels or second-type pixels;
第二处理单元,设置为对所述第一黑板图像进行至少一次图像块的阈值分割处理;其中,所述图像块的阈值分割处理,其具体为,对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理,以令所述至少一个图像块的像素点被分为第一类型像素点或第二类型像素点;The second processing unit is configured to perform threshold segmentation processing of image blocks at least once on the first blackboard image; wherein the threshold segmentation processing of the image blocks is specifically: performing at least one image of the first blackboard image Performing threshold segmentation processing of pixels on the block, so that the pixels of the at least one image block are divided into first type pixels or second type pixels;
第三处理单元,设置为判断出所述第一黑板图像的像素点被分为第一类型像素点的次数处于第一阈值范围内,则将该像素点作为目标像素点;The third processing unit is configured to determine that the number of times that the pixels of the first blackboard image are divided into the first type of pixels is within a first threshold range, and then the pixels are used as target pixels;
第四处理单元,设置为利用所述目标像素点,从所述第一黑板图像中提取出目标图像。The fourth processing unit is configured to extract a target image from the first blackboard image by using the target pixel.
再一方面,本发明实施例还提供了一种图像处理装置,该装置包括:In another aspect, an embodiment of the present invention also provides an image processing device, which includes:
至少一个处理器;At least one processor;
至少一个存储器,用于存储至少一个程序;At least one memory for storing at least one program;
当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现所述的图像处理方法。When the at least one program is executed by the at least one processor, the at least one processor implements the image processing method.
再一方面,本发明实施例还提供了一种存储介质,其中存储有处理器可执行的指令,所述处理器可执行的指令在由处理器执行时用于执行所述的图像处理方法。In another aspect, an embodiment of the present invention also provides a storage medium in which instructions executable by a processor are stored, and the instructions executable by the processor are used to execute the image processing method when executed by the processor.
再一方面,本发明实施例提供了一种黑板装置,包括黑板、摄像头以及与所述摄像头连接的终端设备;In another aspect, an embodiment of the present invention provides a blackboard device, including a blackboard, a camera, and a terminal device connected to the camera;
所述摄像头用于对黑板进行拍摄;The camera is used to photograph the blackboard;
所述终端设备包括:The terminal equipment includes:
至少一个处理器;At least one processor;
至少一个存储器,用于存储至少一个程序;At least one memory for storing at least one program;
当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理 器实现所述的图像处理方法。When the at least one program is executed by the at least one processor, the at least one processor implements the image processing method.
上述本发明实施例中的一个或多个技术方案具有如下优点:本发明实施例通过对第一黑板图像进行像素点的阈值分割处理,以及对第一黑板图像中每个图像块分别进行像素点的阈值分割处理,从而能够根据像素点被分为第一类型像素点的次数来确定该像素点是否为目标像素点,可见,本发明实施例具有局部阈值分割效果的同时,利用像素点被分为第一类型像素点的次数来确定目标像素点,这样相较于传统方案,能有效地解决图像反光问题,极大地提高了从黑板图像中提取目标图像的准确率。One or more technical solutions in the above-mentioned embodiments of the present invention have the following advantages: the embodiment of the present invention performs threshold segmentation processing on the first blackboard image and performs pixel points on each image block in the first blackboard image. According to the threshold segmentation processing, it is possible to determine whether the pixel is the target pixel according to the number of times the pixel is divided into the first type of pixel. It can be seen that the embodiment of the present invention has the effect of local threshold segmentation, and the pixel is divided The target pixel is determined for the number of times of the first type of pixel. Compared with the traditional solution, this can effectively solve the problem of image reflection and greatly improve the accuracy of extracting the target image from the blackboard image.
附图说明Description of the drawings
图1是本发明实施例一种图像处理方法的第一具体实施例步骤流程图;Fig. 1 is a flowchart of steps in a first specific embodiment of an image processing method according to an embodiment of the present invention;
图2是利用传统局部阈值分割算法对图形进行分割后得到的图像示意图;Figure 2 is a schematic diagram of an image obtained after a graph is segmented using a traditional local threshold segmentation algorithm;
图3是本发明实施例一种图像处理方法的第二具体实施例步骤流程图;3 is a flowchart of steps in a second specific embodiment of an image processing method according to an embodiment of the present invention;
图4是本发明实施例一种图像处理系统的一具体实施例结构框图;4 is a block diagram of a specific embodiment of an image processing system according to an embodiment of the present invention;
图5是本发明实施例一种图像处理装置的一具体实施例结构框图;5 is a block diagram of a specific embodiment of an image processing apparatus according to an embodiment of the present invention;
图6是本发明实施例一种黑板装置的一具体实施例结构框图。Fig. 6 is a structural block diagram of a specific embodiment of a blackboard device according to an embodiment of the present invention.
具体实施方式detailed description
下面结合附图和具体实施例对本申请做进一步的详细说明。对于以下实施例中的步骤编号,其仅为了便于阐述说明而设置,对步骤之间的顺序不做任何限定,实施例中的各步骤的执行顺序均可根据本领域技术人员的理解来进行适应性调整。此外,以下实施例中所提及到的“上”、“下”、“左”、“右”、“前”、“后”仅为了清楚描述位置关系,为相对位置关系,而并不是绝对位置关系,可根据本领域技术人员的理解来进行适应性调整。The application will be further described in detail below with reference to the drawings and specific embodiments. For the step numbers in the following embodiments, they are set only for ease of elaboration, and there is no limitation on the order between the steps. The execution order of the steps in the embodiments can be adapted according to the understanding of those skilled in the art. Sexual adjustment. In addition, the "up", "down", "left", "right", "front", and "rear" mentioned in the following embodiments are only used to clearly describe the positional relationship, and are relative positional relationships, not absolute The position relationship can be adjusted adaptively according to the understanding of those skilled in the art.
本发明实施例所提供的图像处理方案可适用于智能黑板场景中,以实现从黑板图像中提取出目标对象(如黑板上的笔迹)。对于所述智能黑板场景,其主要包括有一黑板装置,所述黑板装置包括有黑板、摄像头及与摄像头连接的终端设备,其中,所述摄像头可设置在黑板上且用于对黑板进行拍摄,所述终端设备则主要用于对摄像头拍摄得到的黑板图像进行图像处理,以实现黑板图像的显示、记录等操作。通常,在对黑板图像进行显示、记录等处理的过程中,会需要对黑板图像上的笔迹进行识别,而为了能够很好地对黑板图像上的笔迹 进行识别,应可选先从黑板图像中提取出作为黑板图像前景的笔迹图像(即目标图像)后,再对笔迹进行识别、调整等处理。因此由此可见,一种从黑板图像中提取笔迹图像(即目标图像)的方案在智能黑板场景中是非常重要环节之一。The image processing solution provided by the embodiment of the present invention can be applied to a smart blackboard scene, so as to extract a target object (such as handwriting on the blackboard) from the blackboard image. For the smart blackboard scene, it mainly includes a blackboard device. The blackboard device includes a blackboard, a camera, and a terminal device connected to the camera. The camera can be set on the blackboard and used to photograph the blackboard. The terminal device is mainly used to perform image processing on the blackboard image taken by the camera, so as to realize the operation of displaying and recording the blackboard image. Usually, in the process of displaying and recording the blackboard image, it is necessary to recognize the handwriting on the blackboard image. In order to be able to recognize the handwriting on the blackboard image well, you should choose to start from the blackboard image After extracting the handwriting image (that is, the target image) as the foreground of the blackboard image, the handwriting is recognized and adjusted. Therefore, it can be seen that a solution for extracting handwriting images (ie target images) from blackboard images is one of the very important links in the smart blackboard scene.
基于此,本发明实施例提供了一种图像处理方法,以用于从黑板图像中提取出目标图像,如图1所示,包括的步骤如下所示。Based on this, an embodiment of the present invention provides an image processing method for extracting a target image from a blackboard image, as shown in FIG. 1, and the steps involved are as follows.
S101、获取第一黑板图像。S101. Acquire a first blackboard image.
一实施例中,对于所述第一黑板图像,其可直接为摄像头拍摄得到的原始黑板图像,也可以为对摄像头拍摄得到的原始黑板图像进行图像预处理后得到的黑板图像(其中,所述的图像预处理可包括但不限于有图像滤波、去躁、形态学图像处理等),前者具有步骤简易、处理效率高的优点,而后者则具有令识别准确度提高的优点,亦可以为对摄像头拍摄得到的原始黑板图像进行目标对象所处的图像区域粗定位后,将定位得出的图像区域作为所述第一黑板图像,这样不仅能提高处理效率且还能提高准确率。因此,对于获取何种黑板图像来作为所述第一黑板图像,这可根据实际情况来进行设置选取,此处并不做过多限定。In an embodiment, for the first blackboard image, it may be directly the original blackboard image captured by a camera, or it may be a blackboard image obtained after image preprocessing is performed on the original blackboard image captured by the camera (wherein, the The image preprocessing can include, but is not limited to, image filtering, de-manipulation, morphological image processing, etc.). The former has the advantages of simple steps and high processing efficiency, while the latter has the advantages of improving recognition accuracy. After the original blackboard image captured by the camera is roughly positioned in the image area where the target object is located, the image area obtained by the positioning is used as the first blackboard image, which not only improves processing efficiency but also improves accuracy. Therefore, as to which blackboard image is acquired as the first blackboard image, this can be set and selected according to the actual situation, and there is no excessive limitation here.
S102、对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点。而执行此步骤,即相当于所述第一黑板图像中的相应像素点被执行了一次像素点类型的划分处理,若像素点被分为第一类型像素点,此时像素点被分为第一类型像素点的次数加1,若像素点被分为第二类型像素点,此时像素点被分为第二类型像素点的次数为1。S102: Perform threshold segmentation processing on pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels. Performing this step is equivalent to that the corresponding pixel in the first blackboard image has been subjected to a pixel type division process. If the pixel is divided into the first type of pixel, then the pixel is divided into the first type of pixel. The number of times of a type of pixel is increased by 1. If the pixel is classified into a second type of pixel, the number of times the pixel is classified into a second type of pixel is 1.
在本实施例中,对于所述的阈值分割处理,其具体的处理步骤为,通过特征阈值,对图像中的像素点逐一进行阈值判断,从而根据判断结果,将图像中的像素点划分为至少两种类型的像素点。例如,某一像素点i处于A类型像素点所对应的阈值范围内时,则将该像素点i被分为A类型像素点。而对于所述特征阈值中所述的特征,其指的是图像的特征,例如图像的灰度、彩色等特征,因此,若被执行阈值分割处理的图像不同的时候,得到的特征阈值也不一定会相同,而具体如何获得所述特征阈值,其会根据采用的算法不同而有所不同,其中,所述特征阈值的获取方法包括但不限于有最大类间方差算法(如大津算法)、最大方差阈值算法、双峰选择阈值算法等,此处不做过多限定。可见, 对于所述对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点这一步骤,其为,根据第一黑板图像的特征阈值,从而对第一黑板图像中的像素点进行阈值判断,根据判断结果,将第一黑板图像中的像素点划分为第一类型像素点或第二类型像素点。In this embodiment, for the threshold segmentation process, the specific processing steps are: threshold judgment is performed on the pixel points in the image one by one through the feature threshold, so that according to the judgment result, the pixel points in the image are divided into at least Two types of pixels. For example, when a certain pixel point i is within the threshold range corresponding to the type A pixel point, the pixel point i is classified as the type A pixel point. As for the feature mentioned in the feature threshold, it refers to the feature of the image, such as the grayscale and color of the image. Therefore, if the image subjected to the threshold segmentation process is different, the obtained feature threshold is also different. It must be the same, and how to obtain the feature threshold will vary according to the algorithm used. The method for obtaining the feature threshold includes, but is not limited to, algorithms with the largest inter-class variance (such as the Otsu algorithm), The maximum variance threshold algorithm, the bimodal selection threshold algorithm, etc., are not too limited here. It can be seen that, for the step of performing the threshold segmentation processing on the pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into the first type of pixels or the second type of pixels, the In order to threshold the pixels in the first blackboard image according to the characteristic threshold of the first blackboard image, and divide the pixels in the first blackboard image into the first type of pixels or the second type of pixels according to the judgment result point.
此外,对于所述第一类型像素点,其实质为目标类型像素点,而所述图像的所有像素点中,除第一类型像素点外的像素点均为第二类型像素点,例如,一共有三个阈值范围,分别为阈值范围1、阈值范围2、阈值范围3,通过这三个阈值范围可将图像中的像素点分为三种类型的像素点,而像素值落入阈值范围1中的像素点为类型1像素点,像素值落入阈值范围2的像素点为类型2像素点,像素值落入阈值范围3的像素点则为类型3像素点,若,类型1像素点为目标类型像素点,那么类型1像素点为第一类型像素点,而类型2像素点和类型3像素点均属于第二类型像素点,若类型1像素点和类型3像素点为目标类型像素点,那么类型1像素点和类型3像素点为第一类型像素点,而类型2像素点则为第二类型像素点。若所需划分的像素点类型数量更多时,则如此类推。In addition, for the first type of pixel, it is essentially the target type of pixel, and among all the pixels of the image, except for the first type of pixel, the pixel is the second type of pixel, for example, a total of There are three threshold ranges, namely Threshold Range 1, Threshold Range 2, and Threshold Range 3. Through these three threshold ranges, the pixels in the image can be divided into three types of pixels, and the pixel values fall into Threshold Range 1. The pixels in are type 1 pixels, the pixels whose pixel values fall within the threshold range 2 are type 2 pixels, and the pixels whose pixel values fall within the threshold range 3 are type 3 pixels. If the type 1 pixel is Target type pixels, then type 1 pixels are the first type pixels, and type 2 pixels and type 3 pixels belong to the second type pixels, if type 1 pixels and type 3 pixels are the target type pixels , Then type 1 pixel and type 3 pixel are the first type pixel, and type 2 pixel is the second type pixel. If the number of pixel types to be divided is more, the same is true.
S103、对所述第一黑板图像进行至少一次图像块的阈值分割处理;其中,所述图像块的阈值分割处理,其具体为,对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理,以令所述至少一个图像块的像素点被分为第一类型像素点或第二类型像素点。对于此步骤中所述的阈值分割处理、第一类型像素点和第二类型像素点,它们与上述步骤S102的解析定义相同。S103. Perform at least one image block threshold segmentation process on the first blackboard image; wherein the threshold segmentation process of the image block is specifically: performing pixel point segmentation on at least one image block of the first blackboard image. Threshold segmentation processing, so that the pixels of the at least one image block are divided into first type pixels or second type pixels. Regarding the threshold segmentation process, the first type pixel point, and the second type pixel point described in this step, they are the same as the analytical definition of the above step S102.
一实施例中,本步骤主要是对第一黑板图像中的至少一个图像块进行阈值分割处理,也就是说,在此步骤中,被执行阈值分割处理的对象为第一黑板图像中的图像块,因此此时,对应图像块的特征阈值会与对应第一黑板图像的特质阈值不相同(当然也可能存在对应图像块的特征阈值与对应第一黑板图像的特征阈值相同的情况),即此时像素点的类型划分情况会有所不同。In one embodiment, this step is mainly to perform threshold segmentation processing on at least one image block in the first blackboard image, that is, in this step, the object to be subjected to threshold segmentation processing is the image block in the first blackboard image Therefore, at this time, the characteristic threshold of the corresponding image block will be different from the characteristic threshold of the corresponding first blackboard image (of course, there may also be the case where the characteristic threshold of the corresponding image block is the same as the characteristic threshold of the corresponding first blackboard image), that is, this The type of pixel points will be different.
此外,对于所述至少一次图像块的阈值分割处理,当执行一次图像块的阈值分割处理,若图像块中的像素点(其实质亦为第一黑板图像中的像素点)被分为第一类型像素点,此时该像素点被分为第一类型像素点的次数加1,若图像块中的像素点被分为第二类型像素点,此时该像素点被分为第二类型像素点的次数加1。因此,若在执行所述步骤S102后,第一黑板图像中的像素点i被分 为第一类型像素点,在执行所述步骤S103后(假设此时所述至少一次图像块的阈值分割处理具体为3次图像块的阈值分割处理),判断出像素点i在这3次图像块的阈值分割处理过程中,均被分为第一类型像素点,此时,像素点i被分为第一类型像素点的次数则为4。而对于第一黑板图像中的图像块,其从第一黑板图像中的选取获取方式可根据实际情况选取,而每一个执行图像块的阈值分割处理时,图像块的选取获取方式可均相同、不完全相同或完全不相同,例如,第一黑板图像中只有1处图像区域是存有反光情况的,那么则可将该处图像区域选取出作为所述的图像块,然后对所述图像块进行阈值分割处理,然后执行其余次数的图像块阈值分割处理时,所述图像块的选择获取位置、尺寸、形状可以进行调整,例如,相较于第1次获取的图像块,第2次、第3次和/或第4次图像块的选择获取位置可以上/下/左/右移动相应的距离,或者,图像块的尺寸或形状做调整,如尺寸变大或变小,形状从正方形或矩形变为圆形或不规则形状等。若图像块的选取获取方式不变,那么所述图像块的阈值分割处理的执行次数为1亦可。通常,黑板图像上存有反光情况的区域是随机变化,因此,存有反光情况的区域会比较难以确定,此时,所述图像块的个数应可选为多个,而所述多个图像块在第一黑板图像上的提取位置则尽量平均设在第一黑板图像的各处,更进一步地,所述多个图像块优选通过对第一黑板图像进行划分后而得到的,此时,对第一黑板图像进行图像区域划分,划分后得到的图像区域则相当于图像块。可见,对于所述步骤S103,其则相当于对第一黑板图像进行局部阈值分割处理。In addition, for the threshold segmentation processing of the image block at least once, when the threshold segmentation processing of the image block is performed once, if the pixels in the image block (which are essentially the pixels in the first blackboard image) are divided into first Type pixel, the number of times that the pixel is divided into the first type pixel is increased by 1. If the pixel in the image block is divided into the second type pixel, then the pixel is divided into the second type pixel Increase the number of points by 1. Therefore, if the pixel i in the first blackboard image is divided into the first type of pixel after the step S102 is performed, after the step S103 is performed (assuming that the threshold segmentation process of the image block is performed at least once at this time) Specifically, it is the threshold segmentation processing of the image block for three times), and it is determined that the pixel i is divided into the first type of pixel during the threshold segmentation processing of the three image blocks. At this time, the pixel i is divided into the first type of pixel. The number of pixels of a type is 4. As for the image blocks in the first blackboard image, the selection and acquisition methods from the first blackboard image can be selected according to the actual situation, and when the threshold segmentation processing of each image block is performed, the selection and acquisition methods of the image blocks can be the same. Not exactly the same or completely different. For example, in the first blackboard image, there is only one image area with light reflection, then this image area can be selected as the image block, and then the image block Perform threshold segmentation processing, and then perform the remaining times of image block threshold segmentation processing, the selected acquisition position, size, and shape of the image block can be adjusted, for example, compared to the image block acquired the first time, the second time, The selection and acquisition position of the 3rd and/or 4th image block can be moved up/down/left/right by the corresponding distance, or the size or shape of the image block can be adjusted, such as the size becomes larger or smaller, and the shape changes from square Or the rectangle becomes round or irregular. If the selection and acquisition method of the image block remains unchanged, the number of executions of the threshold segmentation processing of the image block may be 1. Generally, the area with reflections on the blackboard image changes randomly. Therefore, it is difficult to determine the area with reflections. In this case, the number of image blocks should be selected as multiple, and the multiple The extraction positions of the image blocks on the first blackboard image are set as evenly as possible everywhere in the first blackboard image. Furthermore, the multiple image blocks are preferably obtained by dividing the first blackboard image. In this case, , The first blackboard image is divided into image regions, and the image regions obtained after the division are equivalent to image blocks. It can be seen that, for the step S103, it is equivalent to performing local threshold segmentation processing on the first blackboard image.
对于步骤S102和步骤S103,两者之间的执行顺序可互换,即先执行步骤S103后再执行步骤S102亦可。For step S102 and step S103, the execution order between the two can be interchanged, that is, step S103 is executed first and then step S102 is executed.
S104、判断出所述第一黑板图像的像素点被分为第一类型像素点的次数处于第一阈值范围内,则将该像素点作为目标像素点。S104. It is determined that the number of times that the pixel of the first blackboard image is divided into the first type of pixel is within a first threshold range, and the pixel is taken as a target pixel.
一实施例中,经过上述步骤S102和S103处理后,对第一黑板图像中的像素点被分为第一类型像素点的次数进行统计,然后对统计出的次数进行阈值判断,判断该次数是否落入第一阈值范围内,若是,则表示该像素点为目标像素点。例如,若像素点i总共被执行了3次类型划分处理(所述类型划分处理即为将像素点i划分为第一类型像素点或第二类型像素点的处理),此时,若像素点i被分为第一类型像素点的次数大于等于一预设阈值(如2)时,即落入所述第一阈值范围内时,则表示该像素点i为目标像素点。其中,对于所述第一阈值范 围,其可为经验数值范围,亦可根据像素点被执行类型划分处理的总次数来确定得出,并且所述第一阈值范围的下限可选为像素点被执行类型划分处理的总次数的一半以上,即令所述第一阈值范围为[a,b],其中,a=c*d,c表示为所述第一黑板图像的像素点被执行类型划分处理的总次数,d表示为百分比,d大于等于50%;b表示为大于等于c的数值。当然,令d小于50%亦可,但令d大于等于50%,目标像素点的判断准确率会更高,适用于外在环境因素不理想的场景中。In an embodiment, after the above-mentioned steps S102 and S103 are processed, the number of times the pixels in the first blackboard image are classified into the first type of pixels is counted, and then the counted times are thresholded to determine whether the times are If it falls within the first threshold range, it means that the pixel is the target pixel. For example, if the pixel point i has been subjected to a total of 3 types of classification processing (the type classification processing is the processing of dividing the pixel point i into a first type pixel point or a second type pixel point), at this time, if the pixel point When the number of times i is divided into the first type pixel is greater than or equal to a preset threshold (such as 2), that is, when it falls within the first threshold range, it means that the pixel i is the target pixel. Wherein, for the first threshold range, it can be an empirical value range, or it can be determined according to the total number of times that the pixel is subjected to type division processing, and the lower limit of the first threshold range can be selected as the pixel More than half of the total number of times of performing type division processing, that is, let the first threshold range be [a, b], where a=c*d, and c means that the pixels of the first blackboard image are executed type division processing The total number of times, d is expressed as a percentage, d is greater than or equal to 50%; b is expressed as a value greater than or equal to c. Of course, it is also possible to set d to be less than 50%, but if d is greater than or equal to 50%, the judgment accuracy of the target pixel will be higher, which is suitable for scenes with unsatisfactory external environmental factors.
S105、利用所述目标像素点,从所述第一黑板图像中提取出目标图像。若目标像素点对应的是黑板图像的前景,即笔迹,那么所述提取出的目标图像则为前景图像,若目标像素点对应的是黑板图像的背景,那么所述提取出的目标图像则为背景图像。S105. Using the target pixels, extract a target image from the first blackboard image. If the target pixel corresponds to the foreground of the blackboard image, that is, the handwriting, then the extracted target image is the foreground image. If the target pixel corresponds to the background of the blackboard image, then the extracted target image is Background image.
可见,通过采用上述本发明实施例的图像处理方法,先对黑板图像进行整幅图像的阈值分割处理后将第一黑板图像的像素点分为第一类型像素点或第二类型像素点,接着再对黑板图像的图像块进行阈值分割处理后将图像块的像素点分为第一类型像素点或第二类型像素点,以达到对黑板图像进行局部阈值分割的效果,接着再通过对像素点被分为第一类型像素点的次数进行阈值判断,以确定出目标像素点,这样利用确定出的目标像素点从第一黑板图像中提取对应的图像,即目标图像,其有效性和准确性高,而且可以解决图像存有反光情况而导致将前景判为背景的问题。It can be seen that by using the image processing method of the above embodiment of the present invention, the blackboard image is first subjected to the threshold segmentation processing of the entire image, and then the pixels of the first blackboard image are divided into the first type of pixels or the second type of pixels, and then After threshold segmentation is performed on the image block of the blackboard image, the pixels of the image block are divided into the first type pixel point or the second type pixel point to achieve the effect of local threshold segmentation of the blackboard image, and then pass the pixel point The number of times that pixels are classified into the first type is thresholded to determine the target pixel. In this way, the determined target pixel is used to extract the corresponding image from the first blackboard image, that is, the target image. Its validity and accuracy High, and it can solve the problem of judging the foreground as the background due to the reflection of the image.
在一可选实施例中,所述至少一次图像块的阈值分割处理,其具体为:至少两次图像块的阈值分割处理;所述至少两次图像块的阈值分割处理中每一次图像块的阈值分割处理所采用的图像块的属性不相同,所述属性包括个数、尺寸、形状和/或图像块的选取位置。其中,所述的不相同表示为完全不相同或部分不相同。In an optional embodiment, the at least one image block threshold segmentation process is specifically: at least two image block threshold segmentation processes; each of the at least two image block threshold segmentation processes The attributes of the image blocks used in the threshold segmentation process are different, and the attributes include the number, size, shape, and/or selection position of the image block. Wherein, the difference means completely different or partly different.
在本实施例中,图像块的阈值分割处理这一步骤被执行的次数为至少两次,并且每一次处理中,图像块的属性参数不相同(即表示,每次执行图像块的阈值分割处理时,图像块的选取提取方式有所调整),这样则表示了每一次进行图像块的阈值分割处理时,对于对同一个像素点的阈值判断,其所利用的特征阈值每一次会不尽相同,相当于所利用的特征阈值是随机变化的,可见,在这样的情况下,通过对像素点被分为第一类型像素点的次数进行统计和阈值判断,能进一步地提高目标像素点的确认准确率,从而提高目标提取的准确性和有效 率。In this embodiment, the step of image block threshold segmentation processing is performed at least twice, and in each processing, the attribute parameters of the image block are not the same (that is, each time the image block threshold segmentation processing is performed When the image block selection and extraction method has been adjusted), this means that each time the threshold segmentation process of the image block is performed, for the threshold judgment of the same pixel, the characteristic threshold used will be different each time , Which is equivalent to the feature threshold value used is randomly changed. It can be seen that in this case, by counting the number of times the pixel is divided into the first type of pixel and the threshold judgment, the confirmation of the target pixel can be further improved Accuracy, thereby improving the accuracy and efficiency of target extraction.
而且重要的是,令每次图像块的阈值分割处理中所采用的图像块的属性不相同,能够解决传统局部阈值分割方法无法很好对被填充后的图形(例如“▆”、“●”、“◆”等)进行前景分割的问题,因为,所述传统局部阈值分割方法的思路是对每一个像素确定一个邻域后,在这个邻域内选择一个最优阈值,从而利用此最优阈值来对该像素进行判断,以实现图像分割,那么若所选邻域的区域的尺寸太小,无法覆盖住整个图形,而是位于所述图形的内部,那么则会出现将所述图形中的某部分被分割为背景图像的情况,例如如图2所示,对于被填充后的菱形图形,因邻域的区域的尺寸太小而导致阈值分割后,菱形图形中的一部分被划分为背景部分,即图形中的空白部分。而通过使用本实施例的方法,由于每次图像块的阈值分割处理中,图像块的属性会不同,从而令特征阈值会随机变化,这样即使其中1、2次属于前景的像素点被判断为背景的像素点,但只要该像素点有3次或以上(例如该像素点一共进行了5次的类型划分处理)被判断为前景的像素点,那么该像素点最终还是会被判断为前景的像素点。由此可得,通过使用本实施例的方法来实现目标图像的提取,其准确有效性得到进一步的提高,并且能解决传统局部阈值分割方法容易将填充图形的部分区域被判断为背景图像的问题,即解决传统局部阈值分割方法无法处理好将当前邻域划入全局前景还是全局背景的问题。Moreover, it is important to make the attributes of the image blocks used in the threshold segmentation processing of each image block different, which can solve the problem that the traditional local threshold segmentation method cannot perform well on the filled graphics (such as "▆", "●" , "◆", etc.) for foreground segmentation, because the traditional local threshold segmentation method is based on the idea of determining a neighborhood for each pixel, and then selecting an optimal threshold in this neighborhood to use this optimal threshold To judge the pixel to achieve image segmentation, then if the size of the selected neighborhood area is too small to cover the entire graph, but is located inside the graph, then there will be When a certain part is segmented into a background image, for example, as shown in Figure 2, for a filled diamond shape, the size of the neighborhood area is too small, resulting in threshold segmentation, and a part of the diamond shape is divided into the background part , Which is the blank part of the graph. By using the method of this embodiment, since each image block threshold segmentation process, the attributes of the image block will be different, so that the characteristic threshold will change randomly, so that even if one or two of the pixels belonging to the foreground are judged as The background pixel, but as long as the pixel is judged as the foreground pixel 3 or more times (for example, the pixel has undergone a total of 5 types of classification processing), then the pixel will eventually be judged as the foreground pixel pixel. It can be seen that by using the method of this embodiment to achieve the extraction of the target image, its accuracy and effectiveness are further improved, and it can solve the problem that the traditional local threshold segmentation method is easy to judge the partial area of the filled figure as the background image. , That is, to solve the problem that the traditional local threshold segmentation method cannot handle the problem of whether the current neighborhood is divided into the global foreground or the global background.
在一可选实施例中,所述图像块的个数为至少两个,所述至少两个图像块是通过对所述第一黑板图像进行平均划分后得到。由于黑板上所书写的笔迹可能会遍布黑板上,有反光情况的图像区域和/或填充图形所处的图像区域是难以确定的,因此,为了能够更好地适应于黑板场景,利用平均划分的方式来获得至少两个图像块,这样能够好地对黑板图像进行前景笔迹的获取。而且以平均方式的划分来获得图像块,能够减少程序设计工作量,利用工作人员的设计、修改和调整。In an optional embodiment, the number of the image blocks is at least two, and the at least two image blocks are obtained by evenly dividing the first blackboard image. Since the handwriting written on the blackboard may spread all over the blackboard, it is difficult to determine the image area with reflective image area and/or the image area where the filled figure is located. Therefore, in order to better adapt to the blackboard scene, use the even division Way to obtain at least two image blocks, so that the foreground handwriting of the blackboard image can be obtained well. Moreover, the image blocks are obtained by dividing in an average manner, which can reduce the workload of program design and utilize the design, modification and adjustment of the staff.
在一可选实施例中,所述对所述第一黑板图像进行像素点的阈值分割处理这一步骤中所采用的阈值分割算法为全局阈值分割算法,和/或,所述对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理这一步骤中所采用的阈值分割算法为全局阈值分割算法。即相当于,所述对所述第一黑板图像进行像素点的阈值分割处理这一步骤,其具体为,利用第一阈值分割算法来对所述第一黑板图像进行像素点的阈值分割处理;所述对所述第一黑板图像的至少一 个图像块进行像素点的阈值分割处理这一步骤,其具体为,利用第二阈值分割算法来对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理;其中,所述第一阈值分割算法和/或第二阈值分割算法为全局阈值分割算法。由于本实施例中,所述第一阈值分割算法和/或第二阈值分割算法采用全局阈值分割算法,因此能够进一步减少传统局部阈值分割算法所产生的容易将填充图形的部分区域被判断为背景图像的问题,令前景图像和背景图像的分割准确度得到保证。In an optional embodiment, the threshold segmentation algorithm used in the step of performing pixel threshold segmentation processing on the first blackboard image is a global threshold segmentation algorithm, and/or, the first blackboard image The threshold segmentation algorithm used in the step of threshold segmentation processing for at least one image block of a blackboard image is a global threshold segmentation algorithm. That is equivalent to the step of performing pixel threshold segmentation processing on the first blackboard image, which specifically includes using a first threshold segmentation algorithm to perform pixel threshold segmentation processing on the first blackboard image; The step of performing pixel threshold segmentation processing on at least one image block of the first blackboard image specifically includes using a second threshold segmentation algorithm to perform pixel pixel processing on at least one image block of the first blackboard image. Point threshold segmentation processing; wherein the first threshold segmentation algorithm and/or the second threshold segmentation algorithm are global threshold segmentation algorithms. Since in this embodiment, the first threshold segmentation algorithm and/or the second threshold segmentation algorithm adopts a global threshold segmentation algorithm, it can further reduce the traditional local threshold segmentation algorithm that can easily determine the partial area of the filled figure as a background. The problem of the image guarantees the accuracy of the segmentation of the foreground image and the background image.
在一可选实施例中,所述对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点这一步骤S102,其包括:In an optional embodiment, the threshold segmentation processing is performed on the pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into the first type of pixels or the second type of pixels This step S102 includes:
S1021、对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点后,将所述第一类型像素点置为白色像素点,将所述第二类型像素点置为黑色像素点,从而得到第二黑板图像。此时,所述第二黑板图像为第一黑板图像的二值化图像。S1021. Perform threshold segmentation processing on pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels, and then divide the first type The pixels are set as white pixels, and the second type pixels are set as black pixels, thereby obtaining a second blackboard image. At this time, the second blackboard image is a binarized image of the first blackboard image.
可见在本实施例中,所述步骤S1021是通过对所述第一黑板图像进行阈值分割处理和二值化处理这一手段来实现的,这不仅达到对所述第一黑板图像进行像素点的阈值分割处理的目的,并且还实现了对被分为第一类型的像素点标记为255或1(即将第一类型的像素点置为白色像素点),对被分为第二类型的像素点标记为0(即所述第二类型像素点置为黑色像素点),这样通过像素点二值化后的像素值,便能便于后续对像素点被分为第一类型像素点的次数的统计。其中需要说明的是,在整数表示的颜色空间中,像素值数值范围是0~255,此时白色像素点所对应的像素值为255;而在浮点数表示的颜色空间中,像素值数值范围则是0~1,此时白色像素点所对应的像素值为1。而为了可快速进行次数的统计且减少计算量,则应可选采用像素值为1来表示白色像素点,即选择以浮点数来表示图像的颜色空间,这样当判断出所述第一黑板图像的二值化图像中的像素点的像素值为1时,则表示在当前二值化图像中,该像素点被分为第一类型像素点,即前景像素点,同时表示了对该像素点被分为第一类型像素点的次数加1。It can be seen that in this embodiment, the step S1021 is implemented by performing threshold segmentation processing and binarization processing on the first blackboard image, which not only achieves the pixel processing of the first blackboard image The purpose of threshold segmentation is to mark the pixels classified as the first type as 255 or 1 (that is, the pixels of the first type are set as white pixels), and for the pixels classified as the second type Marked as 0 (that is, the second type of pixel is set as a black pixel), so that the pixel value after the pixel binarization can facilitate the subsequent statistics of the number of times the pixel is divided into the first type of pixel . It should be noted that in the color space represented by integers, the pixel value range is 0 to 255, and the pixel value corresponding to the white pixel is 255; while in the color space represented by floating point numbers, the pixel value range It is 0 to 1, and the pixel value corresponding to the white pixel is 1. In order to quickly count the number of times and reduce the amount of calculation, the pixel value 1 should be selected to represent the white pixels, that is, the color space of the image should be represented by a floating point number, so that when the first blackboard image is determined When the pixel value of the pixel in the binarized image is 1, it means that in the current binarized image, the pixel is divided into the first type of pixel, that is, the foreground pixel, which also indicates the pixel The number of times the pixels are classified into the first type plus one.
在一可选实施例中,所述对所述第一黑板图像进行至少一次图像块的阈值分割处理这一步骤S103,其包括:In an optional embodiment, the step S103 of performing image block threshold segmentation processing on the first blackboard image at least once includes:
S1031、对所述第一黑板图像进行至少一次图像块的阈值分割处理和二值化 处理后,得到至少一个第三黑板图像。S1031, after performing at least one image block threshold segmentation process and binarization process on the first blackboard image, at least one third blackboard image is obtained.
所述图像块的阈值分割处理和二值化处理,其包括:The threshold segmentation processing and binarization processing of the image block include:
对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理,以令所述至少一个图像块的像素点被分为第一类型像素点或第二类型像素点后,将所述第一类型像素点置为白色像素点,将所述第二类型像素点置为黑色像素点,从而得到第三黑板图像。Perform pixel threshold segmentation processing on at least one image block of the first blackboard image, so that the pixels of the at least one image block are divided into the first type of pixel or the second type of pixel, and then the The pixels of the first type are set as white pixels, and the pixels of the second type are set as black pixels, thereby obtaining a third blackboard image.
可见在本实施例中,上述步骤S1031是通过对所述至少一个图像块进行阈值分割处理和二值化处理这一手段来实现的,这不仅达到对所述图像块进行像素点的阈值分割处理的目的,并且还实现了对被分为第一类型的像素点标记为255或1(即将第一类型的像素点置为白色像素点),对被分为第二类型的像素点标记为0(即所述第二类型像素点置为黑色像素点),这样通过像素点二值化后的像素值,便能便于后续对像素点被分为第一类型像素点的次数的统计。同样可选地,应可选采用像素值为1来表示白色像素点,即选择以浮点数来表示图像的颜色空间,这样当判断出所述图像块的二值化图像中的像素点的像素值为1时,则表示在当前二值化图像中,该像素点被分为第一类型像素点,即前景像素点,同时表示了对该像素点被分为第一类型像素点的次数加1。It can be seen that in this embodiment, the above step S1031 is implemented by performing threshold segmentation processing and binarization processing on the at least one image block, which not only achieves the threshold segmentation processing of pixels on the image block It also realizes that the pixels classified into the first type are marked as 255 or 1 (that is, the pixels of the first type are set as white pixels), and the pixels classified as the second type are marked as 0 (That is, the second-type pixel is set as a black pixel). In this way, the pixel value after the pixel is binarized can facilitate subsequent statistics on the number of times the pixel is classified into the first-type pixel. Also optionally, a pixel value of 1 should be optionally used to represent white pixels, that is, a floating point number should be selected to represent the color space of the image, so that when the pixel in the binary image of the image block is determined When the value is 1, it means that in the current binarized image, the pixel is divided into the first type of pixel, that is, the foreground pixel, and it also indicates the number of times the pixel is divided into the first type of pixel plus 1.
在一可选实施例中,所述判断出所述第一黑板图像的像素点被分为第一类型像素点的次数处于第一阈值范围内,则将该像素点作为目标像素点这一步骤S104,其包括:In an optional embodiment, the step of determining that the number of times that the pixel of the first blackboard image is divided into the first type of pixel is within a first threshold range, then the pixel is used as the target pixel S104, which includes:
S1041、将所述第二黑板图像和所述至少一个第三黑板图像进行求和处理后,得到第四黑板图像后,判断出第四黑板图像的像素点的像素值处于第二阈值范围内,则将该像素点作为目标像素点。S1041, after the second blackboard image and the at least one third blackboard image are summed to obtain the fourth blackboard image, it is determined that the pixel values of the pixels of the fourth blackboard image are within the second threshold range, Then the pixel is regarded as the target pixel.
所述第二阈值范围是根据第一阈值范围来确定得出。The second threshold range is determined according to the first threshold range.
一实施例中,若图像块的个数为多个且是通过对第一黑板图像进行划分后得到的,即所述多个图像块是构成完整的第一黑板图像,此时,所述至少一个第三黑板图像亦为第一黑板图像的二值化图像。因此,通过将第二黑板图像和所述至少一个第三黑板图像进行像素值求和处理,即相当于将每一个像素点被判为第一类型像素点的次数统计起来,得到每一个像素点被判为第一类型像素点的总次数H。此时,便可对所述总次数H进行阈值判断,从而最终确定出对应的像素点是否为目标像素点。其中,当白色像素点所对应的像素值为1时,所述第二阈值范围与第一阈值范围相同,若第一类型像素点并不是置为白色像 素点,而是其他颜色时,即第一类型像素点对应的像素值就不为1,此时,则需要将第一阈值范围进行相应倍数相乘后才得到所需的第二阈值范围。In an embodiment, if the number of image blocks is multiple and is obtained by dividing the first blackboard image, that is, the multiple image blocks constitute a complete first blackboard image, at this time, the at least A third blackboard image is also a binarized image of the first blackboard image. Therefore, by performing pixel value summation processing on the second blackboard image and the at least one third blackboard image, it is equivalent to counting the number of times each pixel is judged to be the first type of pixel to obtain each pixel The total number of times H is judged to be the first type of pixel. At this time, a threshold judgment can be performed on the total number of times H, so as to finally determine whether the corresponding pixel is the target pixel. Wherein, when the pixel value corresponding to the white pixel is 1, the second threshold range is the same as the first threshold range. If the first type of pixel is not set as a white pixel, but with another color, that is, the second threshold The pixel value corresponding to one type of pixel is not 1. In this case, the first threshold range needs to be multiplied by a corresponding multiple to obtain the required second threshold range.
在一可选实施例中,所述图像块的阈值分割处理的执行次数可选为2~4次。In an optional embodiment, the number of executions of the threshold segmentation processing of the image block can be selected from 2 to 4 times.
以下结合具体可选实施例来对本申请做更进一步的详细阐述。The application will be further elaborated below in combination with specific optional embodiments.
如图3所示,本发明实施例提供了一种图像处理方法,具体应用于智能黑板装置的书写场景中,主要用于提取出黑板图像上的笔迹图像(即目标前景图像),其具体步骤如下所示。As shown in Figure 3, the embodiment of the present invention provides an image processing method, which is specifically applied to the writing scene of a smart blackboard device, and is mainly used to extract the handwriting image (ie, the target foreground image) on the blackboard image. The specific steps are As follows.
S201、获取第一黑板图像。在本实施例中,所述第一黑板图像为摄像头拍摄得到的原始黑板图像或者为对摄像头拍摄得到的原始黑板图像进行预处理后得到的黑板图像。S201. Acquire a first blackboard image. In this embodiment, the first blackboard image is an original blackboard image captured by a camera or a blackboard image obtained after preprocessing the original blackboard image captured by a camera.
S202、对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点。S202: Perform threshold segmentation processing on pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels.
在本实施例中,所述步骤S202具体为,利用大津算法来获取第一黑板图像的最优特征阈值,然后通过最优特征阈值,对第一黑板图像中的像素点逐一进行阈值判断,从而根据判断结果,将第一黑板图像中的像素点划分为前景类型像素点(即第一类型像素点)和背景类型像素点(第二类型像素点),从而实现对所述第一黑板图像进行全局阈值分割;然后将被划分为前景类型的像素点置为白色像素点,将划分为背景类型的像素点置为黑色像素点,从而实现对第一黑板图像进行二值化处理,以得到第二黑板图像。可见,所述第二黑板图像为二值化图像,即为第一分割掩膜图像(mask1)。In this embodiment, the step S202 is specifically that the Otsu algorithm is used to obtain the optimal feature threshold of the first blackboard image, and then the optimal feature threshold is used to threshold the pixels in the first blackboard image one by one, thereby According to the judgment result, the pixels in the first blackboard image are divided into foreground type pixels (i.e., first type pixels) and background type pixels (second type pixels), so as to realize the first blackboard image. Global threshold segmentation; then the pixels classified into the foreground type are set as white pixels, and the pixels classified as the background type are set as black pixels, so that the first blackboard image is binarized to obtain the first Two blackboard image. It can be seen that the second blackboard image is a binary image, that is, the first segmented mask image (mask1).
S203、对所述第一黑板图像进行至少一次图像块的阈值分割处理;其中,所述图像块的阈值分割处理,其具体为,对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理,以令所述至少一个图像块的像素点被分为第一类型像素点或第二类型像素点。S203. Perform at least one image block threshold segmentation process on the first blackboard image; wherein the threshold segmentation process of the image block is specifically: performing pixel point segmentation on at least one image block of the first blackboard image. Threshold segmentation processing, so that the pixels of the at least one image block are divided into first type pixels or second type pixels.
在本实施例中,所述图像块为多个,并且可选通过对所述第一黑板图像进行平均划分后得到的。同时,所述图像块的阈值分割处理的执行次数n可选为3,并且每一次执行图像块的阈值分割处理时,每一次所采用的图像块的尺寸均不相同,也就是说,第1次执行图像块的阈值分割处理时所采用的图像块的尺寸为尺寸1,第2次执行图像块的阈值分割处理时所采用的图像块的尺寸为尺寸2,第3次执行图像块的阈值分割处理时所采用的图像块的尺寸为尺寸3,尺寸1、尺寸2和尺寸3均不相同,而由于此实施例中所述的图像块是通过对第一黑板 图像进行平均划分后得到的,因此通过调整划分的图像块个数,便可实现图像块的尺寸调整。In this embodiment, there are multiple image blocks, and can optionally be obtained by evenly dividing the first blackboard image. At the same time, the number of executions n of the threshold segmentation processing of the image block can be selected as 3, and each time the threshold segmentation processing of the image block is executed, the size of the image block used is different each time, that is, the first The size of the image block used in the second execution of the threshold segmentation process of the image block is size 1, the size of the image block used in the second execution of the threshold segmentation process of the image block is size 2, and the third execution of the threshold value of the image block The size of the image block used in the segmentation process is size 3. Size 1, size 2 and size 3 are all different, and because the image block described in this embodiment is obtained by evenly dividing the first blackboard image Therefore, by adjusting the number of divided image blocks, the size of the image blocks can be adjusted.
而每一次执行图像块的阈值分割处理,其具体处理过程为:对每一个图像块分别进行阈值分割处理,即此时以图像块为输入图像来进行图像块内的像素点的阈值分割处理,也就是说,此时获得的最优特征阈值是通过图像块进行处理后得到的,即对于一图像块进行阈值分割处理,其可选为,利用大津算法来获取所述图像块的最优特征阈值,然后通过最优特征阈值,对图像块中的像素点逐一进行阈值判断,从而根据判断结果,将图像块中的像素点划分为前景类型像素点(即第一类型像素点)和背景类型像素点(第二类型像素点),从而实现对所述图像块进行全局阈值分割。然后将被划分为前景类型的像素点置为白色像素点(即将该像素点的像素值置为1),将划分为背景类型的像素点置为黑色(即将该像素点的像素值置为0),从而实现对图像块进行二值化处理。由于所有的图像块构成得到第一黑板图像,因此所有图像块分别进行上述阈值分割处理和二值化处理步骤后,便得到一第三黑板图像,可见,所述第三黑板图像亦为一二值化图像,只是其是对第一黑板图像进行分块后对每一图像块进行二值化后得到的。并且,由于在本实施例中,共执行3次图像块的阈值分割处理,因此,会得到3个第三黑板图像,即得到mask_i,i=1、2、3。可见此时,所述第一黑板图像中的同1个像素点,如像素点j,被执行类型划分处理的总次数为4。Each time the threshold segmentation processing of an image block is executed, the specific processing process is: threshold segmentation processing is performed on each image block separately, that is, at this time, the image block is used as the input image to perform the threshold segmentation processing of the pixels in the image block. That is to say, the optimal feature threshold obtained at this time is obtained after processing the image block, that is, threshold segmentation is performed on an image block, which can be selected as using Otsu algorithm to obtain the optimal feature of the image block Threshold, and then through the optimal feature threshold, threshold judgment is performed on the pixels in the image block one by one, so that according to the judgment result, the pixels in the image block are divided into foreground type pixels (i.e. first type pixels) and background type Pixels (pixels of the second type), thereby realizing global threshold segmentation of the image block. Then set the pixels classified as foreground type to white pixels (that is, set the pixel value of this pixel to 1), and set the pixels classified as background type to black (that is, set the pixel value of this pixel to 0 ) To realize the binarization of image blocks. Since all the image blocks constitute the first blackboard image, after all the image blocks are subjected to the above threshold segmentation processing and binarization processing steps, a third blackboard image is obtained. It can be seen that the third blackboard image is also one or two. The valued image is only obtained by binarizing each image block after dividing the first blackboard image into blocks. In addition, since in this embodiment, the image block threshold segmentation process is performed three times, three third blackboard images will be obtained, that is, mask_i, i=1, 2, 3 will be obtained. It can be seen that at this time, for the same pixel in the first blackboard image, such as pixel j, the total number of times the type division processing is executed is 4.
S204、将所述第二黑板图像和所述至少一个第三黑板图像进行求和处理后,得到第四黑板图像后,判断出第四黑板图像的像素点的像素值处于第二阈值范围内,则将该像素点作为目标像素点。其中,所述第二阈值范围是根据第一阈值范围来确定得出。S204. After performing a summation process on the second blackboard image and the at least one third blackboard image to obtain a fourth blackboard image, it is determined that the pixel values of the pixels of the fourth blackboard image are within a second threshold range. Then the pixel is regarded as the target pixel. Wherein, the second threshold value range is determined according to the first threshold value range.
一实施例中,对mask1和mask_i(i=1、2、3)求和,即将第二黑板图像与3个第三黑板图像中同一像素点的像素值相加起来,此时,将4幅图叠加起来后会得到第四黑板图像(即第二掩膜图像mask2),也就是说,所述第四黑板图像的每一个像素点的像素值,是mask1和mask_i(i=1、2、3)中对应同一像素点的像素值求和后的数值,如第四黑板图像中的像素点j,其像素值为mask1中像素点j的像素值、mask_1中像素点j的像素值、mask_2中像素点j的像素值、mask_3中像素点j的像素值之和。然后,由于在本实施例中,将被划分为前景类型的像素点的像素值置为1,将划分为背景类型的像素点的像素值置为0, 因此所采用的阈值范围可以为[2,4],此时,利用所述阈值范围对第四黑板图像进行像素点的阈值分割后,将落入所述阈值范围内的像素点,即像素值大于等于2的像素点,置为白色像素点,即像素值置为1,将不落入所述阈值范围的像素点,即像素值小于2的像素点,置为黑色像素点,即像素值置为0,相当于对所述第四黑板图像进行阈值分割后再进行二值化处理,此时则得到第五黑板图像,所述第五黑板图像为第三掩膜图像mask3。In an embodiment, the sum of mask1 and mask_i (i=1, 2, 3) is to add up the pixel values of the same pixel in the second blackboard image and the three third blackboard images. At this time, add 4 After the images are superimposed, the fourth blackboard image (ie, the second mask image mask2) will be obtained, that is, the pixel value of each pixel of the fourth blackboard image is mask1 and mask_i (i=1, 2, 3) The value after the sum of the pixel values corresponding to the same pixel, such as pixel j in the fourth blackboard image, its pixel value is the pixel value of pixel j in mask1, the pixel value of pixel j in mask_1, mask_2 The sum of the pixel value of the middle pixel j and the pixel value of the pixel j in mask_3. Then, since in this embodiment, the pixel value of pixels classified as foreground type is set to 1, and the pixel value of pixels classified as background type is set to 0, the threshold range used can be [2 , 4], at this time, after the fourth blackboard image is thresholded by using the threshold range, the pixels falling within the threshold range, that is, pixels with a pixel value greater than or equal to 2, are set to white The pixel point, that is, the pixel value is set to 1, and the pixel point that does not fall into the threshold range, that is, the pixel point with a pixel value less than 2, is set as a black pixel point, that is, the pixel value is set to 0, which is equivalent to After the four blackboard images are thresholded and then binarized, the fifth blackboard image is obtained, and the fifth blackboard image is the third mask image mask3.
S205、根据第三掩膜图像mask3,从第一黑板图像中获取得到黑板的前景笔迹图像。S205. Acquire a foreground handwriting image of the blackboard from the first blackboard image according to the third mask image mask3.
一实施例中,由于mask3中前景像素点的像素值均为1,因此,根据mask3中像素值为1的像素点,从而从第一黑板图像中获取对应位置的像素点,此时便可得到最终所需的笔迹图像。In one embodiment, since the pixel values of the foreground pixels in mask3 are all 1, according to the pixels with the pixel value of 1 in mask3, the pixels at the corresponding positions are obtained from the first blackboard image. The final required handwriting image.
可见,本实施例能够通过对图像块进行阈值分割来实现第一黑板图像的局部阈值分割,同时在每次进行图像块的阈值分割处理时所利用的图像块的属性都不相同,以实现多尺度阈值分割,这样不仅能解决黑板图像因反光而无法很好进行前景和背景分割的问题,同时还能解决传统局部阈值分割因所选邻域的区域的尺寸太小,无法覆盖住整个图形而导致将图形中的某部分被分割为背景的问题。可见,通过使用本发明实施例的方法,能够极大地有效准确进行前景和背景的分割,而且非常适用于智能黑板装置场景中,因为黑板容易反光,所以黑板图像常常会存有反光区域,而且在上课时也常常在黑板上画填充图形。It can be seen that this embodiment can achieve the local threshold segmentation of the first blackboard image by thresholding the image block, and at the same time, the attributes of the image block used are different each time the threshold segmentation process of the image block is performed, so as to achieve multiple Scale threshold segmentation, which can not only solve the problem of the blackboard image being unable to segment the foreground and background due to reflections, but also solve the traditional local threshold segmentation because the size of the selected neighborhood is too small to cover the entire image. Lead to the problem of segmenting a certain part of the graph into the background. It can be seen that by using the method of the embodiment of the present invention, the foreground and background can be segmented effectively and accurately, and it is very suitable for the scene of the smart blackboard device. Because the blackboard is easy to reflect light, the blackboard image often has a reflective area, and In class, I often draw filling figures on the blackboard.
如图4所示,本发明实施例还提供了一种图像处理系统,包括:As shown in FIG. 4, an embodiment of the present invention also provides an image processing system, including:
第一获取单元301,设置为获取第一黑板图像;The first acquiring unit 301 is configured to acquire a first blackboard image;
第一处理单元302,设置为对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点;The first processing unit 302 is configured to perform threshold segmentation processing on pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels;
第二处理单元303,设置为对所述第一黑板图像进行至少一次图像块的阈值分割处理;其中,所述图像块的阈值分割处理,其具体为,对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理,以令所述至少一个图像块的像素点被分为第一类型像素点或第二类型像素点;The second processing unit 303 is configured to perform threshold segmentation processing of an image block at least once on the first blackboard image; wherein the threshold segmentation processing of the image block is specifically performed on at least one of the first blackboard image Performing threshold segmentation processing of pixels on the image block, so that the pixels of the at least one image block are divided into first type pixels or second type pixels;
第三处理单元304,设置为判断出所述第一黑板图像的像素点被分为第一类型像素点的次数处于第一阈值范围内,则将该像素点作为目标像素点;The third processing unit 304 is configured to determine that the number of times that the pixels of the first blackboard image are classified into the first type of pixels is within a first threshold range, and then use the pixel as a target pixel;
第四处理单元305,设置为利用所述目标像素点,从所述第一黑板图像中提取出目标图像。The fourth processing unit 305 is configured to use the target pixels to extract a target image from the first blackboard image.
可见,通过采用上述本发明实施例的图像处理系统,先对黑板图像进行整幅图像的阈值分割处理后将第一黑板图像的像素点分为第一类型像素点或第二类型像素点,接着再对黑板图像的图像块进行阈值分割处理后将图像块的像素点分为第一类型像素点或第二类型像素点,以达到对黑板图像进行局部阈值分割的效果,接着再通过对像素点被分为第一类型像素点的次数进行阈值判断,以确定出目标像素点,这样利用确定出的目标像素点从第一黑板图像中提取对应的图像,即目标图像,其有效性和准确性高,而且可以解决图像存有反光情况而导致将前景判为背景的问题。It can be seen that by using the image processing system of the above embodiment of the present invention, the blackboard image is first subjected to the threshold segmentation processing of the entire image, and then the pixels of the first blackboard image are divided into the first type of pixels or the second type of pixels, and then After threshold segmentation is performed on the image block of the blackboard image, the pixels of the image block are divided into the first type pixel point or the second type pixel point to achieve the effect of local threshold segmentation of the blackboard image, and then pass the pixel point The number of times that pixels are classified into the first type is thresholded to determine the target pixel. In this way, the determined target pixel is used to extract the corresponding image from the first blackboard image, that is, the target image. Its validity and accuracy High, and it can solve the problem of judging the foreground as the background due to the reflection of the image.
在一可选实施例中,所述至少一次图像块的阈值分割处理,其具体为:至少两次图像块的阈值分割处理。In an optional embodiment, the threshold segmentation processing of the image block at least once is specifically: the threshold segmentation processing of the image block at least twice.
所述至少两次图像块的阈值分割处理中每一次图像块的阈值分割处理所采用的图像块的属性不相同,所述属性包括个数、尺寸、形状和/或图像块的选取位置。In the threshold segmentation processing of the at least two image blocks, the attributes of the image blocks used in the threshold segmentation processing of each image block are different, and the attributes include the number, size, shape, and/or selection position of the image block.
在一可选实施例中,所述图像块的个数为至少两个,所述至少两个图像块是通过对所述第一黑板图像进行平均划分后得到。In an optional embodiment, the number of the image blocks is at least two, and the at least two image blocks are obtained by evenly dividing the first blackboard image.
在一可选实施例中,所述对所述第一黑板图像进行像素点的阈值分割处理这一步骤中所采用的阈值分割算法为全局阈值分割算法,和/或,所述对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理这一步骤中所采用的阈值分割算法为全局阈值分割算法。In an optional embodiment, the threshold segmentation algorithm used in the step of performing pixel threshold segmentation processing on the first blackboard image is a global threshold segmentation algorithm, and/or, the first blackboard image The threshold segmentation algorithm used in the step of threshold segmentation processing for at least one image block of a blackboard image is a global threshold segmentation algorithm.
在一可选实施例中,所述第一阈值范围为[a,b],其中,a=c*d,c表示为所述第一黑板图像的像素点被执行类型划分处理的总次数,d表示为百分比,d大于等于50%;b表示为大于等于c的数值。In an optional embodiment, the first threshold value range is [a, b], where a=c*d, and c represents the total number of times the pixel of the first blackboard image has been subjected to type division processing, d is expressed as a percentage, d is greater than or equal to 50%; b is expressed as a value greater than or equal to c.
在一可选实施例中,所述第一处理单元302包括:In an optional embodiment, the first processing unit 302 includes:
第一处理模块,设置为对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点后,将所述第一类型像素点置为白色像素点,将所述第二类型像素点置为黑色像素点,从而得到第二黑板图像。The first processing module is configured to perform threshold segmentation processing on pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels, and then The pixels of the first type are set as white pixels, and the pixels of the second type are set as black pixels, thereby obtaining a second blackboard image.
在一可选实施例中,所述第二处理单元303包括:In an optional embodiment, the second processing unit 303 includes:
第二处理模块,设置为对所述第一黑板图像进行至少一次图像块的阈值分割处理和二值化处理后,得到至少一个第三黑板图像。The second processing module is configured to perform at least one image block threshold segmentation process and binarization process on the first blackboard image to obtain at least one third blackboard image.
所述图像块的阈值分割处理和二值化处理,其包括:The threshold segmentation processing and binarization processing of the image block include:
对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理,以令所述至少一个图像块的像素点被分为第一类型像素点或第二类型像素点后,将所述第一类型像素点置为白色像素点,将所述第二类型像素点置为黑色像素点,从而得到第三黑板图像。Perform pixel threshold segmentation processing on at least one image block of the first blackboard image, so that the pixels of the at least one image block are divided into the first type of pixel or the second type of pixel, and then the The pixels of the first type are set as white pixels, and the pixels of the second type are set as black pixels, thereby obtaining a third blackboard image.
在一可选实施例中,所述第三处理单元304包括:In an optional embodiment, the third processing unit 304 includes:
第三处理模块,设置为将所述第二黑板图像和所述至少一个第三黑板图像进行求和处理后,得到第四黑板图像后,判断出第四黑板图像的像素点的像素值处于第二阈值范围内,则将该像素点作为目标像素点;其中,所述第二阈值范围是根据第一阈值范围来确定得出。The third processing module is configured to perform sum processing on the second blackboard image and the at least one third blackboard image to obtain the fourth blackboard image, and then determine that the pixel value of the fourth blackboard image is in the first Within the second threshold range, the pixel is taken as the target pixel; wherein, the second threshold range is determined according to the first threshold range.
上述方法实施例中的内容均适用于本系统实施例中,本系统实施例所具体实现的功能与上述方法实施例相同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。The contents of the above method embodiments are all applicable to this system embodiment, and the specific functions implemented by this system embodiment are the same as the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
如图5所示,本发明实施例还提供了一种图像处理装置,该装置包括:As shown in FIG. 5, an embodiment of the present invention also provides an image processing device, which includes:
至少一个处理器401;At least one processor 401;
至少一个存储器402,用于存储至少一个程序;At least one memory 402, configured to store at least one program;
当所述至少一个程序被所述至少一个处理器401执行,使得所述至少一个处理器401实现上述方法实施例所述的图像处理方法步骤。When the at least one program is executed by the at least one processor 401, the at least one processor 401 implements the steps of the image processing method described in the foregoing method embodiment.
可见,通过采用上述本发明实施例的图像处理装置,先对黑板图像进行整幅图像的阈值分割处理后将第一黑板图像的像素点分为第一类型像素点或第二类型像素点,接着再对黑板图像的图像块进行阈值分割处理后将图像块的像素点分为第一类型像素点或第二类型像素点,以达到对黑板图像进行局部阈值分割的效果,接着再通过对像素点被分为第一类型像素点的次数进行阈值判断,以确定出目标像素点,这样利用确定出的目标像素点从第一黑板图像中提取对应的图像,即目标图像,其有效性和准确性高,而且可以解决图像存有反光情况而导致将前景判为背景的问题。此外,上述方法实施例中的所有内容均适用于本装置实施例中,因此本装置实施例所具体实现的所有功能与上述方法实施例相同,并且达到的所有有益效果与上述方法实施例所达到的有益效果也相同。It can be seen that by using the image processing device of the above-mentioned embodiment of the present invention, the blackboard image is first subjected to the threshold segmentation processing of the entire image, and then the pixels of the first blackboard image are divided into the first type of pixels or the second type of pixels, and then After threshold segmentation is performed on the image block of the blackboard image, the pixels of the image block are divided into the first type pixel point or the second type pixel point to achieve the effect of local threshold segmentation of the blackboard image, and then pass the pixel point The number of times that pixels are classified into the first type is thresholded to determine the target pixel. In this way, the determined target pixel is used to extract the corresponding image from the first blackboard image, that is, the target image. Its validity and accuracy High, and it can solve the problem of judging the foreground as the background due to the reflection of the image. In addition, all the content in the above method embodiment is applicable to this device embodiment, so all the functions implemented by this device embodiment are the same as the above method embodiment, and all the beneficial effects achieved are the same as those achieved by the above method embodiment. The beneficial effects are also the same.
还有,本发明实施例还提供了一种存储介质,其中存储有处理器可执行的指令,所述处理器可执行的指令在由处理器执行时用于执行上述方法实施例所述的一种图像处理方法步骤。也就是说,上述方法实施例中的内容均适用于本存储介质实施例中,本存储介质实施例所具体实现的功能与上述方法实施例相 同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。In addition, an embodiment of the present invention also provides a storage medium in which instructions executable by a processor are stored, and the instructions executable by the processor are used to execute the one described in the foregoing method embodiment when executed by the processor. This image processing method steps. That is to say, the content in the above method embodiment is applicable to this storage medium embodiment, and the specific functions implemented by this storage medium embodiment are the same as the above method embodiment, and the beneficial effects achieved are the same as those achieved by the above method embodiment. The beneficial effects are also the same.
如图6所示,本发明实施例还提供了一种黑板装置,包括黑板501、摄像头502以及与所述摄像头502连接的终端设备503。As shown in FIG. 6, an embodiment of the present invention also provides a blackboard device, including a blackboard 501, a camera 502, and a terminal device 503 connected to the camera 502.
所述摄像头502用于对黑板501进行拍摄。The camera 502 is used to photograph the blackboard 501.
所述终端设备503包括:The terminal device 503 includes:
至少一个处理器;At least one processor;
至少一个存储器,用于存储至少一个程序。At least one memory is used to store at least one program.
当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现上述方法实施例所述的一种图像处理方法步骤。When the at least one program is executed by the at least one processor, the at least one processor implements the steps of an image processing method described in the foregoing method embodiment.
可见,通过采用上述本发明实施例的黑板装置,先对黑板图像进行整幅图像的阈值分割处理后将第一黑板图像的像素点分为第一类型像素点或第二类型像素点,接着再对黑板图像的图像块进行阈值分割处理后将图像块的像素点分为第一类型像素点或第二类型像素点,以达到对黑板图像进行局部阈值分割的效果,接着再通过对像素点被分为第一类型像素点的次数进行阈值判断,以确定出目标像素点,这样利用确定出的目标像素点从第一黑板图像中提取对应的图像,即目标图像,其有效性和准确性高,而且可以解决图像存有反光情况而导致将前景判为背景的问题。It can be seen that by using the blackboard device of the above-mentioned embodiment of the present invention, the entire image of the blackboard image is first subjected to threshold segmentation processing, and then the pixels of the first blackboard image are divided into first type pixels or second type pixels, and then After threshold segmentation is performed on the image block of the blackboard image, the pixels of the image block are divided into the first type of pixel or the second type of pixel to achieve the effect of the local threshold segmentation of the blackboard image. The number of times the pixels are divided into the first type is used for threshold judgment to determine the target pixel. In this way, the determined target pixel is used to extract the corresponding image from the first blackboard image, that is, the target image, which is highly effective and accurate , And can solve the problem of judging the foreground as the background due to the reflection of the image.
对于上述终端设备503,其通过软硬件结合的方式实现,其可以是电脑、手机、交互智能平板、具有智能处理功能的显示设备(如智能电视、智能显示屏)等设备。而对于所述存储器,其可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。另,所述处理器和存储器之间可通过总线连接,并且所述处理器和存储器可集成在同一电路板中或者独立设置在不同电路板中,所述处理器和存储器之间的连接可为固定不可拆卸连接,也可为可拆线连接,这些方式在本实施例中不做过多限定,可根据实际情况需求来选取。还有,所述终端设备503与摄像头502之间的通讯方式可为有线连接(如串口有线连接、通用串行总线(Universal Serial Bus,USB)接口有线连接等),也可为无线连接(如红外、蓝牙、Zigbee、无线保真(Wireless Fidelity,Wifi)等),这些通信连接方式在本实施例中不做过多限定,可根据实际情况/需求来选取。For the above-mentioned terminal device 503, it is realized by a combination of software and hardware, and it can be a computer, a mobile phone, an interactive smart tablet, a display device with smart processing functions (such as a smart TV, a smart display), and other devices. As for the memory, it may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In addition, the processor and the memory can be connected by a bus, and the processor and the memory can be integrated in the same circuit board or independently arranged in different circuit boards, and the connection between the processor and the memory can be The fixed and non-detachable connection can also be a detachable connection. These methods are not too limited in this embodiment, and can be selected according to actual requirements. In addition, the communication method between the terminal device 503 and the camera 502 can be a wired connection (such as a serial port wired connection, a universal serial bus (Universal Serial Bus, USB) interface wired connection, etc.), or a wireless connection (such as Infrared, Bluetooth, Zigbee, wireless fidelity (Wireless Fidelity, Wifi, etc.), these communication connection modes are not too limited in this embodiment, and can be selected according to actual conditions/requirements.
在一可选实施例中,所述摄像头502直接设置在黑板501上(如黑板501的上方),这样在使用时直接安装书写板便可,操作使用方便。In an optional embodiment, the camera 502 is directly arranged on the blackboard 501 (for example, above the blackboard 501), so that the writing board can be directly installed during use, which is convenient for operation and use.
上述方法实施例中的内容均适用于本装置实施例中,本装置实施例所具体实现的功能与上述方法实施例相同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。The contents in the above method embodiments are all applicable to this device embodiment, and the specific functions implemented by this device embodiment are the same as the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
以上是对本申请的可选实施进行了具体说明,但本发明创造并不限于所述实施例,熟悉本领域的技术人员在不违背本申请精神的前提下还可做作出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。The above is a specific description of the optional implementations of the application, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the application. These equivalent modifications or replacements are all included in the scope defined by the claims of this application.

Claims (11)

  1. 一种图像处理方法,包括:An image processing method, including:
    获取第一黑板图像;Acquiring the first blackboard image;
    对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点;Performing threshold segmentation processing on the pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels;
    对所述第一黑板图像进行至少一次图像块的阈值分割处理;其中,所述图像块的阈值分割处理,其具体为,对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理,以令所述至少一个图像块的像素点被分为第一类型像素点或第二类型像素点;Perform at least one image block threshold segmentation process on the first blackboard image; wherein the threshold segmentation process of the image block is specifically performing pixel threshold segmentation on at least one image block of the first blackboard image Processing, so that the pixels of the at least one image block are divided into first type pixels or second type pixels;
    判断出所述第一黑板图像的像素点被分为第一类型像素点的次数处于第一阈值范围内,则将该像素点作为目标像素点;It is determined that the number of times the pixels of the first blackboard image are classified into the first type of pixels is within the first threshold range, then the pixel is taken as the target pixel;
    利用所述目标像素点,从所述第一黑板图像中提取出目标图像。Using the target pixels, a target image is extracted from the first blackboard image.
  2. 根据权利要求1所述的图像处理方法,其中,所述至少一次图像块的阈值分割处理,其具体为:至少两次图像块的阈值分割处理;The image processing method according to claim 1, wherein the threshold segmentation processing of the image block at least once is specifically: the threshold segmentation processing of the image block at least twice;
    所述至少两次图像块的阈值分割处理中每一次图像块的阈值分割处理所采用的图像块的属性不相同,所述属性包括个数、尺寸、形状和/或图像块的选取位置。In the threshold segmentation processing of the at least two image blocks, the attributes of the image blocks used in the threshold segmentation processing of each image block are different, and the attributes include the number, size, shape, and/or selection position of the image block.
  3. 根据权利要求1所述的图像处理方法,其中,所述图像块的个数为至少两个,所述至少两个图像块是通过对所述第一黑板图像进行平均划分后得到。4. The image processing method according to claim 1, wherein the number of the image blocks is at least two, and the at least two image blocks are obtained by evenly dividing the first blackboard image.
  4. 根据权利要求1所述一种图像处理方法,其中,所述对所述第一黑板图像进行像素点的阈值分割处理这一步骤中所采用的阈值分割算法为全局阈值分割算法,和/或,所述对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理这一步骤中所采用的阈值分割算法为全局阈值分割算法。An image processing method according to claim 1, wherein the threshold segmentation algorithm used in the step of performing pixel threshold segmentation processing on the first blackboard image is a global threshold segmentation algorithm, and/or, The threshold segmentation algorithm used in the step of performing pixel threshold segmentation processing on at least one image block of the first blackboard image is a global threshold segmentation algorithm.
  5. 根据权利要求1-4任一项所述的图像处理方法,其中,所述对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点这一步骤,其包括:The image processing method according to any one of claims 1 to 4, wherein the threshold segmentation processing is performed on the pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into the first The step of a type of pixel or a second type of pixel includes:
    对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点后,将所述第一类型像素点置为白色像素点,将所述第二类型像素点置为黑色像素点,从而得到第二黑板图像。Perform threshold segmentation processing on the first blackboard image, so that the pixels of the first blackboard image are divided into first type pixels or second type pixels, and then the first type pixels Set as white pixels, and set the second type of pixels as black pixels, thereby obtaining a second blackboard image.
  6. 根据权利要求5所述的图像处理方法,其中,所述对所述第一黑板图像进行至少一次图像块的阈值分割处理这一步骤,其包括:5. The image processing method according to claim 5, wherein the step of performing threshold segmentation of image blocks at least once on the first blackboard image comprises:
    对所述第一黑板图像进行至少一次图像块的阈值分割处理和二值化处理后,得到至少一个第三黑板图像;After performing at least one image block threshold segmentation process and binarization process on the first blackboard image, at least one third blackboard image is obtained;
    其中,所述图像块的阈值分割处理和二值化处理,其包括:Wherein, the threshold segmentation processing and binarization processing of the image block include:
    对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理,以令所述至少一个图像块的像素点被分为第一类型像素点或第二类型像素点后,将所述第一类型像素点置为白色像素点,将所述第二类型像素点置为黑色像素点,从而得到第三黑板图像。Perform pixel threshold segmentation processing on at least one image block of the first blackboard image, so that the pixels of the at least one image block are divided into the first type of pixel or the second type of pixel, and then the The pixels of the first type are set as white pixels, and the pixels of the second type are set as black pixels, thereby obtaining a third blackboard image.
  7. 根据权利要求6所述的图像处理方法,其中,所述判断出所述第一黑板图像的像素点被分为第一类型像素点的次数处于第一阈值范围内,则将该像素点作为目标像素点这一步骤,其包括:The image processing method according to claim 6, wherein the number of times that it is determined that the pixel of the first blackboard image is divided into the first type of pixel is within a first threshold range, the pixel is taken as the target The pixel point step includes:
    将所述第二黑板图像和所述至少一个第三黑板图像进行求和处理后,得到第四黑板图像后,判断出第四黑板图像的像素点的像素值处于第二阈值范围内,则将该像素点作为目标像素点;After the second blackboard image and the at least one third blackboard image are summed to obtain the fourth blackboard image, it is determined that the pixel value of the fourth blackboard image is within the second threshold range, then the This pixel is regarded as the target pixel;
    其中,所述第二阈值范围是根据第一阈值范围来确定得出。Wherein, the second threshold value range is determined according to the first threshold value range.
  8. 一种图像处理系统,包括:An image processing system, including:
    第一获取单元,设置为获取第一黑板图像;The first acquiring unit is configured to acquire the first blackboard image;
    第一处理单元,设置为对所述第一黑板图像进行像素点的阈值分割处理,以令所述第一黑板图像的像素点被分为第一类型像素点或第二类型像素点;A first processing unit, configured to perform threshold segmentation processing on pixels of the first blackboard image, so that the pixels of the first blackboard image are divided into first-type pixels or second-type pixels;
    第二处理单元,设置为对所述第一黑板图像进行至少一次图像块的阈值分割处理;其中,所述图像块的阈值分割处理,其具体为,对所述第一黑板图像的至少一个图像块进行像素点的阈值分割处理,以令所述至少一个图像块的像素点被分为第一类型像素点或第二类型像素点;The second processing unit is configured to perform threshold segmentation processing of image blocks at least once on the first blackboard image; wherein the threshold segmentation processing of the image blocks is specifically: performing at least one image of the first blackboard image Performing threshold segmentation processing of pixels on the block, so that the pixels of the at least one image block are divided into first type pixels or second type pixels;
    第三处理单元,设置为判断出所述第一黑板图像的像素点被分为第一类型像素点的次数处于第一阈值范围内,则将该像素点作为目标像素点;The third processing unit is configured to determine that the number of times that the pixels of the first blackboard image are divided into the first type of pixels is within a first threshold range, and then the pixels are used as target pixels;
    第四处理单元,设置为利用所述目标像素点,从所述第一黑板图像中提取出目标图像。The fourth processing unit is configured to extract a target image from the first blackboard image by using the target pixel.
  9. 一种图像处理装置,包括:An image processing device including:
    至少一个处理器;At least one processor;
    至少一个存储器,用于存储至少一个程序;At least one memory for storing at least one program;
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-7任一项所述的图像处理方法。When the at least one program is executed by the at least one processor, the at least one processor implements the image processing method according to any one of claims 1-7.
  10. 一种存储介质,其中存储有处理器可执行的指令,其中,所述处理器可执行的指令在由处理器执行时用于执行如权利要求1-7任一项所述的图像处理方法。A storage medium storing instructions executable by a processor, wherein the instructions executable by the processor are used to execute the image processing method according to any one of claims 1-7 when executed by the processor.
  11. 一种黑板装置,包括黑板、摄像头以及与所述摄像头连接的终端设备;其中,A blackboard device includes a blackboard, a camera, and a terminal device connected with the camera; wherein,
    所述摄像头用于对黑板进行拍摄;The camera is used to photograph the blackboard;
    所述终端设备包括:The terminal equipment includes:
    至少一个处理器;At least one processor;
    至少一个存储器,用于存储至少一个程序;At least one memory for storing at least one program;
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-7任一项所述的图像处理方法。When the at least one program is executed by the at least one processor, the at least one processor implements the image processing method according to any one of claims 1-7.
PCT/CN2019/127758 2019-02-20 2019-12-24 Image processing method, system and device, storage medium, and blackboard device WO2020168818A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910127218.6A CN109978889A (en) 2019-02-20 2019-02-20 Image processing method, system, device, storage medium and blackboard device
CN201910127218.6 2019-02-20

Publications (1)

Publication Number Publication Date
WO2020168818A1 true WO2020168818A1 (en) 2020-08-27

Family

ID=67077138

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/127758 WO2020168818A1 (en) 2019-02-20 2019-12-24 Image processing method, system and device, storage medium, and blackboard device

Country Status (2)

Country Link
CN (1) CN109978889A (en)
WO (1) WO2020168818A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109978889A (en) * 2019-02-20 2019-07-05 广州视源电子科技股份有限公司 Image processing method, system, device, storage medium and blackboard device
CN118072192B (en) * 2024-04-25 2024-06-21 烟台哈尔滨工程大学研究院 GEE-based large-sized algae harmful algal bloom long-time sequence automatic extraction method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101699469A (en) * 2009-11-09 2010-04-28 南京邮电大学 Method for automatically identifying action of writing on blackboard of teacher in class video recording
CN103019466A (en) * 2012-11-16 2013-04-03 厦门大学 Projection interactive system based on infrared detection
US20150098648A1 (en) * 2013-10-09 2015-04-09 Casio Computer Co., Ltd. Image Processing Device Capable of Segmenting an Image into Plural Areas
CN107809563A (en) * 2017-11-30 2018-03-16 浙江大华技术股份有限公司 A kind of writing on the blackboard detecting system, method and device
CN108550157A (en) * 2018-04-04 2018-09-18 安徽海青智能科技有限公司 A kind of unobstructed processing method of teaching board
CN109978889A (en) * 2019-02-20 2019-07-05 广州视源电子科技股份有限公司 Image processing method, system, device, storage medium and blackboard device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9740957B2 (en) * 2014-08-29 2017-08-22 Definiens Ag Learning pixel visual context from object characteristics to generate rich semantic images
CN107945200B (en) * 2017-12-14 2021-08-03 中南大学 Image binarization segmentation method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101699469A (en) * 2009-11-09 2010-04-28 南京邮电大学 Method for automatically identifying action of writing on blackboard of teacher in class video recording
CN103019466A (en) * 2012-11-16 2013-04-03 厦门大学 Projection interactive system based on infrared detection
US20150098648A1 (en) * 2013-10-09 2015-04-09 Casio Computer Co., Ltd. Image Processing Device Capable of Segmenting an Image into Plural Areas
CN107809563A (en) * 2017-11-30 2018-03-16 浙江大华技术股份有限公司 A kind of writing on the blackboard detecting system, method and device
CN108550157A (en) * 2018-04-04 2018-09-18 安徽海青智能科技有限公司 A kind of unobstructed processing method of teaching board
CN109978889A (en) * 2019-02-20 2019-07-05 广州视源电子科技股份有限公司 Image processing method, system, device, storage medium and blackboard device

Also Published As

Publication number Publication date
CN109978889A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
WO2020199776A1 (en) Shelf vacancy rate calculation method and device, and storage medium
WO2019233264A1 (en) Image processing method, computer readable storage medium, and electronic device
US9071745B2 (en) Automatic capturing of documents having preliminarily specified geometric proportions
US9305360B2 (en) Method and apparatus for image enhancement and edge verification using at least one additional image
WO2017215527A1 (en) Hdr scenario detection method, device, and computer storage medium
WO2018120038A1 (en) Method and device for target detection
CN110796600B (en) Image super-resolution reconstruction method, image super-resolution reconstruction device and electronic equipment
CN108769634B (en) Image processing method, image processing device and terminal equipment
US10885321B2 (en) Hand detection method and system, image detection method and system, hand segmentation method, storage medium, and device
WO2022166865A1 (en) Shadow elimination method and apparatus for text image, and electronic device
US9401027B2 (en) Method and apparatus for scene segmentation from focal stack images
CN104486552A (en) Method and electronic device for obtaining images
WO2021195873A1 (en) Method and device for identifying region of interest in sfr test chart image, and medium
WO2017088637A1 (en) Method and apparatus for locating image edge in natural background
WO2020168818A1 (en) Image processing method, system and device, storage medium, and blackboard device
WO2020232910A1 (en) Target counting method and apparatus based on image processing, device, and storage medium
US20130201358A1 (en) Efficient Line Detection Method
CN111294516A (en) Alum image processing method and system, electronic device and medium
CN105049706A (en) Image processing method and terminal
CN113283439A (en) Intelligent counting method, device and system based on image recognition
WO2017128646A1 (en) Image processing method and device
CN111695374B (en) Segmentation method, system, medium and device for zebra stripes in monitoring view angles
CN117611483A (en) Image acquisition method, device, equipment and storage medium
WO2024016715A1 (en) Method and apparatus for testing imaging consistency of system, and computer storage medium
WO2024016686A1 (en) Corner detection method and apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19916153

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19916153

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19916153

Country of ref document: EP

Kind code of ref document: A1