Method, device, medium and book editing equipment for determining book label pasting position

By gray-scaling and pixel clustering the book cover image, the pasting position of the book label is determined, which solves the problem that book editing equipment has difficulty in identifying blank areas, and realizes the reasonable pasting of the label and the protection of the text.

CN118447217BActive Publication Date: 2025-09-23SHANGHAI RFID SYST TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410677323.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2025-09-23
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

Existing book collection and editing equipment has difficulty in effectively identifying blank areas on book title pages, resulting in labels often being pasted onto text, affecting the readability of the text.

Method used

By collecting images of book cover pages and graying them, the edge parameters and grayscale parameters of each pixel are obtained. The feature parameters are obtained using singular value decomposition, and pixel clustering is performed. The book labels are pasted on areas with larger grayscale values, avoiding text areas first.

Benefits of technology

It effectively determines the pasting position of book labels, avoids blocking of text, and improves the automation efficiency of book collection and editing and the success rate of label pasting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118447217B_ABST
    Figure CN118447217B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, medium, and book collection and editing equipment for determining the location of book label affixing. The method comprises the following steps: S1, capturing an image of a page to be affixed; S2, grayscale processing the image of the page to be affixed to obtain a grayscale image, and obtaining the grayscale value and coordinate value of each pixel in the grayscale image; S3, obtaining the edge parameter and grayscale parameter of each pixel based on the grayscale value of each pixel in the grayscale image; S4, obtaining the feature parameter of each pixel based on the edge parameter and grayscale parameter of each pixel; S5, clustering pixels based on the coordinate value and feature parameter of each pixel, dividing the page to be affixed into N types of regions; S6, arranging the N types of regions in descending order of the grayscale value of the cluster center point, and determining the location of the book label affixing based on the principle of preferentially affixing to the region with the highest order. The present invention can effectively and reasonably determine the location of the book label affixing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of book acquisition and editing, and in particular to a method for determining a book label pasting position, a device for determining a book label pasting position, a non-temporary computer-readable storage medium, and a book acquisition and editing device. Background Art

[0002] The library has a huge collection of books. In order to facilitate the retrieval, placement, borrowing and returning of books, labels containing collection numbers, call numbers, etc. are generally affixed to the books during the book collection and editing work.

[0003] To save manpower and improve book acquisition and editing efficiency, automated book acquisition and editing equipment has been developed. When applying book labels, a basic requirement is to place the label on a blank area as much as possible, or at least avoid applying it to text and obscuring it. However, current book acquisition and editing equipment often has difficulty effectively identifying blank areas when automatically applying book labels, especially when applying labels to the title page. Given the characteristics of ordinary paper, the reverse side of the title page and the writing on the next page can seriously affect the book acquisition and editing equipment's ability to identify blank areas. Summary of the Invention

[0004] To solve the above technical problems, the present invention provides a method, device, medium and book editing equipment for determining the pasting position of a book label, which can effectively and reasonably determine the pasting position of the book label, so as to paste the book label in the most appropriate area as much as possible, ensure the successful pasting of the book label and avoid obstruction of the text as much as possible.

[0005] The technical solution adopted in the present invention is as follows:

[0006] A method for determining a book label pasting position comprises the following steps: S1, capturing an image of a page to be pasted; S2, gray-scaling the image of the page to be pasted to obtain a gray-scale image, and obtaining the grayscale value and coordinate value of each pixel in the gray-scale image; S3, obtaining an edge parameter and a grayscale parameter of each pixel according to the grayscale value of each pixel in the gray-scale image; S4, obtaining a feature parameter of each pixel according to the edge parameter and grayscale parameter of each pixel; S5, performing pixel clustering according to the coordinate value and feature parameter of each pixel, dividing the page to be pasted into N types of areas, where N is an integer greater than 1; and S6, arranging the N types of areas in descending order according to the grayscale value of the cluster center point, and determining the pasting position of the book label according to the principle of giving priority to pasting to the area with the highest order.

[0007] The edge parameters of a pixel with coordinates (x, y) are:

[0008]

