Page turning detection method and device

By extracting and comparing the characteristics of the detected image in the intelligent reading device, the page turning status of the image is judged, which solves the problem of low detection efficiency in the existing technology, realizes a method of quickly identifying the image of the content page to be detected, and improves the detection efficiency and accuracy. sex.

CN109145751BActive Publication Date: 2024-10-22HEFEI IFLYTEK TOYCLOUD TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201810813117.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-07-23
Publication Date
2024-10-22
Estimated Expiration
2038-07-23

AI Technical Summary

Technical Problem

In the existing technology, in smart reading devices, when the image of the content page to be detected is detected by matching the captured image with the pre-stored physical book content page image one by one, the efficiency is low, especially when the user turns pages, resulting in detection efficiency and Accuracy is reduced.

Method used

By extracting the image features of multiple detection images, it is judged whether the last image in the sequential detection images meets the preset conditions to determine whether it was taken when the physical book to be detected is in a stable page turning state, thereby improving detection efficiency. Specific methods include calculating hash difference values ​​or contour segment matching, and judging changes in image features to determine page turning status.

Benefits of technology

It improves the detection efficiency and accuracy, avoids wasting time in the one-by-one matching process, and can quickly identify the image of the content page to be detected, especially after the page turning action is completed, ensuring the stability of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109145751B_ABST
    Figure CN109145751B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a page turning detection method and device, which belongs to the field of computer application technology. The method includes: in the process of acquiring multiple detection images to detect a physical book to be detected, extracting the image features of each detection image in the multiple detection images; for any N detection images acquired in a sequential order from the multiple detection images, if the image features of the last detection image in any N detection images meet the preset conditions with the image features of other detection images, it is determined that the last detection image is taken when the physical book to be detected is in a stable page turning state; wherein the stable page turning state refers to the stable state of the physical book to be detected after the page turning action of the physical book to be detected is completed. Since there is no need to go through the one-by-one matching process, for any detection image, it is only necessary to determine the page turning state corresponding to the detection image based on the several detection images before the detection image, thereby improving the detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer application technology, and more specifically, to a page turning detection method and device. Background Art

[0002] With the development of informatization and intelligence, smart reading devices for reading physical books are becoming more and more popular. Among them, when users use smart reading devices to read physical books, the camera on the smart reading device usually shoots the physical book at a preset frequency, so as to obtain the content page image to be detected based on the captured image. Among them, since the camera may capture the image of the user turning the page, it is necessary to obtain the content page image after the user completes the page turning action. In the related art, the captured images are usually matched one by one with the pre-stored physical book content page images, until a captured image matching the pre-stored physical book content page image is detected, and the captured image is used as the content page image to be detected. Since the captured images need to be matched one by one to determine the content page image to be detected, the efficiency is low. Summary of the invention

[0003] In order to solve the above problems, the embodiments of the present invention provide a page turning detection method and device that overcome the above problems or at least partially solve the above problems.

[0004] According to a first aspect of an embodiment of the present invention, a page turning detection method is provided, the method comprising:

[0005] In the process of acquiring a plurality of detection images to detect the physical book to be detected, extracting image features of each detection image in the plurality of detection images;

[0006] For any N detection images obtained in sequence from a plurality of detection images, if the image features of the last detection image in any N detection images meet a preset condition with the image features of other detection images, it is determined that the last detection image was captured when the physical book to be detected was in a stable page-turning state; wherein N is an integer greater than 1, and the stable page-turning state refers to the stable state of the physical book to be detected after the page-turning action of the physical book to be detected is completed.

[0007] The method provided by the embodiment of the present invention extracts the image features of each detection image in the multiple detection images during the process of acquiring multiple detection images to detect the physical book to be detected. For any N detection images acquired in a sequential order from the multiple detection images, if the image features of the last detection image in any N detection images meet the preset conditions with the image features of other detection images, it is determined that the last detection image was taken when the physical book to be detected was in a stable page turning state. Since there is no need to go through a one-to-one matching process, for any detection image, the page turning state corresponding to the detection image can be determined based on the detection images preceding the detection image, thereby improving the detection efficiency.

[0008] According to a second aspect of an embodiment of the present invention, a page turning detection device is provided, the device comprising:

[0009] An extraction module, used for extracting image features of each of the multiple detection images in the process of acquiring multiple detection images for detecting the physical book to be detected;

[0010] The first determination module is used to obtain any N detection images that are sequentially continuous from the multiple detection images, and if the image features of the last detection image in the any N detection images meet a preset condition with the image features of the other detection images, then determine that the last detection image is captured when the physical book to be detected is in a stable page-turning state; wherein N is an integer greater than 1, and the stable page-turning state refers to the stable state of the physical book to be detected after the page-turning action of the physical book to be detected is completed.

[0011] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, including:

[0012] at least one processor; and

[0013] at least one memory in communication with the processor, wherein:

[0014] The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the page turning detection method provided by any possible implementation of various possible implementations of the first aspect.

[0015] According to a fourth aspect of the present invention, a non-transitory computer-readable storage medium is provided, which stores computer instructions, and the computer instructions enable a computer to execute the page turning detection method provided by any possible implementation of the first aspect.

