File inventory method, device, electronic device and storage medium
Through the archive inventory method combining contour features and texture analysis of camera and OCR technology, the high cost and inflexible identification brought about by QR codes and RFID tags in the existing technology are solved, and efficient and accurate archive inventory is achieved.
Patent Information
- Application Number
- CN202510812614.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-06-18
AI Technical Summary
The existing archive inventory technology relies on QR codes or RFID tags, which increases management costs and workload, and the scope of RFID identification is limited and it is not flexible enough to use.
The camera is used to combine OCR technology to identify the text information in the archive image, combine the contour characteristics and texture randomness, reflective characteristics and placement scene context information to determine the authenticity of the archive box, and use fill lights to obtain the image by multi-angle fill light.
It reduces the cost of file inventory, improves identification accuracy and efficiency, avoids misjudgment, prevents photo attacks, and simplifies the label pasting process.
Smart Images

Figure CN120340058B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an archive inventory method, device, electronic equipment and storage medium. Background Art
[0002] In the field of archive management, related technologies typically use traditional handheld file counting devices to conduct file inventory. These rely primarily on QR codes or RFID (radio frequency identification) technology for file identification. These devices require pre-attaching QR codes or RFID tags to the file boxes, and then scanning the tags to complete the inventory. However, this approach has significant drawbacks: First, attaching additional labels increases the cost and workload of file management. QR codes or RFID tags must be purchased and assigned labor to apply them. Furthermore, the spine of the file box already has a label containing the file number and title printed on it, so duplicating the labels does not meet standardized management requirements. Second, while RFID technology supports contactless identification, its reading range is limited, requiring close-range operation and certain positioning and angle requirements, making it inflexible. Summary of the Invention
[0003] The problem solved by the present invention is how to reduce the cost of file inventory.
[0004] To solve the above problems, the present invention provides a file inventory method, device, electronic device and storage medium.
[0005] In a first aspect, the present invention provides a file inventory method based on an inventory device, wherein the handheld inventory device includes a camera and a fill light; the file inventory method includes:
[0006] Using the camera to obtain the file image, and using OCR technology to identify the text information in the file image, and comparing the text information with the pre-stored information in the inventory library to obtain the file box information;
[0007] Extracting contour features of the file box from the file image, and verifying the contour features based on the file box information to obtain a verification result;
[0008] The texture randomness, reflective characteristics and placement scene context information are analyzed based on the archival image, the authenticity of the archive box is determined based on the texture randomness, the reflective characteristics and the placement scene context information, and the archive boxes in the archival image are counted and put into storage based on the determination result and the verification result, wherein the reflective characteristics are obtained based on the archival image taken after the fill light is used to fill in the archive at multiple angles.
[0009] Optionally, the acquiring of the archival image by using the camera includes:
[0010] Acquiring an original image of an archival file using the camera;
[0011] The archive original image is subjected to grayscale processing, noise reduction processing and histogram equalization processing to obtain the archive image.
[0012] Optionally, extracting contour features of the file box from the file image includes:
[0013] Using an edge algorithm to extract initial features of the file box in the file image, and performing symmetry analysis on the initial features;
[0014] The initial features are adjusted according to the analysis results to obtain the contour features.
[0015] Optionally, performing symmetry analysis on the initial features includes:
[0016] Screening the initial features that meet a preset shape and a preset area;
[0017] Obtaining the coordinate points of the initial features obtained by screening to obtain edge information;
[0018] The parallelism and length ratio between two oppositely arranged edges are determined according to the edge information.
[0019] Optionally, adjusting the initial features according to the analysis results to obtain the contour features includes:
[0020] Using perspective transformation, adjusting the shape of the initial feature according to the parallelism;
[0021] According to the length ratio, the initial feature after shape adjustment is scaled according to the file box information to obtain the outline feature.
[0022] Optionally, analyzing texture randomness, reflective properties, and placement scene context information based on the archival image, and determining the authenticity of the archive box according to the texture randomness, the reflective properties, and the placement scene context information includes:
[0023] Performing contour sampling on the contour feature, and performing Fourier transform on the coordinate points obtained by the sampling to obtain a first Fourier descriptor;
[0024] Performing contour sampling on the file box information, and performing Fourier transform on the sampled coordinate points to obtain a second Fourier descriptor;
[0025] The cosine similarity between the first Fourier descriptor and the second Fourier descriptor is obtained. When the cosine similarity is greater than or equal to a preset similarity threshold, the contour feature verification passes; when the cosine similarity is less than the preset similarity threshold, the contour feature verification fails.
[0026] Optionally, the acquiring of image information after fill light by the camera, analyzing texture randomness, reflective characteristics, and placement scene context information based on the image information, and determining the authenticity of the file box according to the texture randomness, the reflective characteristics, and the placement scene context information includes:
[0027] Extracting texture features of the image information after the fill light using a local binary pattern and analyzing the randomness of the texture features, and when the randomness of the texture features meets a preset judgment standard, a first judgment result is true;
[0028] Converting the image information after the fill light is applied to the HSV color space for reflection detection, and when the obtained reflection characteristics meet the preset judgment criteria, the second judgment result is true;
[0029] extracting placement context information from the image information after the fill light is applied, and when the placement context information meets the preset judgment standard, a third judgment result is true;
[0030] When the first determination result, the second determination result and the third determination result are all true, the file box is determined to be true.
[0031] In a second aspect, the present invention provides a file inventory device based on a handheld inventory device, wherein the handheld inventory device includes a camera and a fill light, including:
[0032] a recognition unit, configured to acquire an archive image using the camera, recognize text information in the archive image using OCR technology, and obtain archive box information by comparing the text information with pre-stored information in the inventory library;
[0033] a verification unit, configured to extract contour features of the file box from the file image, verify the contour features based on the file box information, and obtain a verification result;
[0034] A determination unit is configured to analyze texture randomness, reflective characteristics, and placement scene context information based on the archival image, determine the authenticity of the archive box based on the texture randomness, the reflective characteristics, and the placement scene context information, and inventory and store the archive boxes in the archival image based on the determination result and the verification result, wherein the reflective characteristics are obtained based on the archival image captured after the fill light is used to perform multi-angle fill lighting on the archive.
[0035] In a third aspect, the present invention provides an electronic device comprising a memory and a processor;
[0036] The memory is used to store computer programs;
[0037] The processor is configured to implement the archive inventory method described in the first aspect when executing the computer program.
[0038] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the archive inventory method as described in the first aspect is implemented.
[0039] The beneficial effects of the file inventory method of the present invention include: using a camera to capture file images, using optical character recognition (OCR) technology to identify textual information within the images, comparing the textual information with pre-stored information in an inventory database, obtaining file box information, and conducting a preliminary inventory of the file boxes. This method directly utilizes existing labels on the file box spines for OCR recognition, eliminating the additional cost and labor of attaching QR codes or RFID tags. The file box's outline features are extracted from the file image and verified against the file box information. By comparing these outline features with the file box information, file boxes with similar labels can be effectively distinguished, avoiding potential misjudgments that might result from relying solely on OCR technology to recognize textual information, and improving overall recognition accuracy. Based on the analysis of texture randomness, reflective properties, and placement scene context information of the archival image, the authenticity of the archive box is determined based on the texture randomness, reflective properties, and placement scene context information. The archive box in the archival image is then counted and stored according to the judgment result and verification result. For example, if the verification passes, the archive box is counted and stored; if the verification fails, an early warning is issued to the operator to indicate that there is a problem with the archive; if the judgment result is true, the archive box is counted and stored; if the judgment result is false, an early warning is issued to the operator to indicate that there is a problem with the archive; if only one of the judgment result and verification result passes, an early warning is issued to the operator to indicate that there is a problem with the archive, and the real archive box is effectively distinguished from the photo attack or non-archival box label. In particular, the reflective properties are acquired by multi-angle supplementary lighting according to the supplementary light, thereby improving the real-time and authenticity of the light emission properties acquisition. Based on the archive label and the archive shape, the present invention adopts OCR technology, contour feature comparison, and archive box determination and inventory based on texture randomness, reflective properties, and placement scene context information, effectively reducing the cost of archive inventory and improving inventory efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 Schematic diagram of the process of the file inventory method according to an embodiment of the present invention;
[0041] Figure 2 A schematic structural diagram of a file inventory device according to an embodiment of the present invention;
[0042] Figure 3 Schematic diagram of the structure of an inventory counting device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0043] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0044] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0045] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to"; the term "based on" means "based at least in part on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optionally" means "optional embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0046] It should be noted that the modifications of "one" and "multiple" mentioned in the present invention are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0047] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0048] In response to the problems existing in the above-mentioned related technologies, this embodiment provides an archive inventory method, device, electronic device and storage medium.
[0049] like Figure 1As shown, an embodiment of the present invention provides an archive inventory method based on an inventory device, which includes a camera and a fill light. The camera is a high-resolution camera responsible for collecting image data of the spine label of the archive box. Its automatic focus and wide-angle shooting functions ensure that images can be clearly captured at different distances and angles, and allow the operator to click on a specific point to achieve focus; the fill light is directly linked to the camera, and an ambient light sensor is also provided on it to monitor the ambient light intensity and color temperature in real time. The control circuit dynamically adjusts the brightness and color temperature of the multi-level LED fill light according to a preset threshold, for example, enhancing the fill light intensity in a low-light environment, reducing the fill light in a strong light environment, and synchronously optimizing the exposure parameters of the camera, thereby ensuring the quality of image acquisition; the inventory device also includes a human-computer interaction module, which can be a touch screen or physical button, for displaying the inventory results, realizing interaction between the user and the device, displaying the recognition results in real time and receiving operation instructions, forming a complete hardware closed loop from image acquisition to result feedback. The inventory device also includes a storage module for caching offline identification data. After the device is connected to the network, the data is synchronized to the back-end management system through the communication module (supporting USB, Wi-Fi or Bluetooth). The file inventory method includes:
[0050] Step S1: Use the camera to obtain a file image, and use OCR technology to identify text information in the file image, compare the text information with pre-stored information in the inventory library, and obtain file box information.
[0051] Specifically, an operator uses a handheld camera to capture an image of a file with a label on the back of a file box. Using optical character recognition (OCR) technology, the operator identifies the text within the file image, namely the file label. File labels are important tools for identifying, classifying, and managing files. The text on these labels includes information such as the file number, file name, filing date, and file category. Based on the text, the operator retrieves and compares the pre-stored information in the inventory library to confirm whether the file box is in the corresponding archive room or on the corresponding shelf. For example, if the captured text includes file number 10 and file name A, the operator retrieves and compares the pre-stored information in the inventory library to confirm that the file is stored in the pre-stored information file room 1 and file shelf 3. The operator can then confirm the file's location based on the pre-stored information file room 1 and file shelf 3. If an error is detected, an alarm can be issued to inform the operator that the file box has been placed incorrectly. Furthermore, the operator retrieves file box information, namely, the file box dimensions, based on the text for subsequent size determination.
[0052] It should be noted that before the camera obtains the archival image, the fill light can be turned on to fill in the light of the shooting environment in order to obtain a clearer archival image.
[0053] Step S2: extracting the outline features of the file box according to the file image, and verifying the outline features according to the file box information to obtain a verification result.
[0054] Specifically, for example, an edge algorithm is used to extract the contour features of the file box in the file image, which is the contour of the actual file box at the time of this inventory, and is compared and verified with the pre-stored file box information (input file box size information) obtained in step S1. If the contour features do not match the file box information, it means that the file box is different from the pre-stored file box, and an early warning is issued to the operator. If the contour features are the same as the file box information, the inventory record can be put into the warehouse and stored in the back-end device.
[0055] Step S3: Analyze texture randomness, reflective characteristics, and placement scene context information based on the archival image, determine the authenticity of the archive box based on the texture randomness, the reflective characteristics, and the placement scene context information, and inventory and store the archive boxes in the archival image based on the determination result and the verification result, wherein the reflective characteristics are obtained based on the archival image taken after the fill light is used to fill in the archive at multiple angles.
[0056] Specifically, when the camera acquires the file image, it also acquires the light intensity information, and uses the fill light to perform multi-angle fill light based on the light intensity information. For example, the fill light intensity is enhanced in a low-light environment, and the fill light is reduced in a strong-light environment. This is conducive to the acquisition of texture information and the acquisition of reflective characteristics, such as the reflective area at different angles, the change in the reflective area, etc. At the same time, the context information of the placement scene is acquired, such as the spacing and placement height of the file boxes placed on the left and right of the file box, and the pre-stored information is compared with the previously counted and stored information to determine whether the identified file box is a real file box, rather than a photo, etc., to prevent photo attacks or misidentification of non-file box labels.
[0057] In this embodiment, a camera captures archive images and uses optical character recognition (OCR) technology to identify text within them. This text is then compared with pre-stored information in an inventory database to obtain file box information. A preliminary inventory of the boxes is then performed, utilizing existing labels on the backs of the boxes for OCR recognition. This eliminates the additional cost and labor of attaching QR codes or RFID tags. The file box's outline features are extracted from the archive image and verified against the box information. This comparison effectively distinguishes file boxes with similar labels, avoiding potential misjudgments that might result from relying solely on OCR technology to recognize text, and improving overall recognition accuracy. Based on the analysis of texture randomness, reflective properties, and placement scene context information in archival images, the authenticity of the archive boxes is determined based on the texture randomness, reflective properties, and placement scene context information. The archive boxes in the archival images are then inventoried and stored based on the determination and verification results. For example, if the verification passes, the archive boxes are inventoried and stored; if the verification fails, an early warning is issued to the operator indicating that there is a problem with the archive; if the determination result is true, the archive boxes are inventoried and stored; if the determination result is false, an early warning is issued to the operator indicating that there is a problem with the archive, effectively distinguishing between real archive boxes and photo attacks or non-archival box labels. In particular, the reflective properties are acquired through multi-angle supplementary lighting based on a fill light, improving the real-time and authenticity of the light emission properties acquisition. Based on the archive labels and archive shapes, the present invention uses optical characterization (OCR) technology, contour feature comparison, and archive box identification and inventory based on texture randomness, reflective properties, and placement scene context information, effectively reducing archive inventory costs and improving inventory efficiency.
[0058] Optionally, the acquiring of the archival image by using the camera includes:
[0059] Using the camera to obtain the original image of the archive;
[0060] The archive original image is subjected to grayscale processing, noise reduction processing and histogram equalization processing to obtain the archive image.
[0061] Specifically, after obtaining the original image of the archive, grayscale processing is performed to convert the color image into a grayscale image to reduce the amount of data and highlight the material characteristics. Then, filtering operations such as median filtering are used to remove noise. Finally, histogram equalization is performed to enhance the image contrast, making the paper fiber texture on the surface of the archive box clearer, providing high-quality input information for subsequent recognition.
[0062] Optionally, extracting contour features of the file box from the file image includes:
[0063] An edge algorithm is used to extract initial features of the file box in the file image, and a symmetry analysis is performed on the initial features.
[0064] The initial features are adjusted according to the analysis results to obtain the contour features.
[0065] Specifically, after acquiring the archive image, edge detection algorithms such as the Canny operator and the Sobel operator are used to process the image, identifying the boundary between the archive box and the background in the image, thereby extracting the initial features of the archive box's outline. To avoid distortion of the extracted initial features due to tilt between the inventory device and the archive box, which could lead to errors in subsequent comparison and verification, the initial features are analyzed for symmetry after acquisition. If asymmetry is detected, the initial features are adjusted based on the analysis results, such as the tilt angle, to obtain the same angle as the outline features in the inventory library, thereby reducing comparison errors.
[0066] Optionally, performing symmetry analysis on the initial features includes:
[0067] Screening the initial features that meet a preset shape and a preset area;
[0068] Specifically, a contour detection function (such as the findContours function in the OpenCV library) is used to find all contours in the image, and then the contours are screened according to their area, perimeter and other features, and only the contours that meet the contour features of the file box are retained to obtain the initial features. For example, a preset shape and a preset area are set, the preset shape is a quadrilateral, and the preset area includes a minimum area threshold and a maximum area threshold. Contours that are not quadrilaterals, or that are too small or too large in area, are excluded, that is, contours that are not file boxes are excluded, and the final initial features that meet the requirements are obtained.
[0069] The coordinate points of the initial features obtained by screening are obtained to obtain edge information.
[0070] Specifically, for the extracted initial features, assuming that they are rectangular outlines (most file boxes are rectangular), the length and direction of the edges can be determined by the coordinate information of the outline points.
[0071] The parallelism and length ratio between two oppositely arranged edges are determined according to the edge information.
[0072] Specifically, the parallelism between the opposite sides is determined based on the acquired side lengths and directions. This is measured by calculating the angle between the side vectors of the two opposing sides. If the camera is level with the file box label, the angle between the opposite side vectors should be close to 0 or 180 degrees. A significant deviation (exceeding a set threshold, such as 5 degrees) indicates an asymmetry in the file box's outline and a misalignment between the camera and the label. Normally, the opposite sides of a rectangular file box should be equal in length, with a length ratio of 1. If this ratio deviates significantly from 1 (exceeding a set threshold, such as 0.1), it also indicates an asymmetry in the file box's outline and a tilted camera.
[0073] This embodiment also provides another method for determining the inclination between the camera and the file box label. Optionally, after using the camera to acquire the file image, using OCR technology to recognize text information in the file image, and comparing the text information with pre-stored information in the inventory library to obtain the file box information, the method further includes:
[0074] Obtaining the direction of text lines in the archival image;
[0075] The camera tilt is determined according to the angle between the text line direction and the horizontal direction.
[0076] Specifically, the text baseline is determined by detecting the arrangement direction of the text characters. The direction of the text baseline is the text line direction. If the angle between the text line direction and the horizontal direction exceeds the set threshold (such as 5 degrees), it means that the text is tilted, that is, the camera is not level with the file box label. The angle between the two is the inclination of the camera and the file box label. If the angle is positive, it means that the camera is tilted to the upper right; if the angle is negative, it means that the camera is tilted to the upper left.
[0077] Optionally, adjusting the initial features according to the analysis results to obtain the contour features includes:
[0078] The shape of the initial feature is adjusted according to the parallelism using perspective transformation.
[0079] Specifically, if the parallelism of the opposite sides does not meet the requirements (i.e., the angle exceeds a certain threshold, such as 5 degrees), perspective transformation (such as the getPerspectiveTransform and warpPerspective functions in the OpenCV library) is used to adjust the initial features so that the opposite sides are restored to parallelism and conform to the shape of the file box.
[0080] According to the length ratio, the initial feature after shape adjustment is scaled according to the file box information to obtain the outline feature.
[0081] Specifically, the calculated side length ratio is compared with the actual length ratio of the file box (obtained from a previously stored inventory database). If the length ratio deviates significantly (exceeding a certain threshold, such as 0.1), the image is scaled. Based on the deviation, a scaling factor is determined, and the image is scaled horizontally or vertically to bring the side length ratio of the file box closer to the actual value.
[0082] Furthermore, during the adjustment process, the parallelism and length ratio can be calculated iteratively multiple times, continuously optimizing the adjustment parameters until the preset accuracy requirements are met. Specifically, after the initial adjustment is completed, the calculated parallelism angle is compared with the parallelism error threshold to determine which pairs of sides do not meet the parallelism requirements. The calculated length ratio is compared with the length ratio error threshold and the actual length ratio to determine which sides have significant length ratio deviations. Based on the errors in parallelism and length ratio, the transformation matrix parameters are adjusted. For example, if a pair of opposite sides is found to be nonparallel, the rotation and translation parameters in the perspective transformation matrix are fine-tuned based on the vanishing point information of the opposite sides. If the length ratio deviates, the scaling parameters are adjusted. An optimization algorithm such as gradient descent can be used to determine the parameter adjustment direction and step size to gradually reduce the error. After each iteration, the termination criteria are checked. If the parallelism of all opposite sides is within the parallelism error threshold and the length ratio of all sides is within the length ratio error threshold, or if the maximum number of iterations has been reached, the iteration is terminated. If the termination criteria are not met, the next iteration is continued until the termination criteria are met.
[0083] Optionally, verifying the outline feature according to the file box information includes:
[0084] Performing contour sampling on the contour feature, and performing Fourier transform on the coordinate points obtained by the sampling to obtain a first Fourier descriptor;
[0085] Performing contour sampling on the file box information, and performing Fourier transform on the sampled coordinate points to obtain a second Fourier descriptor;
[0086] The cosine similarity between the first Fourier descriptor and the second Fourier descriptor is obtained. When the cosine similarity is greater than or equal to a preset similarity threshold, the contour feature verification passes; when the cosine similarity is less than the preset similarity threshold, the contour feature verification fails.
[0087] Specifically, sampling is performed along the shape of the contour feature to obtain a series of discrete points. These points are represented by coordinates, and the coordinates of the sampling points are regarded as discrete representations of functions related to arc length. The discrete points are converted into a continuous contour curve function through methods such as interpolation. The function is Fourier transformed to obtain multiple Fourier coefficients. The obtained Fourier coefficients are combined according to a rule to obtain the first Fourier descriptor. The second Fourier descriptor is obtained in the same way as the first Fourier descriptor. The cosine similarity between the first and second Fourier descriptors is then calculated to verify whether the contour feature meets the standard.
[0088] Optionally, analyzing texture randomness, reflective properties, and placement scene context information based on the archival image, and determining the authenticity of the archive box according to the texture randomness, the reflective properties, and the placement scene context information includes:
[0089] A local binary pattern is used to extract texture features of the image information after light filling and the randomness of the texture features is analyzed. When the randomness of the texture features meets a preset judgment standard, the first judgment result is true.
[0090] Specifically, the texture of authentic paper labels exhibits a natural and uneven texture due to their manufacturing process and material properties. For example, the fiber distribution of paper is random, and the printing process may cause slight ink bleed or unevenness, all of which lead to texture diversity. When using local binary patterns (LBP) to extract texture features from the illuminated image information and generate an LBP histogram, the histogram distribution is found to be relatively dispersed, indicating that the label texture contains a rich variety of patterns. This randomness can be further quantified by calculating the entropy value, which is generally high. In contrast, the texture of forged objects (such as photographs or non-authentic file labels) often has strong repetitiveness. Because they are often produced through copying, printing, etc., the texture lacks the natural variation of authentic labels, resulting in a relatively concentrated distribution and low entropy value on the LBP histogram. The preset judgment criteria include a preset entropy value. When the obtained entropy value is greater than or equal to the preset entropy value, the first judgment result is true; when the obtained entropy value is less than the preset entropy value, the first judgment result is false.
[0091] The image information after the fill light is converted into the HSV color space for reflection detection. When the obtained reflection characteristics meet the preset judgment standard, the second judgment result is true.
[0092] Specifically, after acquiring the image information after fill-lighting, the image is converted to the HSV (hue, saturation, value) color space for analysis. The HSV color space better aligns with human color perception and is more robust to changes in lighting and color. The surface material of a real file box typically produces diffuse reflections. Under multi-angle lighting, the resulting reflective areas are soft and irregular, and they dynamically change with the angle of illumination. Extensive experiments and statistical data show that the reflective area of a real file box is typically less than 15%. For example, when illuminated from different angles, the reflective areas appear irregularly distributed across the surface, without being overly concentrated or intense. In contrast, due to their surface properties, photos or screens are prone to concentrated specular reflections. Under the same multi-angle lighting conditions, their reflective areas often exceed 20%, with sharp edges, in stark contrast to the diffuse reflection characteristics of a real file box. Furthermore, further verification can be performed by combining the dynamic changes in the reflective area when the fill light is shaken at multiple angles. When the device is shaken to change the lighting angle, the reflective area of a real file box will move and change smoothly accordingly, while the reflective area of a photo or screen may appear unnaturally jumpy or remain fixed. These details can be used to more accurately determine the authenticity of the captured object. The preset judgment criteria include a preset reflective area ratio. When the obtained reflective area ratio is greater than or equal to the preset reflective area ratio, the second judgment result is false. When the obtained reflective area ratio is less than the preset reflective area ratio, the second judgment result is true.
[0093] Placement context information is extracted from the image information after the fill light is applied. When the placement context information meets the preset judgment standard, the third judgment result is true.
[0094] Specifically, placement context information includes information such as position, size, and alignment. In actual file management scenarios, file boxes are typically arranged in rows with a certain regularity. For example, the spacing between file boxes is generally consistent, and the horizontal alignment deviation of the file boxes is within a reasonable range. Learning and modeling are performed based on prior knowledge obtained from a previous inventory, establishing a structured model that conforms to the actual file box placement scenario, i.e., the preset judgment criteria. When analyzing the placement context information of the image after light filling, the arrangement of the file boxes in the image is detected, and parameters such as the spacing and horizontal alignment deviation between the file boxes are obtained. If the arrangement of the file boxes in the image conforms to the structured scenario based on the prior knowledge, i.e., the spacing is consistent and the horizontal alignment deviation is within a reasonable range, then the judgment that the captured object is a real file box is strengthened, and the third judgment result is true. Conversely, if the file boxes are arranged in a disorderly manner, or if there are unusual conditions such as excessive spacing or severe horizontal alignment deviation, it may be a case of photo manipulation or misidentification of non-file box labels, and the third judgment result is false.
[0095] When the first determination result, the second determination result and the third determination result are all true, the file box is determined to be true.
[0096] Specifically, if any one of the first determination result, the second determination result, and the third determination result is false, in order to improve determination accuracy, the final result is determined to be false.
[0097] like Figure 2 As shown, an embodiment of the present invention provides an archive inventory device 200, which is based on a handheld inventory device. The handheld inventory device includes a camera and a fill light, and further includes:
[0098] The recognition unit 210 is configured to use the camera to acquire an archive image, recognize text information in the archive image using OCR technology, and compare the text information with pre-stored information in the inventory library to obtain archive box information;
[0099] A verification unit 220 is configured to extract contour features of the file box from the file image, verify the contour features based on the file box information, and obtain a verification result;
[0100] The determination unit 230 is configured to analyze texture randomness, reflective characteristics, and placement scene context information based on the archival image, determine the authenticity of the archive box based on the texture randomness, the reflective characteristics, and the placement scene context information, and inventory and store the archive boxes in the archival image based on the determination result and the verification result, wherein the reflective characteristics are obtained based on the archival image captured after the fill light is used to fill in the archive at multiple angles.
[0101] like Figure 3 As shown, an electronic device 300 provided by an embodiment of the present invention includes a memory 310 and a processor 320; the memory 310 is used to store computer programs; the processor 320 is used to implement the above-mentioned file inventory method when executing the computer program.
[0102] In other words, an electronic device 300 includes a memory 310 and a processor 320 coupled to the memory 310; the memory 310 is configured to store a computer program; and the processor 320 is configured to perform the following operations when executing the computer program:
[0103] Using the camera to obtain the file image, and using OCR technology to identify the text information in the file image, and comparing the text information with the pre-stored information in the inventory library to obtain the file box information;
[0104] Extracting contour features of the file box from the file image, and verifying the contour features based on the file box information to obtain a verification result;
[0105] The texture randomness, reflective characteristics and placement scene context information are analyzed based on the archival image, the authenticity of the archive box is determined based on the texture randomness, the reflective characteristics and the placement scene context information, and the archive boxes in the archival image are counted and put into storage based on the determination result and the verification result, wherein the reflective characteristics are obtained based on the archival image taken after the fill light is used to fill in the archive at multiple angles.
[0106] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the above-mentioned archive inventory method is implemented.
[0107] In other words, a non-volatile computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the following operations:
[0108] Using the camera to obtain the file image, and using OCR technology to identify the text information in the file image, and comparing the text information with the pre-stored information in the inventory library to obtain the file box information;
[0109] Extracting contour features of the file box from the file image, and verifying the contour features based on the file box information to obtain a verification result;
[0110] The texture randomness, reflective characteristics and placement scene context information are analyzed based on the archival image, the authenticity of the archive box is determined based on the texture randomness, the reflective characteristics and the placement scene context information, and the archive boxes in the archival image are counted and put into storage based on the determination result and the verification result, wherein the reflective characteristics are obtained based on the archival image taken after the fill light is used to fill in the archive at multiple angles.
[0111] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM). In this application, the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in a single location or distributed across multiple network elements. Some or all of these units can be selected based on actual needs to achieve the objectives of the embodiments of the present invention. Furthermore, the functional units in the various embodiments of the present invention can be integrated into a single processing unit, each unit can exist physically separately, or two or more units can be integrated into a single unit. These integrated units can be implemented in either hardware or software functional units.
[0112] Although the present invention is disclosed as above, the protection scope of the present invention is not limited thereto. Those skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will fall within the protection scope of the present invention.
Claims
1. A file inventory method, characterized in that: Based on the inventory device, the inventory device includes a camera and a fill light; The file inventory method comprises: Using the camera to obtain the file image, and using OCR technology to identify the text information in the file image, and comparing the text information with the pre-stored information in the inventory library to obtain the file box information; Extracting contour features of the file box from the file image, and verifying the contour features based on the file box information to obtain a verification result; The texture randomness, reflective characteristics and placement scene context information are analyzed based on the archival image, the authenticity of the archive box is determined based on the texture randomness, the reflective characteristics and the placement scene context information, and the archive boxes in the archival image are counted and put into storage based on the determination result and the verification result, wherein the reflective characteristics are obtained based on the archival image taken after the fill light is used to fill in the archive at multiple angles.
2. The file inventory method according to claim 1, characterized in that: The method of obtaining the archive image by using the camera includes: Using the camera to obtain the original image of the archive; The archive original image is subjected to grayscale processing, noise reduction processing and histogram equalization processing to obtain the archive image.
3. The file inventory method according to claim 1, characterized in that: The step of extracting the contour features of the file box from the file image comprises: Using an edge algorithm to extract initial features of the file box in the file image, and performing symmetry analysis on the initial features; The initial features are adjusted according to the analysis results to obtain the contour features.
4. The file inventory method according to claim 3, characterized in that: The performing symmetry analysis on the initial features comprises: Screening the initial features that meet a preset shape and a preset area; Obtaining the coordinate points of the initial features obtained by screening to obtain edge information; The parallelism and length ratio between two oppositely arranged edges are determined according to the edge information.
5. The file inventory method according to claim 4, characterized in that: The adjusting the initial features according to the analysis results to obtain the contour features includes: Using perspective transformation, adjusting the shape of the initial feature according to the parallelism; According to the length ratio, the initial feature after shape adjustment is scaled according to the file box information to obtain the outline feature.
6. The file inventory method according to claim 5, characterized in that: The verifying of the outline feature according to the file box information includes: Performing contour sampling on the contour feature, and performing Fourier transform on the coordinate points obtained by the sampling to obtain a first Fourier descriptor; Performing contour sampling on the file box information, and performing Fourier transform on the sampled coordinate points to obtain a second Fourier descriptor; The cosine similarity between the first Fourier descriptor and the second Fourier descriptor is obtained. When the cosine similarity is greater than or equal to a preset similarity threshold, the contour feature verification passes; when the cosine similarity is less than the preset similarity threshold, the contour feature verification fails.
7. The file inventory method according to claim 1, characterized in that: Analyzing texture randomness, reflective properties, and placement scene context information based on the archival image, and determining the authenticity of the archive box based on the texture randomness, the reflective properties, and the placement scene context information includes: Extracting texture features of the image information after the fill light using a local binary pattern and analyzing the randomness of the texture features, and when the randomness of the texture features meets a preset judgment standard, a first judgment result is true; Converting the image information after the fill light is applied to the HSV color space for reflection detection, and when the obtained reflection characteristics meet the preset judgment criteria, the second judgment result is true; extracting placement context information from the image information after the fill light is applied, and when the placement context information meets the preset judgment standard, a third judgment result is true; When the first determination result, the second determination result and the third determination result are all true, the file box is determined to be true.
8. A file inventory device, characterized in that: Based on a handheld inventory device, the handheld inventory device includes a camera and a fill light, including: a recognition unit, configured to acquire an archive image using the camera, recognize text information in the archive image using OCR technology, and obtain archive box information by comparing the text information with pre-stored information in the inventory library; a verification unit, configured to extract contour features of the file box from the file image, verify the contour features based on the file box information, and obtain a verification result; A determination unit is configured to analyze texture randomness, reflective characteristics, and placement scene context information based on the archival image, determine the authenticity of the archive box based on the texture randomness, the reflective characteristics, and the placement scene context information, and inventory and store the archive boxes in the archival image based on the determination result and the verification result, wherein the reflective characteristics are obtained based on the archival image captured after the fill light is used to perform multi-angle fill lighting on the archive.
9. An electronic device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is configured to implement the archive inventory method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by the processor, the archive inventory method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Systems and methods for file archiving
EP3992979A1
Automated library system with retrieving and repositing robot
US20010020197A1