[0009] Wherein, E represents the edge parameter, which is a second-order square matrix, I xx , I xy , I yx , I yy They are the second-order differentials of the pixel with coordinate value (x, y) in the horizontal direction, left oblique direction, right oblique direction, and vertical direction respectively.

[0010] The grayscale parameters of the pixel with coordinate value (x, y) are:

[0011]

[0012] Wherein, g represents the grayscale parameter, G(x, y) is the grayscale value of the pixel with coordinate value (x, y), and σ is the standard deviation of the grayscale values ​​of all pixels in the grayscale image.

[0013] Obtaining the characteristic parameters of each pixel according to the edge parameters and grayscale parameters of each pixel specifically includes: S41, multiplying the edge parameters and grayscale parameters of each pixel to obtain a fusion matrix for each pixel; S42, obtaining two eigenvalues ​​of the fusion matrix by singular value decomposition; S43, obtaining the characteristic parameters of each pixel according to the two eigenvalues ​​of the fusion matrix by the following formula:

[0014]

[0015] Among them, F i represents the characteristic parameter of the i-th pixel, i represents the pixel number, λ1 and λ2 are the two characteristic values, and a and b are constants.

[0016] When clustering pixels based on the coordinate values ​​and feature parameters of each pixel, the similarity measurement function in the clustering algorithm is:

[0017] D=αd(p i ,C j )+βF i -F Cj

[0018] Where D represents the distance parameter in the clustering algorithm, i represents the pixel number, j represents the region type number, i and j are both positive integers, and i≤M, j≤N, M is the total number of pixels in the grayscale image, N is the total number of region types, p i is the coordinate value of the i-th pixel, C j is the coordinate value of the cluster center of the jth region, d(p i ,C j ) represents the Euclidean distance between the i-th pixel and the cluster center of the j-th region, F i is the characteristic parameter of the i-th pixel, F Cjis the characteristic parameter of the cluster center of the jth region, α and β are the spatial weight coefficient and characteristic weight coefficient respectively.

[0019] Determining the pasting position of the book label according to the principle of giving priority to pasting in the area with the highest order, specifically includes: S61, obtaining the shape and size of the book label; S62, taking the jth area in the arrangement as the intended pasting area, and setting the initial j=1; S63, judging whether the intended pasting area can accommodate the book label; S64, if yes, determining the position in the intended pasting area that can accommodate the book label as the pasting position; S65, if no, merging the j+1th area in the arrangement into the intended pasting area, and returning to step S63.

[0020] A device for determining a book label pasting position comprises: an acquisition module for acquiring an image of a page to be pasted; a processing module for gray-scaling the image of the page to be pasted to obtain a gray-scale image and acquiring the grayscale value and coordinate value of each pixel in the gray-scale image; a first acquisition module for acquiring edge parameters and grayscale parameters of each pixel based on the grayscale value of each pixel in the gray-scale image; a second acquisition module for acquiring feature parameters of each pixel based on the edge parameters and grayscale parameters of each pixel; a clustering module for clustering pixels based on the coordinate value and feature parameter of each pixel to divide the page to be pasted into N types of areas, where N is an integer greater than 1; and a determination module for arranging the N types of areas in descending order of the grayscale value of the cluster center point, and determining the pasting position of the book label according to the principle of giving priority to pasting to the area with the highest order.

[0021] The determination module specifically performs the following steps: S61, obtaining the shape and size of the book label; S62, taking the jth area in the arrangement as the intended pasting area, and setting the initial j=1; S63, judging whether the intended pasting area can accommodate the book label; S64, if yes, determining the position in the intended pasting area that can accommodate the book label as the pasting position; S65, if no, merging the j+1th area in the arrangement into the intended pasting area, and returning to step S63.

[0022] A non-transitory computer-readable storage medium stores a computer program, which implements the above-mentioned method for determining the location of a book label when executed by a processor.

[0023] A book collecting and editing device includes a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the above-mentioned method for determining the location of a book label is implemented.

[0024] Beneficial effects of the present invention:

[0025] The present invention obtains edge parameters and grayscale parameters of each pixel according to the grayscale value of each pixel in the grayscale image of the page to be pasted, obtains feature parameters of each pixel according to the edge parameters and grayscale parameters of each pixel, and performs pixel clustering according to the coordinate value and feature parameter of each pixel to achieve division into multiple regions. Finally, the multiple regions are arranged in descending order according to the grayscale value of the cluster center point, and the pasting position of the book label is determined according to the principle of giving priority to pasting on the region with the highest order. In this way, the pasting position of the book label can be effectively and reasonably determined, so that the book label can be pasted on the most appropriate region as much as possible, ensuring successful pasting of the book label and avoiding obstruction of text as much as possible. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 This is a flow chart of a method for determining a book label pasting position according to an embodiment of the present invention;

[0027] Figure 2 Schematic diagram of a block diagram of a device for determining a book label pasting position according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0029] like Figure 1 As shown, the method for determining the book label pasting position according to an embodiment of the present invention is characterized by comprising the following steps:

[0030] S1, collecting the image of the page to be pasted.

[0031] The method for determining the location of book labeling according to the embodiment of the present invention can be performed in the labeling process during the book collection and editing process. In this process, a camera can be used to capture an image of a page to be labeled, such as a book title page.

[0032] S2, grayscale processing is performed on the image of the page to be pasted to obtain a grayscale image, and the grayscale value and coordinate value of each pixel in the grayscale image are obtained.

[0033] Before grayscale processing, the collected image can also be subjected to filtering, distortion correction and other processing.

[0034] S3, obtaining edge parameters and grayscale parameters of each pixel according to the grayscale value of each pixel in the grayscale image.

[0035] Since the text, an important target in the page to be pasted, is relatively small in size and has large morphological differences, the edge features in the embodiment of the present invention are extracted by second-order differential. In one embodiment of the present invention, the edge parameters of a pixel with coordinate values ​​(x, y) are:

[0036]

[0037] Among them, E represents the edge parameter, which is a second-order square matrix, I xx , I xy , I yx , I yy They are the second-order differentials of the pixel with coordinate value (x, y) in the horizontal direction, left oblique direction, right oblique direction, and vertical direction respectively. xx , I xy , I yx , I yy The expression is as follows:

[0038] I xx =I(x+1,y)+I(x-1,y)-2I(x,y)

[0039] I yy =I(x,y+1)+I(x,y-1)-2I(x,y)

[0040] I xy =I(x+1,y+1)+I(x-1,y-1)-2I(x,y)

[0041] I yx =I(x+1,y-1)+I(x-1,y+1)-2I(x,y)

[0042] Wherein, I(x,y) represents the grayscale value of the pixel with coordinate value (x,y).

[0043] In one embodiment of the present invention, the grayscale parameter of a pixel with coordinate values ​​(x, y) is:

[0044]

[0045] Here, g represents the grayscale parameter, G(x,y) is the grayscale value of the pixel at coordinates (x,y), and σ is the standard deviation of the grayscale values ​​of all pixels in the grayscale image. By introducing the standard deviation of the grayscale values ​​of all pixels in the grayscale image, errors caused by uneven depth of text or patterns on the page can be reduced.

[0046] S4, obtaining a feature parameter of each pixel according to the edge parameter and grayscale parameter of each pixel.

[0047] Specifically, step S4 includes S41 to S43:

[0048] S41, multiplying the edge parameter and grayscale parameter of each pixel to obtain a fusion matrix for each pixel.

[0049] Right now:

[0050] R=gE

[0051] Where R represents the fusion matrix of the pixel with coordinate value (x, y). The pixel fusion matrix can reflect both the edge features and grayscale features of the pixel.

[0052] S42, obtain two eigenvalues ​​of the fusion matrix through singular value decomposition.

[0053] S43, according to the two eigenvalues ​​of the fusion matrix, obtain the characteristic parameters of each pixel by the following formula:

[0054]

[0055] Among them, F i represents the characteristic parameter of the i-th pixel, i represents the pixel number. From the above formulas, it can be seen that the so-called i-th pixel here is the pixel with coordinate value (x, y), λ1 and λ2 are two eigenvalues, and a and b are constants. The square ratio of the two eigenvalues ​​can reflect the relative change of the two features, while the square sum of the two eigenvalues ​​can reflect the comprehensive status of the two features. a and b are values ​​used to control the stability of the features and can be obtained based on experience or through experiments. In a specific embodiment of the present invention, a is 3 and b is 2.