[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A schematic diagram of a page turning detection method according to an embodiment of the present invention;

[0018] Figure 2 A schematic diagram of a page turning detection method according to an embodiment of the present invention;

[0019] Figure 3 A schematic diagram of a page turning detection method according to an embodiment of the present invention;

[0020] Figure 4 A schematic diagram of a page turning detection method according to an embodiment of the present invention;

[0021] Figure 5 is a block diagram of a page turning detection device according to an embodiment of the present invention;

[0022] Figure 6 The present invention is a block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The specific implementation of the embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the embodiments of the present invention, but are not used to limit the scope of the embodiments of the present invention.

[0024] With the development of informatization and intelligence, smart reading devices for reading physical books are becoming more and more popular. Smart reading devices mainly realize smart reading by pre-storing some physical book explanation recordings, as well as physical book cover images and content page images. When users use smart reading devices to read physical books, the physical book is usually photographed by the camera on the smart reading device at a preset frequency, so that the content page image to be detected is obtained based on the photographed image. During the shooting process of the smart device, the user may flip the physical book, so that the captured image may contain the user's gesture of flipping the physical book, that is, the image of the user turning the page will be captured. However, the image of the page being turned will not be able to detect the content because the content is not clear enough.

[0025] In the related art, the captured images are usually matched one by one with the pre-stored physical book content page images in sequence until a captured image matching the pre-stored physical book content page image is detected, and the captured image is used as the content page image to be detected. Since the captured images need to be matched one by one to determine the content page image to be detected, the efficiency is low. For example, since the user's page turning action needs to continue for a period of time, and the camera will continue to capture images, it is necessary to wait until the captured images corresponding to the page turning action fail to match before the captured image matching the physical book content page image can be detected. Therefore, the overall process takes too long and is inefficient.

[0026] In response to the above requirements, an embodiment of the present invention provides a page turning detection method. It should be noted that the physical books involved in the embodiment of the present invention may be different types of reading materials such as picture books, magazines and pictorials, and the embodiment of the present invention does not specifically limit this. In addition, the execution subject corresponding to the method may be an intelligent reading device with a reading function, or an intelligent device with only a physical book detection function that has been decoupled from the reading function, and the embodiment of the present invention does not specifically limit this. For the sake of ease of explanation, the embodiment of the present invention takes the execution subject as an intelligent reading device as an example to illustrate the page turning detection method provided by the embodiment of the present invention. See. Figure 1 , the method comprising:

[0027] 101. In the process of acquiring multiple detection images to detect the physical book to be detected, extract image features of each detection image in the multiple detection images.

[0028] Before executing 101, the user can turn the physical book to be detected to the cover, so that the camera can detect the cover to determine which physical book it is. After determining which physical book it is, the user can turn the physical book to the content page and read it through the smart reading device. The camera on the smart reading device takes real-time photos of the physical book at a preset frequency, obtains multiple detection images and performs content detection.

[0029] For any detection image, the image features corresponding to the detection image are used to determine the page turning state corresponding to the detection image. The image features corresponding to the detection image are extracted based on the detection image itself, and the page turning state may include a page turning progress state and a page turning stable state. The page turning stable state refers to the stable state of the physical book to be detected after the page turning action of the physical book to be detected is completed. The page turning progress state refers to the turned state of the physical book to be detected when the page turning action of the physical book to be detected is in progress.

[0030] 102. For any N detection images obtained in sequence from a plurality of detection images, if the image features of the last detection image in the any N detection images meet a preset condition with the image features of other detection images, it is determined that the last detection image is captured when the physical book to be detected is in a stable page-turning state.

[0031] Wherein, N is an integer greater than 1, and the page turning stable state refers to the stable state of the physical book to be detected after the page turning action of the physical book to be detected is completed. For any N detection images acquired in a sequential order among multiple detection images, the image features of the last detection image of the N detection images (that is, the Nth detection image) can be compared with the image features of the previous N-1 detection images to determine whether the preset conditions are met. If the preset conditions are met, it can be determined that the Nth detection image is taken when the physical book to be detected is in the page turning stable state.

[0032] Since the camera shooting frequency is usually fast, when the page turning action is in progress and after the page turning action is completed, the camera can capture multiple detection images when the page turning action is in progress, and multiple images after the page turning action is completed. For example, if the camera captures M detection images when the page turning action is in progress, and after the page turning action is completed, the camera captures Z detection images. According to the above judgment method, if it is determined that the Z detection images are all obtained by shooting when the physical book to be detected is in a stable state of page turning, then in the actual implementation process, the first detection image in the Z detection images can be used as the detection object for content detection, or any detection image from the Z detection images can be selected as the detection object for content detection, or the last detection image in the Z detection images can be used as the detection object for content detection, or the next detection image of the Z detection images can be used as the detection object for content detection, and the embodiment of the present invention does not make specific restrictions on this. Among them, the value of the above Z can be set according to demand, such as a value of 2 to 6, and the embodiment of the present invention does not make specific restrictions on this.

[0033] It should be noted that, taking into account the actual implementation process, according to the above judgment method, multiple consecutive detection images may be determined to be taken when the physical book to be detected is in the state of turning pages, but the process of the user turning a page is unlikely to last so long. Therefore, if Y consecutive detection images are determined to be taken when the physical book to be detected is in a stable state of turning pages, and Y is greater than the preset threshold, then Y+1 detection images can be directly used as the detection objects for content detection to avoid delays due to continuous judgment errors.

[0034] The method provided by the embodiment of the present invention extracts the image features of each detection image in the multiple detection images during the process of acquiring multiple detection images to detect the physical book to be detected. For any N detection images acquired in a sequential order from the multiple detection images, if the image features of the last detection image in any N detection images meet the preset conditions with the image features of other detection images, it is determined that the last detection image was taken when the physical book to be detected was in a stable page turning state. Since there is no need to go through a one-to-one matching process, for any detection image, the page turning state corresponding to the detection image can be determined based on the detection images preceding the detection image, thereby improving the detection efficiency.

[0035] Based on the content of the above embodiment, as an optional embodiment, the image feature is a hash difference value, N is an integer greater than 2, and the preset condition is that the average Hamming distance corresponding to the last image is not greater than the first preset threshold or the maximum Hamming distance corresponding to the last image is not greater than the second preset threshold; accordingly, before determining that the last detection image is taken when the physical book to be detected is in a stable state of page turning, the average Hamming distance and the maximum Hamming distance can also be calculated, and the embodiment of the present invention does not specifically limit this. Figure 2 , including but not limited to:

[0036] 201. Calculate the difference between the hash difference value of the last image and the hash difference value of each detection image in other detection images respectively.

[0037] For ease of understanding, taking N as 3 as an example, the hash matrices of N detection images can be represented by p1, p2 and p3 respectively. Calculate the Hamming distance ham1 between p3 and p1, and the Hamming distance ham2 between p3 and p2. Among them, the hash matrix can be a 9*8 0, 1 binary matrix, and the Hamming distance is the number of elements with the same position but different values ​​in the two matrices. For example, if A is (1, 0, 0, 1, 1, 0, 1) and B is (0, 1, 1, 0, 0, 1, 1), the Hamming distance between AB is 6. It should be noted that in the actual implementation process, N can take values ​​from 3 to 6, and the embodiment of the present invention does not specifically limit this.

[0038] 202. Calculate the average value of all differences, take the average value as the average Hamming distance, and select the maximum value from all differences, and take the maximum value as the maximum Hamming distance.

[0039] Specifically, since the number of all differences is 2, the average value of all differences is (ham1+ham2) / 2, which is the average Hamming distance. The maximum value of all differences can be expressed as max(ham1, ham2), which is the maximum Hamming distance. It should be noted that each time the average Hamming distance and the maximum Hamming distance corresponding to the Zth detection image are calculated, the average Hamming distance and the maximum Hamming distance corresponding to the Zth detection image can be calculated based on the image features of the (ZN-1)th detection image to the Zth detection image, that is, the total number of detection images is N.

[0040] It can be seen from the above embodiments that the page turning state includes not only the page turning stable state but also the page turning progress state. Accordingly, if the average Hamming distance corresponding to the Zth detection image is greater than the first preset threshold and the maximum Hamming distance corresponding to the Zth detection image is greater than the second preset threshold, it can be determined that the Zth detection image is captured when the physical book to be detected is in the page turning progress state.

[0041] It should be noted that, from the content in 201 above, the Hamming distance can measure the minimum number of replacements required to convert a string into another string by character replacement, and the average Hamming distance and the maximum Hamming distance are calculated based on the difference between the hash difference values ​​of the Zth detection image and the other previous detection images. Therefore, the larger the average Hamming distance and the maximum Hamming distance, the greater the difference between the Zth detection image and the other previous detection images, that is, the more it can be explained that the Zth detection image and the other previous detection images correspond to different page turning states. The Zth detection image is taken after the page turning action is completed, so when the corresponding average Hamming distance of the Zth detection image is greater than the first preset threshold and the corresponding maximum Hamming distance of the Zth detection image is greater than the second preset threshold, it can be determined that the Zth detection image is taken when the physical book to be detected is in the page turning state. On the contrary, it can be determined that the Zth detection image is taken when the physical book to be detected is in the stable page turning state.

[0042] The method provided by the embodiment of the present invention calculates the average Hamming distance and the maximum Hamming distance corresponding to the last image, and respectively determines whether the average Hamming distance corresponding to the last image is greater than a first preset threshold or whether the maximum Hamming distance corresponding to the last image is greater than a second preset threshold, and determines the page turning state corresponding to the last image according to the judgment result. Since the page turning state corresponding to the detected image can be determined according to the change of the hash difference value between the detected images, the detection efficiency and accuracy can be improved.

[0043] Based on the contents of the above embodiments, as an optional embodiment, the image features of each detection image are the contour segments contained in each detection image, and N is 2; accordingly, for the previous detection image and the last detection image in any N detection images, the preset condition is that the contour segments contained in the previous detection image match the contour segments contained in the last detection image.

[0044] Since N is 2, the N detection images actually include two detection images, namely the previous detection image and the last detection image. Before determining the contour line segments included in the detection image, the detection image may be first subjected to binary processing. Specifically, the detection image may be converted into a binary image by an adaptive threshold method, which is not specifically limited in the embodiment of the present invention.

[0045] After the detection image is converted into a binary image, the contour segments contained in the binary image can be determined. It should be noted that since the detection image is obtained by photographing the physical book to be detected, the edge contour of the physical book cover or the edge contour of the physical book content page may be photographed. Accordingly, the detection image may contain contour segments of the edge contour. After the detection image is binary processed, these edge contours will be more prominent. Specifically, the grayscale values ​​of the pixels corresponding to these edge contours in the binary image are mostly specified values, that is, they are all 255, or they are all 0. It should also be noted that since the edge contour may be the edge contour of the physical book cover, it may also be the edge contour of the physical book content page, so there may be multiple contour segments contained in the detection image.

[0046] Since the contour segments contained in the detection images obtained by continuous shooting will not change when the physical book to be detected is in a stable state of page turning, the contour segments contained in the detection images obtained by continuous shooting, that is, the contour segments contained in the previous detection image and the last detection image obtained by continuous shooting, should match. In other words, if the contour segments contained in the previous detection image match the contour segments contained in the last detection image, it can be determined that the last detection image was obtained by shooting when the physical book to be detected is in a stable state of page turning. Based on the above principle, if the contour segments contained in the previous detection image do not match the contour segments contained in the last detection image, it can be determined that the last detection image was obtained by shooting when the physical book to be detected is in a state of page turning.

[0047] The method provided by the embodiment of the present invention determines whether the contour line segments included in the previous detection image match the contour line segments included in the last detection image, and determines the page turning state corresponding to the last image according to the determination result. Since the page turning state corresponding to the detection image can be determined according to the matching state of the contour line segments included in the detection images, the detection efficiency and accuracy can be improved.

[0048] Based on the content of the above embodiment, as an optional embodiment, before determining that the last detection image is taken when the physical book to be detected is in a stable state of page turning, the contour line segments contained in the detection image can also be determined. The embodiment of the present invention does not specifically limit the method of determining the contour line segments contained in the detection image, including but not limited to: for any detection image among any N detection images, determine the contour pixel point set in any detection image, fit the contour pixel points in each contour pixel point set, and obtain the contour line segments contained in any detection image.

[0049] As can be known from the content of the above-mentioned embodiment, the contour line segment included in the detection image may have multiple. Therefore, for any detection image in any N detection images, the contour pixel point set corresponding to each contour line segment in the detection image can be determined first. The contour line segment included in the detection image is obtained by fitting the contour pixel points in each contour pixel point set. Wherein, the contour pixel point is a pixel point whose grayscale value is a specified value after the detection image is binary processed. The definition of the specified value can refer to the content of the above-mentioned embodiment, and will not be repeated here. In addition, the fitting method can be linear fitting or approximate linear fitting, and the embodiment of the present invention does not specifically limit this.

[0050] Based on the contents of the above embodiments, as an optional embodiment, the embodiment of the present invention does not specifically limit the method of determining the contour pixel point set in any detection image, including but not limited to: performing row-by-row retrieval of pixel points in any detection image, for any retrieved contour pixel point, if the total number of the current contour pixel point set is 0 or there is no contour pixel point set that satisfies the first specified condition, and there is a specified contour pixel point that satisfies the second specified condition between any contour pixel point, then a new contour pixel point set is established, and any contour pixel point and the specified contour pixel point are added to the new contour pixel point set, if the current contour pixel point set is 0 or there is no contour pixel set that satisfies the first specified condition, and there is no designated contour pixel point that satisfies the second specified condition between any contour pixel point, then any contour pixel point is added to the contour pixel point elimination set; if there is currently a contour pixel point set that satisfies the first specified condition, then any contour pixel point is added to the contour pixel point set that satisfies the first specified condition, and the above retrieval and addition process is repeated until all pixel points in any detection image are retrieved; wherein, the designated contour pixel point is the next contour pixel point retrieved after any contour pixel point or a contour pixel point in the contour pixel point elimination set.

[0051] Based on the contents of the above embodiments, as an optional embodiment, the first specified condition is that there is a contour pixel point in the contour pixel point set within a specified range around any contour pixel point or the distance between a contour pixel point and any contour pixel point is less than a third preset threshold; the second specified condition is that a specified contour pixel point is within a specified range around any contour pixel point or the distance between any contour pixel point and a specified contour pixel point is less than a third preset threshold.

[0052] Among them, for the contour pixel point A, the specified range around the contour pixel point A refers to: a circle of pixels around the contour pixel point A as the center. For example, taking the coordinates of the contour pixel point A as (5, 5) as an example, the specified range around the contour pixel point is the 8 pixels with coordinates (4, 6), (5, 6), (6, 6), (4, 5), (6, 5), (4, 4), (5, 4) and (6, 4). If the coordinates of the contour pixel point B are any one of the above 8 coordinates, it can be determined that the contour pixel point B is within the specified range around the contour pixel point A. It should be noted that the values ​​of the first preset threshold, the second preset threshold and the third preset threshold involved in the above embodiments can be set according to actual conditions, and the embodiments of the present invention do not specifically limit this.

[0053] For ease of understanding, for any detection image in N detection images, taking the detection image comprising 5*5 pixels as an example, the process of determining the outline pixel set in the detection image is described. It should be noted that the process of determining the outline pixel set in the detection image is the process of aggregating the outline pixels constituting different contour line segments. Wherein, the pixel in the detection image is retrieved line by line, starting from the first pixel in the upper left corner, and searching downwards line by line from left to right. Alternatively, it is also possible to start from the first pixel in the lower left corner and search upwards line by line from left to right. Of course, other line by line retrieval modes, or different column by column retrieval modes, can also be adopted, and the embodiment of the present invention does not specifically limit this.

[0054] Taking the example of starting from the first pixel point in the upper left corner and searching downward row by row from left to right, for the first retrieved contour pixel point (this contour pixel point is not necessarily the first pixel point, and the definition of the contour pixel point can refer to the content of the above embodiment), since there is no contour pixel point set at present, that is, the total number of the current contour pixel point set is 0, it can be determined whether there is a specified contour pixel point that meets the second specified condition between any contour pixel point.

[0055] Since the designated contour pixel is the next contour pixel (i.e., the second contour pixel) retrieved after the first contour pixel, or a contour pixel in the contour pixel elimination set, and the current contour pixel elimination set is empty, the designated contour pixel is the second contour pixel. Next, it can be determined whether the second contour pixel is within a designated range around the first contour pixel or whether the distance between the second contour pixel and the first contour pixel is less than a third preset threshold. If one of the conditions is met, it can be determined that the second contour pixel meets the second designated condition with the first contour pixel, so that a new contour pixel set can be created, and the first contour pixel and the second contour pixel are added to the new contour pixel set.

[0056] If both conditions are not met, that is, the second contour pixel point does not meet the second specified condition with the first contour pixel point, and the current contour pixel point elimination set is empty, it can be determined that there is currently no specified contour pixel point that meets the second specified condition with the first contour pixel point, so the first contour pixel point can be added to the contour pixel point elimination set.

[0057] After the above process is finished, the following pixel points can be retrieved. For the first case in the above process, the first contour pixel point and the second contour pixel point are added to the new contour pixel point set. At this time, since the second contour pixel point has been retrieved and added to the established contour pixel point set, in the first case, the next contour pixel point retrieved is the third contour pixel point. Since the total number of the current contour pixel point set is 1 and not 0, it can be determined whether there is a contour pixel point set that meets the first specified condition, that is, whether the previously created contour pixel point set meets the first specified condition.

[0058] Specifically, it can be determined whether there is a contour pixel point in the contour pixel point set that is within a specified range around the third contour pixel point or whether there is a contour pixel point whose distance to the third contour pixel point is less than a third preset threshold. If one of the conditions is met, it can be determined that the contour pixel point set meets the first specified condition, so that the third contour pixel point can be added to the contour pixel point set.

[0059] However, if the contour pixel point set does not satisfy the first specified condition, it can be determined whether there is a specified contour pixel point that satisfies the second specified condition with the third contour pixel point. Since the specified contour pixel point is the next contour pixel point retrieved after the third contour pixel point (i.e., the fourth contour pixel point), or a contour pixel point in the contour pixel point elimination set, and the current contour pixel point elimination set is still empty, the specified contour pixel point is the fourth contour pixel point. Next, it can be determined whether the fourth contour pixel point is within the specified range around the third contour pixel point or whether the distance between the fourth contour pixel point and the third contour pixel point is less than the third preset threshold. If one of the conditions is met, it can be determined that the fourth contour pixel point and the third contour pixel point meet the second specified condition, so that a new contour pixel point set can be created, and the fourth contour pixel point and the third contour pixel point are added to the new contour pixel point set.

[0060] If both conditions are not met, that is, the second specified condition is not met between the fourth contour pixel point and the third contour pixel point, and the current contour pixel point elimination set is empty, it can be determined that there is currently no specified contour pixel point that meets the second specified condition between the fourth contour pixel point and the third contour pixel point, so the third contour pixel point can be added to the contour pixel point elimination set.

[0061] For the second case in the above process, the first contour pixel is added to the contour pixel elimination set. At this time, since the second contour pixel has not yet been assigned, the next contour pixel retrieved in the second case is still the second contour pixel. Since the total number of the current contour pixel set is still 0, it can be determined whether there is a designated contour pixel that meets the second designated condition between the second contour pixel and the second contour pixel.

[0062] Since the designated contour pixel is the next contour pixel retrieved after the second contour pixel (i.e., the third contour pixel), or a contour pixel in the contour pixel elimination set, and there is only one contour pixel in the contour pixel elimination set, i.e., the first contour pixel, and the first contour pixel and the second contour pixel have been judged before, and the second contour pixel does not satisfy the second designated condition, the designated contour pixel is the third contour pixel. Next, it can be judged whether the third contour pixel is within the designated range around the second contour pixel or whether the distance between the third contour pixel and the second contour pixel is less than the third preset threshold. If one of the conditions is satisfied, it can be determined that the third contour pixel and the second contour pixel satisfy the second designated condition, so a new contour pixel set can be created, and the second contour pixel and the third contour pixel are added to the new contour pixel set.

[0063] If both conditions are not satisfied, that is, the third contour pixel and the second contour pixel do not satisfy the second specified condition, and the first contour pixel in the contour pixel elimination set and the second contour pixel do not satisfy the second specified condition, it can be determined that there is currently no specified contour pixel that satisfies the second specified condition with the second contour pixel, so the second contour pixel can also be added to the contour pixel elimination set. At this time, the contour pixel elimination set has two contour pixels, namely the first contour pixel and the second contour pixel.

[0064] The subsequent process can be deduced in this way until all the pixels in the detection image are retrieved, so that the contour pixel set in the detection image can be obtained. It should be noted that in the process of retrieval and addition, if a contour pixel is selected from the contour pixel elimination set and added to a certain contour pixel set, the contour pixel needs to be deleted from the contour pixel elimination set. After all the pixels in the detection image are retrieved, the contour pixel set in the detection image can be obtained. Through the above process, the contour pixel set in each of the N detection images can be obtained.

[0065] The method provided by the embodiment of the present invention can aggregate the contour pixel points constituting different contour line segments in the detection image through iterative judgment to obtain a contour pixel point set in the detection image, thereby improving the fitting accuracy when fitting the contour line segments based on the contour pixel point set.

[0066] Based on the content of the above embodiment, as an optional embodiment, before determining that the last detection image is taken when the physical book to be detected is in a stable page turning state, it can also be determined whether the contour line segments contained in the previous detection image match the contour line segments contained in the last detection image. Figure 3 The embodiment of the present invention does not specifically limit the method of determining whether the two match, including but not limited to:

[0067] 301. If the number of contour line segments included in the previous detection image is the same as the number of contour line segments included in the last detection image, determine whether the contour line segments included in the previous detection image match the contour line segments included in the last detection image one-to-one.

[0068] Since the number of contour segments included in the previous detection image is the same as the number of contour segments included in the last detection image, before executing 301, a correspondence can be established in advance between the contour segments included in the previous detection image and the contour segments included in the last detection image, such as establishing a correspondence between the two according to the positions of the contour segments included in the previous detection image and the positions of the contour segments included in the last detection image. The embodiment of the present invention does not make any specific limitation on this.

[0069] In addition, when determining whether there is a one-to-one match between the contour segments contained in the previous detection image and the contour segments contained in the last detection image, the match may refer to whether the shapes of the two contour segments are similar, or whether the positions are similar in the same coordinate system. The embodiment of the present invention does not make any specific limitation on this.

[0070] It should be noted that if the number of contour segments included in the previous detection image is different from the number of contour segments included in the last detection image, it can be determined that the contour segments included in the previous detection image do not match the contour segments included in the last detection image. From the content of the above embodiment, it can be determined that the last detection image was taken when the physical book to be detected was in a page turning state.

[0071] 302. If the contour line segments included in the previous detection image match the contour line segments included in the last detection image in a one-to-one correspondence, determine that the contour line segments included in the previous detection image match the contour line segments included in the last detection image.

[0072] It should be noted that if the contour line segments included in the previous detection image do not match the contour line segments included in the last detection image one by one, it can be determined that the contour line segments included in the previous detection image do not match the contour line segments included in the last detection image. Therefore, it can be determined that the last detection image was taken when the physical book to be detected was in a page turning state.

[0073] The method provided by the embodiment of the present invention can improve the detection accuracy because the matching degree of the contour segments between the two detection images can reflect the consistency between the two detection images, thereby judging the page turning status of the detection images.

[0074] Based on the content of the above embodiment, as an optional embodiment, the embodiment of the present invention does not specifically limit the method of determining whether the contour line segments included in the previous detection image and the contour line segments included in the last detection image are matched one by one. Figure 4 , including but not limited to:

[0075] 3011. The contour segments contained in the previous detection image are sorted and numbered according to the order of the horizontal coordinates of the starting points of the contour segments, and the contour segments contained in the last detection image are sorted and numbered. The coordinate system between the previous detection image and the last detection image is established in the same way.

[0076] It should be noted that the ordering numbering method can also be from small to large. In addition, the ordering numbering basis can also be the vertical coordinate of the starting point of the contour line segment, or the horizontal coordinate of the ending point of the contour line segment, or the vertical coordinate of the ending point of the contour line segment, which is not specifically limited in the embodiment of the present invention.

[0077] 3012. For any two contour line segments with the same number between the previous detection image and the last detection image, if the angle between the any two contour line segments on the same coordinate axis is within a first preset range and the intercept difference on the same coordinate axis is within a second preset range, then it is determined that the any two contour line segments match each other.

[0078] For example, if there are 5 contour segments in the previous detection image, they are A1, A2, A3, A4 and A5 after being sorted and numbered. There are also 5 contour segments in the last detection image, which are B1, B2, B3, B4 and B5 after being sorted and numbered. Among them, A1 and B1 have the same number, and the same applies to the following. Then, it can be determined whether the angle between A1 and B1 on the same coordinate axis is within the first preset range and whether the intercept difference on the same coordinate axis is within the second preset range. If both conditions are met, it can be determined that A1 and B1 match each other. Similarly, A2 and B2 can be determined, and the same applies to the following.

[0079] It should be noted that the first preset range may be between plus or minus 5 degrees, and the second preset range may be a distance of plus or minus 15 pixels, which is not specifically limited in the embodiment of the present invention.

[0080] 3013. If the contour line segments with the same number between the previous detection image and the last detection image all match each other, it is determined that the contour line segments included in the previous detection image match the contour line segments included in the last detection image in a one-to-one correspondence.

[0081] For example, in combination with the above example, if A1 and B1, A2 and B2, A3 and B3, A4 and B4, and A5 and B5 all match each other, it can be determined that the contour line segments contained in the previous detection image match the contour line segments contained in the last detection image one by one.

[0082] It should be noted that if there is a pair of contour segments with the same number that do not match, it can be determined that the contour segments contained in the previous detection image and the contour segments contained in the last detection image are not one-to-one matched, and further it can be determined that the contour segments contained in the previous detection image and the contour segments contained in the last detection image do not match.

[0083] It should be noted that all the optional embodiments described above can be arbitrarily combined to form optional embodiments of the present invention, and will not be described one by one here.

[0084] Based on the content of the above embodiment, the embodiment of the present invention provides a page turning detection device, which is used to execute the page turning detection method in the above method embodiment. Figure 5 , the device comprises:

[0085] An extraction module 501 is used to extract image features of each of the multiple detection images in the process of acquiring multiple detection images to detect the physical book to be detected;

[0086] The first determination module 502 is used to obtain any N detection images that are sequentially continuous from the multiple detection images, and if the image features of the last detection image in the any N detection images meet a preset condition with the image features of the other detection images, then determine that the last detection image is captured when the physical book to be detected is in a stable page-turning state; wherein N is an integer greater than 1, and the stable page-turning state refers to the stable state of the physical book to be detected after the page-turning action of the physical book to be detected is completed.

[0087] As an optional embodiment, the image feature is a hash difference value, N is an integer greater than 2, and the preset condition is that the average Hamming distance corresponding to the last image is not greater than the first preset threshold or the maximum Hamming distance corresponding to the last image is not greater than the second preset threshold; accordingly, the device also includes:

[0088] A first calculation module, used for respectively calculating the difference between the hash difference value of the last image and the hash difference value of each detection image in other detection images;

[0089] The second calculation module is used to calculate the average value of all the differences, take the average value as the average Hamming distance, and select the maximum value from all the differences, taking the maximum value as the maximum Hamming distance.

[0090] As an optional embodiment, the image features of each detection image are the contour segments contained in each detection image, and N is 2; accordingly, for the previous detection image and the last detection image in any N detection images, the preset condition is that the contour segments contained in the previous detection image match the contour segments contained in the last detection image.

[0091] As an optional embodiment, the device further includes:

[0092] A second determination module is used to determine a set of contour pixel points in any detection image among any N detection images;

[0093] The fitting module is used to fit the contour pixel points in each contour pixel point set to obtain the contour line segments contained in any detection image; wherein the contour pixel point is a pixel point whose grayscale value is a specified value after binary processing of any detection image.

[0094] As an optional embodiment, a fitting module is used to perform row-by-row retrieval of pixel points in any detection image. For any retrieved contour pixel point, if the total number of the current contour pixel point set is 0 or there is no contour pixel point set that satisfies the first specified condition, and there is a specified contour pixel point that satisfies the second specified condition between any contour pixel point, a new contour pixel point set is established, and any contour pixel point and the specified contour pixel point are added to the new contour pixel point set. If the total number of the current contour pixel point set is 0 or there is no contour pixel point set that satisfies the first specified condition, and there is no specified contour pixel point that satisfies the second specified condition between any contour pixel point, any contour pixel point is added to the contour pixel point elimination set. If there is currently a contour pixel point set that satisfies the first specified condition, any contour pixel point is added to the contour pixel point set that satisfies the first specified condition. The above retrieval and addition process is repeated until all pixel points in any detection image are retrieved; wherein, the specified contour pixel point is the next contour pixel point retrieved after any contour pixel point or a contour pixel point in the contour pixel point elimination set.

[0095] As an optional embodiment, the first specified condition is that there is a contour pixel point in the contour pixel point set within a specified range around any contour pixel point or the distance between a contour pixel point and any contour pixel point is less than a third preset threshold; the second specified condition is that a specified contour pixel point is within a specified range around any contour pixel point or the distance between any contour pixel point and a specified contour pixel point is less than a third preset threshold.

[0096] As an optional embodiment, the device further includes:

[0097] A judgment module, used for judging whether the contour line segments contained in the previous detection image and the contour line segments contained in the last detection image have a one-to-one correspondence when the number of contour line segments contained in the previous detection image is the same as the number of contour line segments contained in the last detection image;

[0098] The third determination module is used to determine that the contour line segments contained in the previous detection image match the contour line segments contained in the last detection image when there is a one-to-one match between the contour line segments contained in the previous detection image and the contour line segments contained in the last detection image.

[0099] As an optional embodiment, the judgment module is used to sort and number the contour segments contained in the previous detection image according to the size order of the horizontal coordinates of the starting points of the contour segments, and sort and number the contour segments contained in the last detection image, and the coordinate system between the previous detection image and the last detection image is established in the same way; for any two contour segments with the same number between the previous detection image and the last detection image, if the angle between any two contour segments on the same coordinate axis is within a first preset range and the intercept difference on the same coordinate axis is within a second preset range, it is determined that the any two contour segments match each other; if the contour segments with the same number between the previous detection image and the last detection image all match each other, it is determined that the contour segments contained in the previous detection image match the contour segments contained in the last detection image one-to-one.

[0100] The device provided by the embodiment of the present invention extracts the image features of each detection image in the multiple detection images during the process of acquiring multiple detection images to detect the physical book to be detected. For any N detection images acquired in a sequential order among the multiple detection images, if the image features of the last detection image in any N detection images meet the preset conditions with the image features of other detection images, it is determined that the last detection image was taken when the physical book to be detected was in a stable page turning state. Since there is no need to go through a one-to-one matching process, for any detection image, the page turning state corresponding to the detection image can be determined based on the detection images preceding the detection image, thereby improving the detection efficiency.

[0101] Secondly, by calculating the average Hamming distance and the maximum Hamming distance corresponding to the last image, and judging whether the average Hamming distance corresponding to the last image is greater than the first preset threshold or whether the maximum Hamming distance corresponding to the last image is greater than the second preset threshold, the page turning state corresponding to the last image is determined according to the judgment result. Since the page turning state corresponding to the detected image can be determined according to the change of the hash difference value between the detected images, the detection efficiency and accuracy can be improved.

[0102] In addition, by judging whether the contour line segments included in the previous detection image match the contour line segments included in the last detection image, and determining the page turning state corresponding to the last image according to the judgment result, the page turning state corresponding to the detection image can be determined according to the matching state of the contour line segments included in the detection images, thereby improving the detection efficiency and accuracy.

[0103] Finally, since the contour pixel points constituting different contour line segments in the detection image can be aggregated through iterative judgment to obtain a contour pixel point set in the detection image, the accuracy of fitting can be improved when the contour line segments are fitted based on the contour pixel point set.

[0104] An embodiment of the present invention provides an electronic device. Figure 6 , the device includes: a processor (processor) 601, a memory (memory) 602 and a bus 603;

[0105] The processor 601 and the memory 602 communicate with each other through the bus 603.

[0106] The processor 601 is used to call the program instructions in the memory 602 to execute the page turning detection method provided by the above embodiment, for example, including: in the process of acquiring multiple detection images to detect the physical book to be detected, extracting the image features of each detection image in the multiple detection images; for any N detection images acquired in sequence in the multiple detection images, if the image features of the last detection image in any N detection images meet the preset conditions with the image features of other detection images, it is determined that the last detection image is taken when the physical book to be detected is in a stable page turning state; wherein N is an integer greater than 1, and the stable page turning state refers to the stable state of the physical book to be detected after the page turning action of the physical book to be detected is completed.

[0107] An embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions. The computer instructions enable a computer to execute the page turning detection method provided in the above embodiment, for example, including: in the process of acquiring multiple detection images to detect a physical book to be detected, extracting image features of each detection image in the multiple detection images; for any N detection images acquired in sequence in the multiple detection images, if the image features of the last detection image in any N detection images meet a preset condition with the image features of other detection images, it is determined that the last detection image is captured when the physical book to be detected is in a stable page turning state; wherein N is an integer greater than 1, and the stable page turning state refers to the stable state of the physical book to be detected after the page turning action of the physical book to be detected is completed.

[0108] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0109] The electronic device and other embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

