Image processing method, device, equipment and storage medium
The image is divided into multiple images to be recognized through a custom graphics grid, which solves the cumbersome problem of obtaining ID card information through image recognition in the existing technology, achieves fast and accurate acquisition of multiple ID card images, and improves work efficiency.
Patent Information
- Application Number
- CN201910172945.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-03-07
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2039-03-07
AI Technical Summary
In the existing technology, the process of obtaining ID card information through image recognition is cumbersome, time-consuming and labor-intensive, which reduces the work efficiency of workers in the labor transportation chain.
Using an image processing method based on a custom graphics grid, a custom graphics grid is generated by obtaining a graphics grid image drawn on the physical carrier plane, and the image to be processed is divided into a set number of images to be identified, and the images are Recognition technology obtains image information.
It is possible to easily, quickly and accurately obtain images of multiple ID cards through one image acquisition, which improves the work efficiency of workers in the labor transportation chain.
Smart Images

Figure CN109829516B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of image recognition technology, and in particular to an image processing method and apparatus, device and storage medium based on a custom graphic grid. Background Art
[0002] Image recognition technology is an important field of artificial intelligence. It refers to the technology of using computers to process, analyze and understand images to identify targets and objects of various different patterns. Image recognition technology plays a vital role in many fields such as finance, security, and exploration.
[0003] In the chain of labor delivery, it is necessary to collect a large amount of identity information of laborers. In the prior art, the identity information of laborers is generally obtained by taking an image of the laborers' identity certificate (such as an ID card, etc.) and then using image recognition technology. Furthermore, since the existing image recognition technology can only accurately recognize an image that only includes one ID card, when obtaining the identity information of laborers through image recognition technology, the image obtained by each shooting can only include an image of one ID card, and cannot include images of multiple ID cards.
[0004] In the process of realizing the present invention, the inventors found that the prior art has the following defects: the process of obtaining identity card information through image recognition is relatively cumbersome, time-consuming and labor-intensive, which reduces the work efficiency of the staff in the labor delivery chain. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides an image processing method and apparatus, a device and a storage medium based on a custom graphic grid, so as to achieve a simple, fast and accurate acquisition of images of multiple ID cards through a single image acquisition.
[0006] In a first aspect, an embodiment of the present invention provides an image processing method based on a custom graphic grid, comprising:
[0007] Acquire an image of a graphic grid drawn on a plane of a physical carrier as an image to be processed;
[0008] According to the image to be processed, generating a custom graphic grid for dividing the image;
[0009] According to the received grid selection instruction, a corresponding graphic grid is selected to divide the image to be divided into a set number of images to be identified.
[0010] In the above method, optionally, the length ratio of any two line segments in the custom graphic grid is the same as the length ratio of two line segments corresponding to the any two line segments in the drawn graphic grid.
[0011] In the above method, optionally, generating a custom graphic grid for dividing the image according to the image to be processed specifically includes:
[0012] Based on the OpenCV technology, a custom graphic grid for dividing the image is generated according to the image to be processed.
[0013] In the above method, optionally, the physical carrier is solid color paper.
[0014] In the above method, optionally, the selecting a corresponding graphic grid according to the received grid selection instruction to divide the image to be divided into a set number of images to be identified includes:
[0015] According to the received grid selection instruction, a graphic grid matching the image to be processed is selected from the custom graphic grids as a set graphic grid;
[0016] The image to be divided is acquired by setting a graphic grid, and the image to be divided is divided into a set number of images to be identified according to the set graphic grid.
[0017] In the above method, optionally, the selecting a corresponding graphic grid according to the received grid selection instruction to divide the image to be divided into a set number of images to be identified includes:
[0018] According to the received grid selection instruction, a preset graphic grid is selected from the graphic grid template as a set graphic grid;
[0019] The image to be divided is acquired by setting a graphic grid, and the image to be divided is divided into a set number of images to be identified according to the set graphic grid.
[0020] In the above method, optionally, after selecting the corresponding graphic grid according to the received grid selection instruction and dividing the image to be divided into a set number of images to be identified, the method further includes:
[0021] Determining whether each of the to-be-recognized images is a valid to-be-recognized image;
[0022] Acquire valid image information corresponding to the image to be recognized.
[0023] In the above method, optionally, the step of determining whether each of the to-be-recognized images is a valid to-be-recognized image includes:
[0024] Determine whether each of the images to be identified includes a face image, and / or set text information.
[0025] In the above method, optionally, the obtaining of valid image information corresponding to the image to be identified includes:
[0026] Sending the valid image to be recognized to a first device and a second device having an image recognition function respectively;
[0027] The image information corresponding to the image to be identified is determined according to the first image identification information and the second image identification information corresponding to the image to be identified which are respectively fed back by the first device and the second device.
[0028] In the above method, optionally, determining the image information corresponding to the image to be identified according to the first image identification information and the second image identification information corresponding to the image to be identified respectively fed back by the first device and the second device, includes:
[0029] If the first image recognition information and the second image recognition information corresponding to the image to be recognized fed back by the first device and the second device are different, sending the image to be recognized to a third device with an image recognition function;
[0030] Determine image information corresponding to the image to be identified according to the first image identification information, the second image identification information, and the third image identification information corresponding to the image to be identified and fed back by the third device;
[0031] If the first image recognition information and the second image recognition information corresponding to the image to be recognized respectively fed back by the first device and the second device are the same, it is determined that the image information corresponding to the image to be recognized is the first image recognition information or the second image recognition information.
[0032] In a second aspect, an embodiment of the present invention provides an image processing device based on a custom graphic grid, comprising:
[0033] The module for acquiring an image to be processed is used to acquire an image of a graphic grid drawn on a plane of a physical carrier as an image to be processed;
[0034] A custom graphic grid generation module, used to generate a custom graphic grid for dividing the image according to the image to be processed;
[0035] The module for acquiring the image to be identified is used to select the corresponding graphic grid according to the received grid selection instruction, and divide the image to be divided into a set number of images to be identified.
[0036] In a third aspect, an embodiment of the present invention provides a device, the device comprising:
[0037] one or more processors;
[0038] A storage device for storing one or more programs;
[0039] When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method based on the custom graphic grid as described in any embodiment of the present invention.
[0040] In a fourth aspect, an embodiment of the present invention provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to perform an image processing method based on a custom graphic grid as described in any embodiment of the present invention.
[0041] The embodiments of the present invention provide an image processing method and apparatus, a device and a storage medium based on a custom graphic grid. The image to be divided is divided into a set number of images to be identified by using a graphic grid, and the graphic grid can be a custom graphic grid corresponding to the graphic grid drawn by the user. This solves the technical defect in the prior art that the process of obtaining identity card information through image recognition is cumbersome, time-consuming and labor-intensive, and reduces the work efficiency of the staff in the labor delivery chain. This achieves the goal of easily, quickly and accurately obtaining images of multiple identity cards through one image acquisition. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 is a flow chart of an image processing method based on a custom graphic grid provided in the first embodiment of the present invention;
[0043] Figure 2a is a flow chart of an image processing method based on a custom graphic grid provided in Embodiment 2 of the present invention;
[0044] Figure 2b This is a schematic diagram of placing identity cards in a graphic grid drawn on paper provided by the second embodiment of the present invention;
[0045] Figure 2c It is a schematic diagram of an image processing device based on a custom graphic grid provided in the second embodiment of the present invention obtaining an image to be divided by setting a graphic grid;
[0046] Figure 2d It is a schematic diagram of an image processing device based on a custom graphic grid provided in the second embodiment of the present invention obtaining an image to be divided by setting a graphic grid;
[0047] Figure 3 is a structural diagram of an image processing device based on a custom graphic grid provided in Embodiment 3 of the present invention;
[0048] Figure 4 It is a structural diagram of a device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present invention clearer, the specific embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described here are only used to explain the present invention, rather than to limit the present invention.
[0050] It should also be noted that, for ease of description, only the part relevant to the present invention but not all content is shown in the accompanying drawings. It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processing or methods depicted as flow charts. Although the flow chart describes each operation (or step) as sequential processing, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. When its operation is completed, the processing can be terminated, but it can also have additional steps not included in the accompanying drawings. The processing can correspond to methods, functions, procedures, subroutines, subprograms, etc.
[0051] Embodiment 1
[0052] Figure 1 This is a flow chart of an image processing method based on a custom graphic grid provided in the first embodiment of the present invention. The method of this embodiment can be performed by an image processing device based on a custom graphic grid, which can be implemented in hardware and / or software and can generally be integrated into a device, such as a tablet computer, a smart phone, etc. The method of this embodiment specifically includes:
[0053] S110, obtaining an image of a graphic grid drawn on a plane of a physical carrier as an image to be processed.
[0054] In this embodiment, a custom graphic grid that can be used to divide the image to be divided is obtained through step S110 and step S120.
[0055] In this embodiment, the custom graphic grid is not drawn directly by the electronic device, but is generated based on the graphic grid hand-drawn by the user on the plane of the physical carrier, wherein the physical carrier may be paper, etc., preferably solid color paper.
[0056] The following is an illustrative description using paper as a physical carrier, and the following content is also applicable to other physical carriers with a plane and drawable patterns. Specifically, the user can draw a graphic grid that meets the requirements on a blank paper using drawing tools such as a pen and a ruler. Among them, the paper used to draw the graphic grid is preferably paper with a pure white background. Furthermore, the paper used to draw the graphic grid can be either a cardboard with a higher hardness or an A4 paper with an ordinary hardness, etc., and this embodiment does not limit this. Among them, the pen used to draw the graphic grid can specifically be a pencil, a watercolor pen, a signature pen, etc., as long as a line segment that can be accurately recognized by an image processing device based on a custom graphic grid can be drawn on the paper.
[0057] Furthermore, the graphic grid drawn on the plane of the physical carrier may be a grid composed of a plurality of intersecting straight lines and including a plurality of grids, and may be typically a nine-square grid composed of mutually perpendicular horizontal and vertical lines. The shapes and areas of the grids included in the graphic grid drawn on the plane of the physical carrier may be the same or different, and this embodiment does not limit this.
[0058] Furthermore, if the shapes and areas of the grids included in the graphic grid drawn on the plane of the physical carrier are not exactly the same, then in order to ensure that the image in each grid is clear and complete, the shapes and areas of different grids should not differ too much.
[0059] Furthermore, the aspect ratio of the custom graphic grid should be as close as possible to the aspect ratio of the screen of the image processing device based on the custom graphic grid.
[0060] In this embodiment, the image to be processed should specifically be an image including the entire graphic grid drawn by the user, and may not include a complete image of the paper.
[0061] S120: Generate a custom graphic grid for dividing the image according to the image to be processed.
[0062] In this embodiment, after the image to be processed is obtained, a custom graphic grid for dividing the image is generated according to the image to be processed by image processing technology. After the custom graphic grid is generated, the properties of the custom graphic grid can also be set. For example, the document type corresponding to the custom graphic grid can be set, and when the information of the corresponding document type is obtained, the corresponding custom graphic grid can be used as an alternative graphic grid.
[0063] The length ratio between any two line segments in the generated graphic grid should be the same as the length ratio between the two line segments corresponding to the two line segments in the graphic grid drawn on the physical carrier plane. Specifically, the coordinates of the starting point and the terminal of each line segment (here, the smallest line segment, i.e., the line segment that cannot be further divided) in the graphic grid can be customized and recorded and stored.
[0064] S130 . According to the received grid selection instruction, a corresponding graphic grid is selected to divide the image to be divided into a set number of images to be identified.
[0065] In this embodiment, the grid selection instruction can be specifically used to instruct the selection of a graphic grid for dividing the image to be divided from all custom graphic grids, or it can be used to instruct the selection of a graphic grid for dividing the image to be divided from all custom graphic grids or from a graphic grid template.
[0066] In this embodiment, the image to be divided can be obtained by simultaneously using an image processing device based on a custom graphic grid and a graphic grid on a corresponding physical carrier, so that the images of each object taken can accurately fall into different grids in the corresponding graphic grid. The acquisition method of the above-mentioned image to be divided is specifically described as follows:
[0067] When acquiring the image to be divided, a corresponding graphic grid will be displayed in the built-in or external display of the image processing device based on the custom graphic grid, and the corresponding graphic grid will be displayed in a manner that occupies the entire display as much as possible. The image acquired by the camera of the image processing device based on the custom graphic grid will be displayed in the entire display, and the user is required to adjust the distance between the camera and the objects corresponding to each image to be divided (such as identity cards, business cards, etc.) so that the images of the objects corresponding to each image to be divided fall into the grids of the corresponding graphic grid respectively. After receiving the photo command, the image processing device based on the custom graphic grid will acquire the current image in the display (the image includes the set graphic grid). The currently acquired image can be used as the image to be divided, or the currently acquired image can be intercepted along the outer edge of the set graphic grid, and the intercepted image can be used as the image to be divided. This embodiment does not limit this.
[0068] Furthermore, when dividing the image to be divided, the image to be divided is divided according to the grids in the corresponding graphic grid (here, the smallest grid). The number of grids in the corresponding graphic grid is equal to the number of images to be recognized. Therefore, in order to be able to divide the image to be divided according to the grids in the corresponding graphic grid simply, quickly and accurately, the shape of the grids in the corresponding graphic grid should not be too complicated, and should be as simple as possible while meeting the requirements.
[0069] In this embodiment, the set number is equal to the total number of grids included in the corresponding graphic grid.
[0070] An embodiment of the present invention provides an image processing method based on a custom graphic grid. By using a graphic grid, an image to be divided is divided into a set number of images to be identified, and the graphic grid can be a custom graphic grid corresponding to the graphic grid drawn by the user. This solves the technical defect in the prior art that the process of obtaining identity card information through image recognition is cumbersome, time-consuming and labor-intensive, and reduces the work efficiency of staff in the labor delivery chain. This achieves the goal of easily, quickly and accurately obtaining images of multiple identity cards through one image acquisition.
[0071] Embodiment 2
[0072] Figure 2a This is a flow chart of an image processing method based on a custom graphic grid provided by Example 2 of the present invention. This embodiment is optimized based on the above embodiment. In this embodiment, a specific image division method is given, a specific method for selecting a corresponding graphic grid is given, and a specific implementation method of the image information acquisition step is added.
[0073] Accordingly, the method of this embodiment specifically includes:
[0074] S210, obtaining an image of a graphic grid drawn on a plane of a physical carrier as an image to be processed.
[0075] S220. Based on the OpenCV technology, a custom graphic grid for dividing the image is generated according to the image to be processed.
[0076] In this embodiment, a custom graphic grid for dividing an image is generated according to an image to be processed, specifically an OpenCV technology, which can efficiently obtain a desired image.
[0077] S230. Determine whether the received grid selection instruction is to select a set graphic grid from a custom graphic grid or to select a set graphic grid from a graphic grid template. If the set graphic grid is to be selected from a custom graphic grid, execute step S240; if the set graphic grid is to be selected from a graphic grid template, execute step S250.
[0078] S240 . According to the received grid selection instruction, a graphic grid matching the image to be processed is selected from the custom graphic grids as a set graphic grid.
[0079] In this embodiment, if the grid selection instruction is to select a graphic grid from a custom graphic grid, a graphic grid matching the image to be processed will be selected from all custom graphic grids.
[0080] Furthermore, the above-mentioned "match" may specifically mean the matching of the number of grids. In this case, the number of grids contained in different custom graphic grids is different, and the grid selection instruction will also carry the information of the number of grids. Thus, the unique matching custom graphic grid can be accurately selected from all custom graphic grids. The above-mentioned "match" may also mean the matching of the number of grids and image attributes. In this case, the number of grids contained in different custom graphic grids may be the same or different, and the image attributes of different custom graphic grids may also be the same or different. Among them, the image attributes may specifically be the attributes of the corresponding object to be photographed, such as the category of the document (ID card or work permit, etc.).
[0081] S250 . According to the received grid selection instruction, a preset graphic grid is selected from the graphic grid template as a set graphic grid.
[0082] S260, acquiring the image to be divided by setting a graphic grid, and dividing the image to be divided into a set number of images to be recognized according to the set graphic grid.
[0083] In this embodiment, the image to be divided is obtained by setting a graphic grid, and the acquisition process can be performed as follows:
[0084] First, all objects (such as ID cards) corresponding to the images to be divided are placed in each grid of the graphic grid drawn on the paper at one time. Figure 2b A schematic diagram of placing ID cards in a graphic grid drawn on paper, such as Figure 2b As shown, a graphic grid 2 is drawn on the paper 1, and identity cards A to I are placed in each grid of the graphic grid 2; then, a built-in or external camera and a display of an image processing device based on a custom graphic grid are used to acquire and display the graphic grid image of the paper. Figure 2c A schematic diagram of an image processing device based on a custom graphic grid obtaining an image to be divided by setting a graphic grid. Figure 2c In the example, the image processing device based on the custom graphic grid is represented as a mobile terminal 3, such as Figure 2c As shown, the dotted line graphic grid (i.e., the set graphic grid) is Figure 2b The custom graphic grid generated by the image of the graphic grid 2 is based on the image processing device of the custom graphic grid. Figure 2b The distance between paper 1 and paper 2 is farther, so Figure 2cThe area occupied by the image of the graphic grid 2 in the figure is smaller than the area occupied by the dotted graphic grid. Furthermore, since the custom graphic grid is generated by the image of the graphic grid drawn on the above-mentioned paper, the relative position of the camera of the image processing device based on the custom graphic grid and the above-mentioned paper can be adjusted at this time so that the border of the custom graphic grid displayed in the built-in or external display of the image processing device based on the custom graphic grid completely overlaps with the border of the graphic grid drawn on the above-mentioned paper, and then all the line segments inside and outside the two graphic grids overlap, thereby allowing the objects corresponding to each image to be divided to fall into each grid of the custom graphic grid quickly and correctly. Figure 2d The image processing device based on the custom graphic grid obtains the schematic diagram of the image to be divided by setting the graphic grid, and adjusts Figure 2c The mobile terminal 3 and Figure 2b The relative position of paper 1 in Figure 2c The border of the dashed graphic grid in the figure completely coincides with the border of the graphic grid 2 in paper 1 ( Figure 2c The mobile terminal 3 in the adjustment and Figure 2b During the relative position of paper 1, Figure 2c The position and size of the dotted line graphic grid in the image remain unchanged), and we get Figure 2d Image shown.
[0085] On the other hand, when the graphic grid is set as the graphic grid in the graphic grid template, it is difficult for the user to place the objects corresponding to each image to be divided to a position that completely corresponds to the graphic grid in the graphic grid template at one time. It often takes multiple adjustments to determine the final placement position of the objects corresponding to each image to be divided, and to ensure that all the objects corresponding to the images to be divided fall correctly into each grid of the graphic grid. This process is relatively time-consuming.
[0086] It can be seen that using the custom graphic grid in this embodiment to obtain the image to be divided can greatly reduce the placement time of the object corresponding to the image to be divided, and greatly improve the efficiency of obtaining information of the object corresponding to the image to be divided. For the application scenario of labor transportation, using the custom graphic grid in this embodiment to obtain the identity card information of multiple workers can greatly shorten the collection time of identity card information and improve the work efficiency of the staff.
[0087] S270 , determining whether the image to be identified is a valid image to be identified, if so, executing step 280 , if not, executing step 290 .
[0088] In this embodiment, after obtaining the image to be identified, it is first determined whether the image to be identified is valid, where validity specifically refers to whether the content in the image to be identified matches the object in the image to be divided. For example, when the object in the image to be divided is an ID card, the valid image to be identified should be an image including a face image.
[0089] It is understandable that if the user needs to obtain the document information of 5 ID cards at the same time, but the graphical grid is set to include 8 grids, then the images to be divided will only include the images of 5 ID cards located in different grids. After the images to be identified are divided, there will be 3 images to be identified that do not include the ID card images. In this case, it is not necessary to obtain image information for all the images to be identified.
[0090] Therefore, in this embodiment, the validity of the image to be identified is first determined, and the operation of step S280 is performed only on the valid image to be identified, that is, the image information is obtained.
[0091] S280: Obtain image information corresponding to a valid image to be recognized.
[0092] In this embodiment, after determining the validity of the image to be recognized, image information corresponding to the valid image to be recognized is obtained through image recognition technology. Among them, the image recognition technology can typically be optical character recognition technology, etc. The image information can specifically be text information, graphic information, color information, etc. included in the image to be recognized.
[0093] Furthermore, when acquiring certificate information through the information acquisition method of this embodiment, since different certificates contain different information and have different focuses, when acquiring image information corresponding to a valid image to be identified, the category of the certificate in the image to be identified can be first identified, and then the image information can be acquired based on the category of the certificate.
[0094] S290: Delete invalid images to be identified.
[0095] The implementation of the present invention provides an image processing method based on a custom graphic grid, which concretizes the image division method and improves the accuracy of image division, so that images of different objects corresponding to the images to be divided are respectively included in different images to be identified. It also concretizes the method of selecting the corresponding graphic grid and adds an image information acquisition step, so that the user can select a matching graphic grid to obtain image information according to current actual needs, thereby improving the accuracy of image information acquisition.
[0096] On the basis of the above embodiments, judging whether each image to be recognized is a valid image to be recognized is specifically: judging whether each image to be recognized includes a face image, and / or setting text information.
[0097] In this embodiment, whether the image to be recognized is valid is determined by judging whether the image to be recognized includes a face image or set text information.
[0098] Specifically, if the object photographed by the current image to be divided is an ID card, then since ID cards always have facial images, at this time, we can determine whether the image to be identified is valid by judging whether the image to be identified includes a facial image; if the object photographed by the current image to be divided is a work ID, then since the work ID generally has the company name printed on it, at this time, we can determine whether the image to be identified is valid by judging whether the image to be identified includes text corresponding to the company name.
[0099] Furthermore, if the object photographed by the current image to be divided includes both a face image and key text, then whether the image to be identified is valid can be determined by judging whether the image to be identified includes both a face image and set text information.
[0100] The benefit of this setting is to improve the accuracy of determining the validity of the image to be identified.
[0101] On the basis of the above embodiments, the image information corresponding to the valid image to be identified is obtained, which is specifically as follows: the valid image to be identified is sent to the first device and the second device with image recognition function respectively; the image information corresponding to the image to be identified is determined according to the first image recognition information and the second image recognition information corresponding to the image to be identified respectively fed back by the first device and the second device.
[0102] In this embodiment, the image information corresponding to the valid image to be identified is determined based on the image information respectively acquired by the first device and the second device having the image recognition function. After acquiring the valid image to be identified, each valid image to be identified is sent to the first device and the second device having the image recognition function respectively, so that the first device and the second device respectively identify the image information of each valid image to be identified. The first device and the second device can typically be servers, etc. Among them, the first device and the second device are preferably devices belonging to different service providers.
[0103] In this embodiment, after receiving the first image recognition information and the second image recognition information corresponding to the image to be recognized fed back by the first device and the second device respectively, the image information corresponding to the image to be recognized is jointly determined based on the first image recognition information and the second image recognition information.
[0104] Specifically, if the first image identification information and the second image identification information are the same, the first image identification information or the second image identification information can be used as the image information corresponding to the image to be identified; if the first image identification information and the second image identification information are different, the valid image to be identified can be sent to a third device with image recognition function to further determine the image information corresponding to the valid image to be identified based on the image information fed back by the third device.
[0105] The advantage of this setting is that the accuracy of image information is improved.
[0106] On the basis of the above embodiments, the image information corresponding to the image to be identified is determined according to the first image identification information and the second image identification information corresponding to the image to be identified respectively fed back by the first device and the second device, which is specifically: if the first image identification information and the second image identification information corresponding to the image to be identified respectively fed back by the first device and the second device are different, the image to be identified is sent to a third device with an image recognition function; the image information corresponding to the image to be identified is determined according to the first image identification information, the second image identification information and the third image identification information corresponding to the image to be identified fed back by the third device; if the first image identification information and the second image identification information corresponding to the image to be identified respectively fed back by the first device and the second device are the same, the image information corresponding to the image to be identified is determined to be the first image identification information or the second image identification information.
[0107] In this embodiment, when the first image recognition information and the second image recognition information are different, the valid image to be recognized will continue to be sent to the third device with image recognition function to obtain the image information obtained after the third device performs image recognition. Then, the image information corresponding to the image to be recognized is jointly determined based on the first image recognition information, the second image recognition information and the third image recognition information.
[0108] Furthermore, the first device, the second device and the third device are preferably devices belonging to different service providers.
[0109] The benefit of this setting is: improving the accuracy of image information.
[0110] Embodiment 3
[0111] Figure 3 is a structural diagram of an image processing device based on a custom graphic grid provided by Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a to-be-processed image acquisition module 301, a custom graphic grid generation module 302 and a to-be-recognized image acquisition module 303, wherein:
[0112] The to-be-processed image acquisition module 301 is used to acquire an image of a graphic grid drawn on a plane of a physical carrier as an to-be-processed image;
[0113] A custom graphic grid generation module 302 is used to generate a custom graphic grid for dividing the image according to the image to be processed;
[0114] The to-be-recognized image acquisition module 303 is used to select a corresponding graphic grid according to the received grid selection instruction, and divide the to-be-divided image into a set number of to-be-recognized images.
[0115] An embodiment of the present invention provides an image processing device based on a custom graphic grid. The device first obtains an image of a graphic grid drawn on a physical carrier plane as an image to be processed through a to-be-processed image acquisition module 301, then generates a custom graphic grid for dividing the image based on the image to be processed through a custom graphic grid generation module 302, and finally selects a corresponding graphic grid based on a received grid selection instruction through a to-be-identified image acquisition module 303, thereby dividing the image to be divided into a set number of to-be-identified images.
[0116] The device solves the technical defects in the prior art that the process of obtaining identity card information through image recognition is cumbersome, time-consuming and labor-intensive, which reduces the work efficiency of workers in the labor delivery chain. It realizes that images of multiple identity cards can be obtained simply, quickly and accurately through one image acquisition.
[0117] Based on the above embodiments, the length ratio of any two line segments in the custom graphic grid and the length ratio of two line segments corresponding to the any two line segments in the drawn graphic grid may be the same.
[0118] Based on the above embodiments, the custom graphic grid generation module 302 can be specifically used for:
[0119] Based on OpenCV technology, a custom graphic grid for dividing the image is generated according to the image to be processed.
[0120] Based on the above embodiments, the physical carrier may be solid color paper.
[0121] Based on the above embodiments, the to-be-recognized image acquisition module 303 may include:
[0122] A custom graphic grid selection unit, used to select a graphic grid matching the image to be processed from the custom graphic grids as a set graphic grid according to the received grid selection instruction;
[0123] The first image division unit is used to obtain the image to be divided by setting a graphic grid, and divide the image to be divided into a set number of images to be recognized according to the set graphic grid.
[0124] Based on the above embodiments, the to-be-recognized image acquisition module 303 may include:
[0125] A graphic grid template selection unit, used for selecting a preset graphic grid from the graphic grid template as a set graphic grid according to the received grid selection instruction;
[0126] The second image division unit is used to obtain the image to be divided by setting a graphic grid, and divide the image to be divided into a set number of images to be identified according to the set graphic grid.
[0127] On the basis of the above embodiments, the following may also be included:
[0128] An image judgment module is used to select a corresponding graphic grid according to the received grid selection instruction, divide the image to be divided into a set number of images to be recognized, and then judge whether each image to be recognized is a valid image to be recognized;
[0129] The graphic information acquisition module is used to acquire the image information corresponding to the valid image to be recognized.
[0130] Based on the above embodiments, the image determination module can be specifically used for:
[0131] Determine whether each image to be recognized includes a face image, and / or set text information.
[0132] Based on the above embodiments, the image determination module may include:
[0133] An image sending unit, used for sending a valid image to be recognized to a first device and a second device having an image recognition function respectively;
[0134] The information determination unit is used to determine the image information corresponding to the image to be identified based on the first image identification information and the second image identification information corresponding to the image to be identified that are fed back by the first device and the second device respectively.
[0135] Based on the above embodiments, the information determination unit may include:
[0136] The image to be identified sending subunit is used to send the image to be identified to a third device with an image recognition function if the first image recognition information and the second image recognition information corresponding to the image to be identified respectively fed back by the first device and the second device are different;
[0137] A first image information determining subunit, configured to determine image information corresponding to the image to be identified according to the first image identification information, the second image identification information, and third image identification information corresponding to the image to be identified fed back by a third device;
[0138] The second image information determination subunit is used to determine whether the image information corresponding to the image to be identified is the first image identification information or the second image identification information if the first image identification information and the second image identification information corresponding to the image to be identified respectively fed back by the first device and the second device are the same.
[0139] The image processing device based on a custom graphic grid provided in an embodiment of the present invention can be used to execute the image processing method based on a custom graphic grid provided in any embodiment of the present invention, and has corresponding functional modules to achieve the same beneficial effects.
[0140] Embodiment 4
[0141] Figure 4 A schematic diagram of the structure of a device provided in Embodiment 4 of the present invention. Figure 4 A block diagram of an exemplary device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 4 The device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0142] like Figure 4 As shown, device 12 is in the form of a general purpose computing device. Components of device 12 may include, but are not limited to, one or more processors or processing units 16, system memory 28, and bus 18 that connects various system components (including system memory 28 and processing unit 16).
[0143] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0144] Device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by device 12, including volatile and non-volatile media, removable and non-removable media.
[0145] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0146] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0147] The device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the device 12, and / or may communicate with any device that enables the device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the device 12, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0148] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing the image processing method based on the custom graphic grid provided in the embodiment of the present invention. That is, obtaining an image of a graphic grid drawn on the plane of a physical carrier as an image to be processed; generating a custom graphic grid for dividing the image according to the image to be processed; selecting a corresponding graphic grid according to the received grid selection instruction, and dividing the image to be divided into a set number of images to be identified.
[0149] Embodiment 5
[0150] Embodiment 5 of the present invention further provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to execute the image processing method based on a custom graphic grid described in the embodiment of the present invention. That is, an image of a graphic grid drawn on a plane of a physical carrier is obtained as an image to be processed; based on the image to be processed, a custom graphic grid for dividing the image is generated; based on the received grid selection instruction, a corresponding graphic grid is selected to divide the image to be divided into a set number of images to be identified.
[0151] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0152] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0153] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0154] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0155] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. An image processing method based on a custom graphic grid, characterized in that: include: Acquire an image of a graphic grid drawn on a plane of a physical carrier as an image to be processed; According to the image to be processed, generating a custom graphic grid for dividing the image; According to the received grid selection instruction, a corresponding graphic grid is selected from the custom graphic grid, an image to be divided is obtained through the corresponding graphic grid, and the image to be divided is divided into a set number of images to be identified, wherein the set number is the same as the number of grids contained in the corresponding graphic grid; Determining whether each of the images to be identified is a valid image to be identified, wherein the image to be identified whose content matches the object in the image to be divided is a valid image to be identified; Acquire valid image information corresponding to the image to be recognized.
2. The method according to claim 1, characterized in that The length ratio of any two line segments in the custom graphic grid is the same as the length ratio of two line segments corresponding to the any two line segments in the drawn graphic grid.
3. The method according to claim 1 or 2, characterized in that: According to the image to be processed, a custom graphic grid for dividing the image is generated, specifically comprising: Based on the OpenCV technology, a custom graphic grid for dividing the image is generated according to the image to be processed.
4. The method according to claim 3, characterized in that The physical carrier is solid color paper.
5. The method according to claim 1 or 2, characterized in that: The method of selecting a corresponding graphic grid from the custom graphic grid according to the received grid selection instruction, acquiring the image to be divided through the corresponding graphic grid, and dividing the image to be divided into a set number of images to be identified includes: According to the received grid selection instruction, a graphic grid matching the image to be processed is selected from the custom graphic grids as a set graphic grid; The image to be divided is acquired by setting a graphic grid, and the image to be divided is divided into a set number of images to be identified according to the set graphic grid.
6. The method according to claim 1, characterized in that The step of judging whether each of the to-be-recognized images is a valid to-be-recognized image comprises: Determine whether each of the images to be recognized includes a face image, and / or set text information.
7. The method according to claim 1, characterized in that The obtaining of valid image information corresponding to the image to be identified includes: Sending the valid image to be recognized to a first device and a second device having an image recognition function respectively; The image information corresponding to the image to be identified is determined according to the first image identification information and the second image identification information corresponding to the image to be identified which are respectively fed back by the first device and the second device.
8. The method according to claim 7, characterized in that The determining the image information corresponding to the image to be identified according to the first image identification information and the second image identification information corresponding to the image to be identified respectively fed back by the first device and the second device, includes: If the first image recognition information and the second image recognition information corresponding to the image to be recognized fed back by the first device and the second device are different, sending the image to be recognized to a third device with an image recognition function; Determine image information corresponding to the image to be identified according to the first image identification information, the second image identification information, and the third image identification information corresponding to the image to be identified and fed back by the third device; If the first image recognition information and the second image recognition information corresponding to the image to be recognized respectively fed back by the first device and the second device are the same, it is determined that the image information corresponding to the image to be recognized is the first image recognition information or the second image recognition information.
9. An image processing device based on a custom graphic grid, characterized in that: include: The module for acquiring an image to be processed is used to acquire an image of a graphic grid drawn on a plane of a physical carrier as an image to be processed; A custom graphic grid generation module, used to generate a custom graphic grid for dividing the image according to the image to be processed; The image acquisition module to be identified is used to select a corresponding graphic grid from the custom graphic grid according to the received grid selection instruction, obtain the image to be divided through the corresponding graphic grid, and divide the image to be divided into a set number of images to be identified, wherein the set number is the same as the number of grids contained in the corresponding graphic grid; An image judgment module is used to select a corresponding graphic grid according to the received grid selection instruction, divide the image to be divided into a set number of images to be recognized, and then judge whether each image to be recognized is a valid image to be recognized, wherein the image to be recognized whose content matches the object in the image to be divided is a valid image to be recognized; The graphic information acquisition module is used to acquire the image information corresponding to the valid image to be recognized.
10. A computing device, characterized in that: The device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method based on the custom graphic grid as described in any one of claims 1 to 8.
11. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the image processing method based on a custom graphic grid as claimed in any one of claims 1 to 8 when executed by a computer processor.