[0056] S5 , performing pixel clustering according to the coordinate value and feature parameter of each pixel, and dividing the page to be pasted into N areas, where N is an integer greater than 1.

[0057] Pixel clustering can realize the division of image regions. In one embodiment of the present invention, when pixel clustering is performed based on the coordinate value and feature parameters of each pixel, the similarity measurement function in the clustering algorithm is:

[0058] D=αd(p i ,C j )+βFi -F Cj

[0059] Where D is the distance parameter in the clustering algorithm, i is the number of pixels, j is the number of region types, i and j are both positive integers, and i≤M, j≤N, M is the total number of pixels in the grayscale image, N is the total number of region types, p i is the coordinate value of the i-th pixel, C j is the coordinate value of the cluster center of the jth region, d(p i ,C j ) represents the Euclidean distance between the i-th pixel and the cluster center of the j-th region, F i is the characteristic parameter of the i-th pixel, F Cj is the characteristic parameter of the cluster center of the jth region. α and β are the spatial weight coefficient and characteristic weight coefficient, respectively, which can be obtained based on experience or through experiments. Generally, α<β. In a specific embodiment of the present invention, α is 0.2 and β is 0.8.

[0060] In one embodiment of the present invention, the page to be pasted can be divided into the following three areas: 1. The area containing text and patterns on the front; 2. The area containing text and patterns on the back or the next page (caused by the transparency of the paper); 3. A pure blank area (containing neither text and patterns on the front nor text and patterns on the back or the next page, and the same color as the paper). It should be understood that in some embodiments, other forms of area division may be used, such as dividing the front text and patterns into two or more areas, which are not listed here.

[0061] S6, arranging the N types of regions in descending order according to the grayscale values ​​of the cluster centers, and determining the affixing positions of the book labels according to the principle of giving priority to affixing the book labels to the regions with the highest order.

[0062] Given that in a typical grayscale image of a book page to be labeled, the grayscale value of a pure blank area is larger than that of other areas, and the grayscale value of text and patterns on the back and next page is larger than that of the front. Furthermore, the areas on the front with printed content and larger grayscale values ​​are mostly patterns rather than text. Therefore, the core determination principle in the embodiment of the present invention is to preferentially affix book labels to areas with larger grayscale values. Specifically, after arranging the N types of areas in descending order of the grayscale value of the cluster center point, the determination of the book label affixing position can be achieved through steps S61 to S65:

[0063] S61, obtaining the shape and size of the book label.

[0064] Book labels are generally square. Taking a square as an example, the length and width of the book label can be obtained.

[0065] S62: The j-th region in the arrangement is used as the intended pasting region, and the initial j=1 is set.

[0066] S63, judging whether the area to be pasted can accommodate the book label.

[0067] That is, it is determined whether there is a connected area in the intended pasting area, whose length and width are respectively larger than the length and width of the book label.

[0068] S64: If yes, determine the position in the intended pasting area that can accommodate the book label as the pasting position.

[0069] S65: If not, merge the j+1th area in the arrangement into the area to be pasted, and return to step S63.

[0070] That is, it is gradually determined whether one or more regions with larger grayscale values ​​can accommodate the book label, and when it is determined that the region with smaller grayscale values ​​can accommodate the book label, the region with smaller grayscale values ​​is no longer considered.

[0071] According to an embodiment of the present invention, a method for determining a book label pasting position obtains edge parameters and grayscale parameters of each pixel based on the grayscale value of each pixel in a grayscale image of a page to be pasted, obtains feature parameters of each pixel based on the edge parameters and grayscale parameters of each pixel, and clusters pixels based on the coordinate values ​​and feature parameters of each pixel to achieve division into multiple regions. Finally, the multiple regions are arranged in descending order according to the grayscale value of the cluster center point, and the pasting position of the book label is determined based on the principle of giving priority to pasting in the regions with the highest order. In this way, the pasting position of the book label can be effectively and reasonably determined, so that the book label can be pasted in the most appropriate region as much as possible, ensuring successful pasting of the book label and minimizing obstruction of text.