[0110] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute each embodiment or some part of the method of the embodiment. Finally, the method of the present application is only a preferred implementation method and is not used to limit the scope of protection of the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the scope of protection of the embodiments of the present invention.

Claims

1. A page turning detection method, It is characterized in that include: In the process of acquiring a plurality of detection images to detect the physical book to be detected, extracting image features of each detection image in the plurality of detection images; For any N detection images acquired in a sequential order from the multiple detection images, if the image features of the last detection image among the any N detection images meet a preset condition with the image features of other detection images, it is determined that the last detection image is captured when the physical book to be detected is in a stable page-turning state; wherein N is an integer greater than 1, and the stable page-turning state refers to the stable state of the physical book to be detected after the page-turning action of the physical book to be detected is completed; When the image feature is a contour line segment, N is 2; accordingly, for the previous detection image and the last detection image in any N detection images, the preset condition is that the contour line segment contained in the previous detection image matches the contour line segment contained in the last detection image; The step of determining that the last detection image is obtained before the physical book to be detected is photographed in a stable page-turning state further includes: If the number of contour line segments included in the previous detection image is the same as the number of contour line segments included in the last detection image, determining whether the contour line segments included in the previous detection image match the contour line segments included in the last detection image in a one-to-one correspondence; If there is a one-to-one correspondence between the contour line segments contained in the previous detection image and the contour line segments contained in the last detection image, it is determined that the contour line segments contained in the previous detection image and the contour line segments contained in the last detection image match each other; The contour line segments included in the previous detection image and the contour line segments included in the last detection image are matched based on the angle and intercept difference on the same coordinate axis.

2. The method according to claim 1, It is characterized in that The step of determining that the last detection image is obtained before the physical book to be detected is photographed in a stable page-turning state further includes: For any detection image among the arbitrary N detection images, determine the contour pixel point set within the any detection image, fit the contour pixel points in each contour pixel point set, and obtain the contour line segments contained in the any detection image; wherein the contour pixel point is a pixel point whose grayscale value is a specified value after binary processing of the any detection image.

3. The method according to claim 2, It is characterized in that The step of determining a set of contour pixels in any one of the detection images comprises: Pixel points in any of the detected images are searched row by row. For any of the retrieved contour pixel points, if the total number of the current contour pixel point set is 0 or there is no contour pixel point set that satisfies the first specified condition, and there is a specified contour pixel point that satisfies the second specified condition between the any of the contour pixel points, a new contour pixel point set is established, and the any of the contour pixel points and the specified contour pixel point are added to the new contour pixel point set. If the total number of the current contour pixel point set is 0 or there is no contour pixel point set that satisfies the first specified condition, and there is no specified contour pixel point that satisfies the second specified condition between the any of the contour pixel points, the any of the contour pixel points is added to the contour pixel point elimination set. If there is currently a contour pixel point set that satisfies the first specified condition, the any of the contour pixel points is added to the contour pixel point set that satisfies the first specified condition. The above-mentioned search and addition process is repeated until all the pixels in any of the detected images are retrieved. The designated contour pixel point is the next contour pixel point retrieved after any contour pixel point or a contour pixel point in the contour pixel point elimination set.