[0072] Corresponding to the method for determining a book label pasting position in the above embodiment, the present invention further provides a device for determining a book label pasting position.

[0073] like Figure 2As shown, the apparatus for determining the location of affixing a book label according to an embodiment of the present invention includes an acquisition module 10, a processing module 20, a first acquisition module 30, a second acquisition module 40, a clustering module 50, and a determination module 60. The acquisition module 10 is configured to acquire an image of the page to be affixed; the processing module 20 is configured to grayscale the image of the page to be affixed to obtain a grayscale image and obtain the grayscale value and coordinate value of each pixel in the grayscale image; the first acquisition module 30 is configured to obtain the edge parameter and grayscale parameter of each pixel based on the grayscale value of each pixel in the grayscale image; the second acquisition module 40 is configured to obtain the feature parameter of each pixel based on the edge parameter and grayscale parameter of each pixel; the clustering module 50 is configured to cluster pixels based on the coordinate value and feature parameter of each pixel, dividing the page to be affixed into N regions, where N is an integer greater than 1; and the determination module 60 is configured to arrange the N regions in descending order of the grayscale value of the cluster center point, and determine the affixing location of the book label based on the principle of preferentially affixing the book label to the region with the highest order.

[0074] The apparatus for determining the location of book labeling according to the embodiment of the present invention can be provided at a labeling station of a book collecting and editing device. The acquisition module 10 can be a camera, which can capture images of pages to be labeled, such as book cover pages, at the station.

[0075] Before gray-scaling the image of the page to be pasted, the processing module 20 may further perform filtering, distortion correction, and other processing on the image collected by the collection module 10 .

[0076] Since the text, an important target in the page to be pasted, is relatively small in size and has large morphological differences, the edge features in the embodiment of the present invention are extracted by second-order differential. In one embodiment of the present invention, the edge parameters of a pixel with coordinate values ​​(x, y) are:

[0077]

[0078] Among them, E represents the edge parameter, which is a second-order square matrix, I xx , I xy , I yx , I yy They are the second-order differentials of the pixel with coordinate value (x, y) in the horizontal direction, left oblique direction, right oblique direction, and vertical direction respectively. xx , I xy , I yx , I yy The expression is as follows:

[0079] I xx =I(x+1,y)+I(x-1,y)-2I(x,y)

[0080] Iyy =I(x,y+1)+I(x,y-1)-2I(x,y)

[0081] I xy =I(x+1,y+1)+I(x-1,y-1)-2I(x,y)

[0082] I yx =I(x+1,y-1)+I(x-1,y+1)-2I(x,y)

[0083] Wherein, I(x,y) represents the grayscale value of the pixel with coordinate value (x,y).

[0084] In one embodiment of the present invention, the grayscale parameter of a pixel with coordinate values ​​(x, y) is:

[0085]

[0086] Here, g represents the grayscale parameter, G(x,y) is the grayscale value of the pixel at coordinates (x,y), and σ is the standard deviation of the grayscale values ​​of all pixels in the grayscale image. By introducing the standard deviation of the grayscale values ​​of all pixels in the grayscale image, errors caused by uneven depth of text or patterns on the page can be reduced.

[0087] Specifically, the second acquisition module 40 may multiply the edge parameter and the grayscale parameter of each pixel to obtain a fusion matrix for each pixel, that is:

[0088] R=gE

[0089] Where R represents the fusion matrix of the pixel with coordinate value (x, y). The pixel fusion matrix can reflect both the edge features and grayscale features of the pixel.

[0090] Then, the second acquisition module 40 may obtain two eigenvalues ​​of the fusion matrix by singular value decomposition, and obtain the characteristic parameter of each pixel according to the two eigenvalues ​​of the fusion matrix by the following formula:

[0091]