4. The method according to claim 3, It is characterized in that The first specified condition is that there exists a contour pixel point in the contour pixel point set within a specified range around any contour pixel point or the distance between a contour pixel point and any contour pixel point is less than a third preset threshold; the second specified condition is that the specified contour pixel point is within a specified range around any contour pixel point or the distance between any contour pixel point and the specified contour pixel point is less than a third preset threshold.

5. The method according to claim 1, It is characterized in that The determining whether there is a one-to-one correspondence between the contour line segments included in the previous detection image and the contour line segments included in the last detection image includes: The contour segments contained in the previous detection image are sorted and numbered according to the order of the horizontal coordinates of the starting points of the contour segments, and the contour segments contained in the last detection image are sorted and numbered, and the coordinate system between the previous detection image and the last detection image is established in the same manner; For any two contour line segments with the same number between the previous detection image and the last detection image, if the angle between the two contour line segments on the same coordinate axis is within a first preset range and the intercept difference on the same coordinate axis is within a second preset range, then it is determined that the two contour line segments match each other; If the contour line segments with the same number between the previous detection image and the last detection image all match each other, it is determined that the contour line segments included in the previous detection image match the contour line segments included in the last detection image in a one-to-one correspondence.

6. A page turning detection device, It is characterized in that include: An extraction module, used for extracting image features of each of the multiple detection images in the process of acquiring multiple detection images for detecting the physical book to be detected; A first determination module is configured to obtain any N detection images that are sequentially continuous from the multiple detection images, and to determine that the last detection image is captured when the physical book to be detected is in a stable page-turning state if the image features of the last detection image in the any N detection images meet a preset condition with the image features of the other detection images; wherein N is an integer greater than 1, and the stable page-turning state refers to the stable state of the physical book to be detected after the page-turning action of the physical book to be detected is completed; When the image feature is a contour line segment, N is 2; accordingly, for the previous detection image and the last detection image in any N detection images, the preset condition is that the contour line segment contained in the previous detection image matches the contour line segment contained in the last detection image; The device also includes: A judging module, configured to judge whether the contour line segments contained in the previous detection image and the contour line segments contained in the last detection image have a one-to-one correspondence if the number of contour line segments contained in the previous detection image is the same as the number of contour line segments contained in the last detection image; a third determination module, configured to determine that the contour line segments included in the previous detection image match the contour line segments included in the last detection image if there is a one-to-one correspondence between the contour line segments included in the previous detection image and the contour line segments included in the last detection image; The contour line segments included in the previous detection image and the contour line segments included in the last detection image are matched based on the angle and intercept difference on the same coordinate axis.

7. An electronic device, It is characterized in that include: at least one processor; as well as at least one memory in communication with the processor, wherein: The memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1 to 5 by calling the program instructions.

8. A non-transitory computer-readable storage medium, It is characterized in that The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method according to any one of claims 1 to 5.