[0092] Among them, F i represents the characteristic parameter of the i-th pixel, i represents the pixel number. From the above formulas, it can be seen that the so-called i-th pixel here is the pixel with coordinate value (x, y), λ1 and λ2 are two eigenvalues, and a and b are constants. The square ratio of the two eigenvalues ​​can reflect the relative change of the two features, while the square sum of the two eigenvalues ​​can reflect the comprehensive status of the two features. a and b are values ​​used to control the stability of the features and can be obtained based on experience or through experiments. In a specific embodiment of the present invention, a is 3 and b is 2.

[0093] Pixel clustering can realize the division of image regions. In one embodiment of the present invention, when the clustering module 50 performs pixel clustering according to the coordinate value and feature parameter of each pixel, the similarity measurement function in the clustering algorithm is:

[0094] D=αd(p i ,C j )+βF i -F Cj

[0095] Where D is the distance parameter in the clustering algorithm, i is the number of pixels, j is the number of region types, i and j are both positive integers, and i≤M, j≤N, M is the total number of pixels in the grayscale image, N is the total number of region types, p i is the coordinate value of the i-th pixel, C j is the coordinate value of the cluster center of the jth region, d(p i ,C j ) represents the Euclidean distance between the i-th pixel and the cluster center of the j-th region, F i is the characteristic parameter of the i-th pixel, F Cj is the characteristic parameter of the cluster center of the jth region. α and β are the spatial weight coefficient and characteristic weight coefficient, respectively, which can be obtained based on experience or through experiments. Generally, α<β. In a specific embodiment of the present invention, α is 0.2 and β is 0.8.

[0096] In one embodiment of the present invention, clustering module 50 may divide the page to be pasted into the following three types of regions: 1. The area containing text and patterns on the front; 2. The area containing text and patterns on the back or the next page (caused by the transparency of the paper); and 3. A pure blank area (containing neither text and patterns on the front nor text and patterns on the back or the next page, and having the same color as the paper). It should be understood that in some embodiments, other forms of regional division may be employed, such as dividing the front text and patterns into two or more types of regions, which are not listed here.

[0097] Given that in a typical grayscale image of a book page to be labeled, the grayscale value of a pure blank area is larger than that of other areas, and the grayscale value of text and patterns on the back and next page is larger than that of the front. Furthermore, the areas on the front with printed content and larger grayscale values ​​are mostly patterns rather than text. Therefore, the core determination principle in this embodiment of the present invention is to prioritize affixing book labels to areas with larger grayscale values. Specifically, after arranging the N types of areas in descending order of the grayscale value of the cluster center point, the determination module 60 can determine the book label affixing location through steps S61 to S65:

[0098] S61, obtaining the shape and size of the book label.

[0099] Book labels are generally square. Taking a square as an example, the length and width of the book label can be obtained.

[0100] S62: The j-th region in the arrangement is used as the intended pasting region, and the initial j=1 is set.

[0101] S63, judging whether the area to be pasted can accommodate the book label.

[0102] That is, it is determined whether there is a connected area in the intended pasting area, whose length and width are respectively larger than the length and width of the book label.

[0103] S64: If yes, determine the position in the intended pasting area that can accommodate the book label as the pasting position.

[0104] S65: If not, merge the j+1th area in the arrangement into the area to be pasted, and return to step S63.

[0105] That is, it is gradually determined whether one or more regions with larger grayscale values ​​can accommodate the book label, and when it is determined that the region with smaller grayscale values ​​can accommodate the book label, the region with smaller grayscale values ​​is no longer considered.

[0106] According to an embodiment of the present invention, a device for determining a book label pasting position obtains edge parameters and grayscale parameters of each pixel based on the grayscale value of each pixel in a grayscale image of a page to be pasted, obtains feature parameters of each pixel based on the edge parameters and grayscale parameters of each pixel, and clusters pixels based on the coordinate value and feature parameters of each pixel to achieve division into multiple regions. Finally, the multiple regions are arranged in descending order according to the grayscale value of the cluster center point, and the pasting position of the book label is determined based on the principle of giving priority to pasting in the region with the highest order. In this way, the pasting position of the book label can be effectively and reasonably determined, so that the book label can be pasted in the most appropriate region as much as possible, ensuring successful pasting of the book label and minimizing obstruction of text.

[0107] Corresponding to the above embodiment, the present invention further proposes a non-transitory computer-readable storage medium.

[0108] The non-transitory computer-readable storage medium of an embodiment of the present invention stores a computer program, which, when executed by a processor, implements the method for determining the book label sticking position of any of the above embodiments.

[0109] According to the non-transitory computer-readable storage medium of an embodiment of the present invention, when the computer program stored thereon is executed by a processor, it is possible to effectively and reasonably determine the affixation position of the book label, thereby affixing the book label to the most appropriate area as much as possible, ensuring successful affixation of the book label while minimizing obstruction of text.

[0110] Corresponding to the above embodiment, the present invention also provides a book collecting and editing device.

[0111] The book collecting and editing device of an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for determining the location of affixing a book label of any of the above embodiments is implemented.

[0112] The book collecting and editing device according to the embodiment of the present invention can effectively and reasonably determine the pasting position of the book label, so as to paste the book label in the most appropriate area as much as possible, ensure the successful pasting of the book label and avoid blocking the text as much as possible.

[0113] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of such features. "Multiple" means two or more, unless otherwise specifically defined.

[0114] In the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," "connect," "fixed," etc. should be understood broadly. For example, they may refer to fixed connection, detachable connection, or integration; mechanical connection or electrical connection; direct connection or indirect connection through an intermediate medium; internal communication between two components or interaction between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.

[0115] In the present invention, unless otherwise expressly specified or limited, when a first feature is "above" or "below" a second feature, it may mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediary. Furthermore, when a first feature is "above," "above," or "above" a second feature, it may mean that the first feature is directly above or diagonally above the second feature, or simply means that the first feature is at a higher level than the second feature. When a first feature is "below," "below," or "below" a second feature, it may mean that the first feature is directly below or diagonally below the second feature, or simply means that the first feature is at a lower level than the second feature.

[0116] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0117] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.

[0118] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection having one or more wires (electronic devices), a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.

[0119] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0120] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0121] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.

[0122] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A method for determining a book label pasting position, characterized in that: The following steps are involved: S1, collecting the image of the page to be pasted; S2, grayscale processing is performed on the image of the page to be pasted to obtain a grayscale image, and the grayscale value and coordinate value of each pixel in the grayscale image are obtained; S3, obtaining edge parameters and grayscale parameters of each pixel according to the grayscale value of each pixel in the grayscale image; S4, obtaining a feature parameter of each pixel based on the edge parameter and grayscale parameter of each pixel, specifically multiplying the edge parameter and grayscale parameter of each pixel to obtain a fusion matrix for each pixel, obtaining two eigenvalues ​​of the fusion matrix through singular value decomposition, and obtaining a feature parameter of each pixel based on the two eigenvalues ​​of the fusion matrix; S5, performing pixel clustering according to the coordinate value and characteristic parameters of each pixel, and dividing the page to be pasted into N Regions, among which N is an integer greater than 1, N The following areas are included:

1. The area with text and pattern on the front; 2. The area with text and pattern on the back or the area with text and pattern on the next page; 3. The pure blank area; S6, the N The regions are arranged in descending order according to the grayscale value of the cluster center point, and the pasting position of the book label is determined according to the principle of giving priority to the region with the highest order. When clustering pixels based on the coordinate values ​​and feature parameters of each pixel, the similarity measurement function in the clustering algorithm is: ; in, D represents the distance parameter in the clustering algorithm, i Indicates the pixel number, j A serial number indicating the type of region. i and j are all positive integers, and i ≤ M , j ≤ N , M is the total number of pixels in the grayscale image, N is the total number of regional types, p i For the i The coordinate value of the pixel, C j For the j The coordinate values ​​of the cluster center of the seed area, Indicates the i pixels and j The Euclidean distance of the cluster center of the region, F i For the i The characteristic parameters of pixels, F Cj For the j The characteristic parameters of the cluster center of the region, α 、 β are spatial weight coefficient and characteristic weight coefficient respectively, Determining the pasting position of the book label according to the principle of giving priority to pasting in the area with the highest order, specifically includes: S61, obtaining the shape and size of the book label; S62, taking the jth area in the arrangement as the intended pasting area, and setting the initial j=1; S63, judging whether the intended pasting area can accommodate the book label; S64, if yes, determining the position in the intended pasting area that can accommodate the book label as the pasting position; S65, if no, merging the j+1th area in the arrangement into the intended pasting area, and returning to step S63.

2. The method for determining the location of a book label according to claim 1, wherein: The coordinate value is ( x , y ) is: ; in, E Represents the edge parameters, which is a second-order square matrix, I xx 、 I xy 、 I yx 、 I yy The coordinate values ​​are ( x , y ) in the horizontal, left diagonal, right diagonal, and vertical directions.

3. The method for determining the location of a book label according to claim 2, wherein: The coordinate value is ( x , y ) is: ; in, g represents the grayscale parameter, G ( x , y ) is the coordinate value of ( x , y )’s grayscale value, σ is the standard deviation of the grayscale values ​​of all pixels in the grayscale image.

4. The method for determining the location of a book label according to claim 3, wherein: The characteristic parameters of each pixel are obtained by the following formula: ; in, F i Indicates the i The characteristic parameters of pixels, i Indicates the pixel number, λ 1. λ 2 are the two eigenvalues, a 、 b are all constants.

5. A device for determining the location of a book label, characterized in that: include: A collection module, the collection module is used to collect the image of the page to be pasted; a processing module configured to grayscale the image of the page to be pasted to obtain a grayscale image, and acquire a grayscale value and a coordinate value of each pixel in the grayscale image; a first acquisition module, configured to acquire an edge parameter and a grayscale parameter of each pixel according to a grayscale value of each pixel in the grayscale image; a second acquisition module, configured to acquire a feature parameter of each pixel based on an edge parameter and a grayscale parameter of each pixel, specifically multiplying the edge parameter and the grayscale parameter of each pixel to obtain a fusion matrix for each pixel, obtaining two eigenvalues ​​of the fusion matrix by singular value decomposition, and obtaining a feature parameter of each pixel based on the two eigenvalues ​​of the fusion matrix; Clustering module, the clustering module is used to perform pixel clustering according to the coordinate value and feature parameters of each pixel, and divide the page to be pasted into N Regions, among which N is an integer greater than 1, N The following areas are included:

1. The area with text and pattern on the front; 2. The area with text and pattern on the back or the area with text and pattern on the next page; 3. The pure blank area; A determination module, the determination module is used to N The regions are arranged in descending order according to the grayscale value of the cluster center point, and the pasting position of the book label is determined according to the principle of giving priority to the region with the highest order. When the clustering module clusters pixels according to the coordinate values ​​and feature parameters of each pixel, the similarity measurement function in the clustering algorithm is: ; in, D represents the distance parameter in the clustering algorithm, i Indicates the pixel number, j A serial number indicating the type of region. i and j are all positive integers, and i ≤ M , j ≤ N , M is the total number of pixels in the grayscale image, N is the total number of regional types, p i For the i The coordinate values ​​of pixels, C j For the j The coordinate values ​​of the cluster center of the seed area, Indicates the i pixels and j The Euclidean distance of the cluster center of the region, F i For the i The characteristic parameters of pixels, F Cj For the j The characteristic parameters of the cluster center of the region, α 、 β are spatial weight coefficient and characteristic weight coefficient respectively, The determining module specifically performs the following steps: S61, obtaining the shape and size of the book label; S62, j The area to be pasted is selected and the initial j =1; S63, determine whether the area to be pasted can accommodate the book label; S64, if yes, determine the position in the area to be pasted that can accommodate the book label as the pasting position; S65, if no, j +1 type of area is merged into the area to be pasted, and the process returns to step S63.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for determining a book label sticking position according to any one of claims 1 to 4 is implemented.

7. A book collection and editing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for determining a book label sticking position according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Book labeling position acquisition method and self-adaptive labeling method and system

    CN114572505A

  • Method, device and equipment for extracting aortic dissection membrane

    CN115641297A