Insurance claim settlement material image processing method, electronic equipment and storage medium

By converting the original image of insurance claims material into grayscale images, filtering out the closed area with the largest area and equivalent to a quadrilateral, determining the image edge, and performing tilt correction, the problem of unclear image edges during insurance claims is solved, and improving the problem of improved image margins The success rate of claims.

CN119090904APending Publication Date: 2024-12-06SHANGHAI YIBAO HEALTH MANAGEMENT CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411041075.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

During the insurance claim process, the image of the insurance claim material obtained by the user taking photos is unclear, resulting in the failure of the claim.

Method used

By acquiring the original image, converting it into a grayscale image, filtering out the closed area to be selected with the largest area and equivalent to a quadrilateral, determining the image edge, and tilting correction of the image.

Benefits of technology

Improve the edge clarity of the image of insurance claims material and enhance the success rate of claims.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090904A_ABST
    Figure CN119090904A_ABST
Patent Text Reader

Abstract

The invention provides an insurance claim settlement material image processing method, electronic equipment and a storage medium. The method comprises the steps of obtaining an original image of an insurance claim settlement material; converting the original image into a grayscale image; obtaining each closed region to be selected in the grayscale image; a target closed area is screened out from all the to-be-selected closed areas, and the target closed area is specifically the to-be-selected closed area which is the largest in area and equivalent to a quadrangle in all the to-be-selected closed areas; and determining the edge of the original image through the position coordinates of the vertexes of the target closed region. Therefore, even if the edge of the original image is not clear, the edge of the original image can be determined through the method provided by the embodiment of the invention, so that the success rate of insurance claim settlement is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an insurance claim material image processing method, electronic device and storage medium. Background Art

[0002] In the process of electronic insurance claims, users need to convert paper insurance claims materials such as claim receipts and forms into insurance claims materials images, and submit the insurance claims materials images electronically. In actual applications, users often convert paper insurance claims materials into insurance claims materials images by convenient means such as taking photos with their mobile phones. However, due to various factors such as uneven light during photography and the user's photography skills, the insurance claims materials images obtained by users usually have unclear edges. Such unclear insurance claims materials images are likely to lead to claims failures, so the insurance claims materials images need to be processed. Summary of the invention

[0003] The embodiments of the present application provide an insurance claim material image processing method, an electronic device, and a storage medium, which can be used to solve the problem of unclear image edges in the prior art.

[0004] A first aspect of an embodiment of the present application provides a method for processing an insurance claim material image, comprising:

[0005] Obtain original images of insurance claim materials;

[0006] Converting the original image into a grayscale image;

[0007] Acquire each closed area to be selected in the grayscale image;

[0008] Filter out a target closed area from each candidate closed area, wherein the target closed area is specifically a candidate closed area with the largest area and equivalent to a quadrilateral among the candidate closed areas;

[0009] The edge of the original image is determined by the position coordinates of each vertex of the target closed area.

[0010] Preferably, obtaining each selected closed area in the grayscale image specifically includes:

[0011] Performing blur processing on the grayscale image to obtain a blurred image;

[0012] Normalizing the blurred image to obtain a normalized image;

[0013] Acquire a binary image of the normalized image;

[0014] Performing a first edge detection on the binary image;

[0015] The binary image after the first edge detection is normalized to obtain a new normalized image;

[0016] Obtaining a binary image of the new normalized image;

[0017] Performing morphological transformation processing on the binary image of the new normalized image to obtain a morphologically transformed image, wherein the morphological transformation processing includes any one or more of the following: expansion, distortion, and contraction;

[0018] A second edge detection is performed on the morphological transformation image to obtain each closed region to be selected.

[0019] Preferably, selecting the target closed area from each candidate closed area specifically includes: selecting the target closed area from each candidate closed area by polygonal approximation.

[0020] Preferably, selecting a target closed area from each candidate closed area specifically includes:

[0021] Selecting N largest closed regions from each closed region, where N is a positive integer greater than or equal to 2;

[0022] The target closed area is selected from the N candidate closed areas with the largest areas by polygonal approximation.

[0023] Preferably, selecting N to-be-selected closed areas with the largest areas from each to-be-selected closed area specifically includes: when the number of the to-be-selected closed areas is greater than a preset threshold, selecting N to-be-selected closed areas with the largest areas from each to-be-selected closed area.

[0024] Preferably, the method further comprises:

[0025] intercepting a target area image from the original image through the edge of the original image;

[0026] The target area image is subjected to tilt correction.

[0027] Preferably, performing tilt correction on the target area image specifically includes:

[0028] Determine the length and width of the target area image;

[0029] Substitute the length and width as key parameters into the Imgproc.getPerspectiveTransform function in OpenCV to determine the perspective transformation matrix;

[0030] The target area image is tilt-corrected by using the perspective transformation matrix.

[0031] Preferably, obtaining the original image of the insurance claim material specifically includes:

[0032] The original image is extracted from an original video, wherein the original video is obtained by photographing the insurance claim materials.

[0033] A second aspect of an embodiment of the present application provides an electronic device, including:

[0034] Memory for storing computer programs;

[0035] A processor is used to execute the method described in any one of the first aspects of the embodiments of the present application.

[0036] A third aspect of the embodiments of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method described in any one of the first aspects of the embodiments of the present application is implemented.

[0037] The image processing method of insurance claim materials provided by the embodiment of the present application includes first obtaining the original image of the insurance claim materials, then converting the original image into a grayscale image, then obtaining each selected closed area in the grayscale image, and then screening out a target closed area from each selected closed area, wherein the target closed area is specifically a selected closed area with the largest area and equivalent to a quadrilateral among each selected closed area, and then determining the edge of the original image by the position coordinates of each vertex of the target closed area. Therefore, even if the edge of the original image is unclear, the edge of the original image can be determined by the method provided by the embodiment of the present application, thereby improving the success rate of insurance claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application;

[0040] Figure 2 A schematic diagram of a specific process of an insurance claim material image processing method provided in an embodiment of the present application;

[0041] Figure 3A schematic diagram of the specific structure of an insurance claim material image processing device provided in accordance with an embodiment of the present application. DETAILED DESCRIPTION

[0042] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the present application, terms such as "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance or sequence.

[0043] As mentioned above, users often convert paper insurance claim materials into insurance claim material images through convenient methods such as taking photos with mobile phones. However, due to various factors such as uneven light when taking photos and the user's photography skills, the insurance claim material images obtained by users usually have unclear edges. Such insurance claim material images with unclear edges can easily lead to claim failures, so the insurance claim material images need to be processed.

[0044] Based on this, the embodiments of the present application provide a method, device, electronic device and storage medium for processing images of insurance claim materials. Figure 1 The electronic device 1 is a schematic diagram of a specific structure. The electronic device 1 includes: at least one processor 11 and a memory 12, Figure 1 A processor is used as an example. The processor 11 and the memory 12 may be connected via a bus 10, and the memory 12 stores instructions executable by the processor 11, and the instructions are executed by the processor 11, so that the electronic device 1 can execute all or part of the process of the method in the following embodiment.

[0045] In practical applications, the electronic device 1 can be used as a server-side electronic device, such as a server, etc. Of course, multiple electronic devices 1 can also be built into a cluster to serve as the server. Of course, the electronic device can also be a user-side electronic device, such as a user's mobile phone, computer, etc.

[0046] like Figure 2 The figure shows a flow chart of an insurance claim material image processing method provided by an embodiment of the present application. Some or all steps of the method can be performed by Figure 1 The method is performed by the electronic device 1 shown in the figure, and comprises the following steps:

[0047] Step S21: Acquire the original image of the insurance claim material.

[0048] The insurance claim materials specifically refer to the claim receipts and forms required in the insurance claim process. In actual applications, users usually convert insurance claim materials into images. Specifically, for example, users usually take photos of the insurance claim materials through mobile phones to obtain the original image, or they can shoot videos of the insurance claim materials (to obtain original videos), and further extract the original images from the original videos. In other words, the original images are usually images directly obtained by taking photos of the insurance claim materials, or they can be images extracted from the original videos by shooting videos of the insurance claim materials.

[0049] Therefore, for the specific implementation method of step S21, in one embodiment, for example, at the user end, the image of the insurance claim materials can be directly captured by the mobile phone as the original image, or the image of the insurance claim materials can be obtained from the mobile phone's photo library as the original image, wherein the images in the photo library are images that have been captured by the mobile phone before. Of course, it is also possible to first take a video of the insurance claim materials with the mobile phone and then extract the original image from the original video.

[0050] Regarding the specific implementation method of step S21, in another embodiment, for example, on the service side, the server can obtain the image sent by the user through the client as the original image. For example, after the user captures the image of the insurance claim materials through the mobile phone, it sends it to the server through the client, so that the server can obtain the image as the original image; the server can also obtain the original video sent by the user through the client, and then extract the original image from the original video. For example, the user can take a photo of the insurance claim materials through the mobile phone to obtain the original video, and then send it to the server through the client, so that the server can obtain the original video and extract the original image from the original video.

[0051] Step S22: converting the original image into a grayscale image.

[0052] In practical applications, since the edge detection process of the image is not sensitive to the color information of the image, the color of the original color image will only interfere with the detection process. Therefore, the original image needs to be converted into a grayscale image. There can be multiple specific implementation methods for step S22, that is, there can be multiple ways to implement step S22, thereby converting the original image into a grayscale image.

[0053] For example, the original image can be converted into a grayscale image through OpenCV (a cross-platform computer vision library), wherein OpenCV is a cross-platform computer vision and machine learning software library released under the Apache2.0 license (open source), and can usually run on operating systems such as Linux, Windows, Android and Mac OS. Specifically, OpenCV usually includes multiple types of functions with different functions, and the original image can be converted into a grayscale image through the image color space conversion function, i.e., Imgproc.cvtColor. Among them, Imgproc.cvtColor includes three key parameters (here the three key parameters are referred to as a, b and c), so the function is specifically Imgproc.cvtColor (a, b, c), among which a is the original image, b is the converted image, and c is the conversion parameter.

[0054] For example, you can first convert the original image into BGR format through Imgproc.cvtColor, such as Imgproc.cvtColor(yuv,mat,Imgproc.COLOR_YUV2BGR_NV21,4), and then convert the original image in BGR format into a grayscale image through Imgproc.cvtColor, such as Imgproc.cvtColor(originalMat,originalMat,Imgproc.COLOR_BGR2GRAY,4).

[0055] Step S23: Acquire each closed region to be selected in the grayscale image.

[0056] After the grayscale image of the original image is obtained through the above step S22, each selected closed area in the grayscale image is further obtained in step S23. There may be many specific implementations of step S23 in practical applications, and several of them may be listed here for illustration.

[0057] Method 1: first obtain a binary image of the grayscale image, for example, the grayscale image can be binarized to obtain a binary image of the grayscale image, and then edge detection is performed on the binary image, for example, the Imgproc.canny function in OpenCV can be used to perform edge detection on the binary image, or the Imgproc.findContours function in OpenCV can be used to perform edge detection on the binary image, thereby detecting each candidate closed area in the binary image, which corresponds to each candidate closed area in the grayscale image.

[0058] The method of obtaining the binary image of the grayscale image may be to perform a binarization process on the grayscale image through the Imgproc.threshold function in OpenCV, thereby obtaining the binary image of the grayscale image.

[0059] Therefore, in the first implementation method, the grayscale image can be first binarized by using the Imgproc.threshold function to obtain a binarized image of the grayscale image, and then the binarized image can be further edge detected by using the Imgproc.canny function or the Imgproc.findContours function in OpenCV to obtain the various closed areas to be selected in the grayscale image.

[0060] Method 2: First, blur the grayscale image to obtain a blurred image. For example, the grayscale image can be blurred by the Imgproc.cvtColor function in OpenCV to obtain the blurred image. The purpose of blurring is to reduce the noise of the grayscale image through blurring, thereby smoothing the edge of the image for subsequent processing. Then, the blurred image is normalized to ensure that the pixel value range of the image is between 0 and 255. Therefore, the stability of subsequent image processing can be improved through normalization. Of course, a normalized image can be obtained through the normalization. For example, the blurred image can be normalized by the Core.normalize function in OpenCV to obtain a normalized image.

[0061] The grayscale image can be blurred by Imgproc.GaussianBlur(originalMat,originalMat,blurSize,0.0) to obtain the blurred image. The blurred image can be normalized by Core.normalize(originalMat,originalMat,0,255,Core.NORM_MINMAX).

[0062] After obtaining the normalized image, a binary image of the normalized image can be further obtained; and then edge detection is performed on the binary image to detect each candidate closed area in the binary image, which corresponds to each candidate closed area in the grayscale image.

[0063] Among them, the normalized image can also be binarized through the Imgproc.threshold function in OpenCV to obtain a binary image of the normalized image. Specifically, the optimal threshold can be automatically selected through the Otsu method, and then the normalized image can be binarized through Imgproc.threshold(originalMat,originalMat,S80,255,Imgproc.THRESH_BINARY|Imgproc.THRESH_OTSU). The binary image obtained by the binarization process has relatively clearer edges. Then, the Imgproc.canny function in OpenCV can be used to perform edge detection on the binary image. For example, Imgproc.threshold(originalMat,originalMat,50,255,Imgproc.THRESH_TOZERO) can be used to perform edge detection on the binary image. The Imgproc.findContours function in OpenCV can also be used to perform edge detection on the binary image to obtain each selected closed area in the grayscale image.

[0064] In the second method, the grayscale image is first blurred and normalized in sequence, and then a binary image of the normalized image is further obtained, rather than a binary image of the grayscale image. In this way, since the grayscale image is first blurred and normalized in sequence, the edge of the binary image is cleaned, thereby improving the accuracy of the detection result of the selected closed area.

[0065] Method three, first blur the grayscale image to obtain a blurred image, for example, the grayscale image can be blurred by the Imgproc.cvtColor function in OpenCV to obtain the blurred image; then normalize the blurred image to obtain a normalized image, for example, the blurred image can be normalized by the Core.normalize function in OpenCV to obtain a normalized image; after obtaining the normalized image, a binary image of the normalized image can be further obtained.

[0066] Then, the binary image is further subjected to a first edge detection; then, the binary image after the first edge detection is normalized to obtain a new normalized image; then, a binary image of the new normalized image is obtained; then, the binary image of the new normalized image is subjected to a morphological transformation process to obtain a morphologically transformed image, wherein the morphological transformation process includes any one or more of the following: expansion, distortion, and contraction; then, a second edge detection is performed on the morphologically transformed image to obtain each closed area to be selected.

[0067] Compared with the above-mentioned method 2, the third method is that after obtaining the binary image of the normalized image, in the above-mentioned method 2, edge detection is directly performed on the binary image to obtain each selected closed area in the grayscale image.

[0068] In method three, the first edge detection is performed on the binary image, for example, the Imgproc.canny function in OpenCV can be used to perform the first edge detection on the binary image, and then the binary image after the first edge detection is normalized to obtain a new normalized image, for example, the Core.normalize function in OpenCV can be used to normalize the binary image after the first edge detection to obtain a new normalized image; and then the binary image of the new normalized image is obtained, for example, the Imgproc.threshold function in OpenCV can be used to binarize the new normalized image to obtain the binary image of the new normalized image.

[0069] Of course, after obtaining the binary image of the new normalized image, a second edge detection can be directly performed to obtain each candidate closed area. For example, the Imgproc.findContours function in OpenCV can be used to perform a second edge detection to obtain each candidate closed area.

[0070] The binary image of the new normalized image can also be subjected to morphological transformation processing first to obtain a morphologically transformed image, and then the morphologically transformed image can be subjected to a second edge detection to obtain each selected closed area. For example, the Imgproc.findContours function in OpenCV can be used to perform a second edge detection to obtain each selected closed area. Here, since the binary image of the new normalized image is subjected to morphological transformation processing, the edges of each selected closed area obtained by the first edge detection are corrected, making the result of the second edge detection more accurate.

[0071] The Imgproc.morphologyEx function in OpenCV can be used to perform morphological transformation on the binary image of the new normalized image, thereby obtaining a morphologically transformed image.

[0072] Step S24: Filter out a target closed area from each candidate closed area.

[0073] The target closed area is specifically a closed area among all the closed areas to be selected that has the largest area and is equivalent to a quadrilateral.

[0074] It should be noted that since this application involves the field of insurance claims technology, the form of insurance claims materials such as claims notes and forms are all quadrilaterals (more specifically, rectangles) according to relevant regulations, and when the user takes a photo, the main content of the insurance claims materials in the original image is usually in the largest area of ​​the original image. Therefore, the target closed area selected in step S24 is specifically the largest area of ​​the selected closed areas and equivalent to a quadrilateral among the selected closed areas.

[0075] The closed region to be selected that is equivalent to a quadrilateral may specifically include that the closed region to be selected is a quadrilateral, or is approximately a quadrilateral. Therefore, there may be many specific implementations of step S24 in practical applications, and several of them may be listed here for illustration.

[0076] Method 1 is to select the target closed area from various candidate closed areas by polygonal approximation.

[0077] For example, for each candidate closed area, polygonal approximation can be used to identify whether the candidate closed area is a quadrilateral candidate closed area. After screening out the candidate closed areas of each quadrilateral, the one with the largest area is screened out from the candidate closed areas of these quadrilaterals as the target closed area. For the specific polygonal approximation method, for example, polygonal approximation algorithms such as Douglas-Peucker can be used for polygonal approximation, or the cv2.approxPolyDP function in OpenCV can be used for polygonal approximation.

[0078] Therefore, for each candidate closed area, polygon approximation can be performed through the cv2.approxPolyDP function in OpenCV to identify whether the candidate closed area is a quadrilateral candidate closed area.

[0079] In addition, the candidate closed regions may be sorted according to their area sizes first. For example, the candidate closed regions may be sorted in order of area from large to small or from small to large. Then, according to the order, each candidate closed region may be approximated by a polygon using the cv2.approxPolyDP function to identify whether it is a quadrilateral candidate closed region, and finally the target closed region may be selected.

[0080] Method 2: First, N candidate closed areas with the largest areas can be selected from each candidate closed area, where N is a positive integer greater than or equal to 2, for example, N can be 5, 10, 15, 20, etc.; then, the target closed area can be screened out from the N candidate closed areas with the largest areas by polygonal approximation.

[0081] For example, the various candidate closed areas can be sorted in order of area from large to small or from small to large, and then the N candidate closed areas with the largest areas are selected from the various candidate closed areas. For example, they are sorted in order of area from large to small, and then the top 10 candidate closed areas are selected, that is, the 10 candidate closed areas with the largest areas.

[0082] After obtaining the N largest candidate closed areas, the target closed area can be screened out from the N largest candidate closed areas by polygonal approximation. For example, you can refer to the above method 1. For each of the N candidate closed areas, you can use the cv2.approxPolyDP function in OpenCV to perform polygonal approximation to identify whether the candidate closed area is a quadrilateral candidate closed area. After screening out the candidate closed areas of each quadrilateral, the one with the largest area is screened out from these quadrilateral candidate closed areas as the target closed area.

[0083] Alternatively, after obtaining the N largest candidate closed regions, continue to use the cv2.approxPolyDP function to perform polygon approximation on each candidate closed region in order from large to small, so as to identify whether it is a quadrilateral candidate closed region, and finally screen out the target closed region.

[0084] Of course, before selecting the N largest closed areas to be selected from each of the closed areas to be selected, it is also possible to first determine whether the number of closed areas to be selected is greater than a preset threshold. If so, it means that the number of closed areas to be selected is large. At this time, the N largest closed areas to be selected can be selected from each of the closed areas to be selected, and then the step S24 can be executed in the second method. On the contrary, if the number of closed areas to be selected is less than or equal to the preset threshold, it means that the number of closed areas to be selected is small. At this time, it is not necessary to select the N largest closed areas to be selected from each of the closed areas to be selected, and then the step S24 can be executed in the first method.

[0085] Step S25: Determine the edge of the original image through the position coordinates of each vertex of the target closed area.

[0086] After the target closed area is obtained through the above step S24, in step S25, the edge of the original image can be determined by the position coordinates of each vertex of the target closed area. For example, the position coordinates of each vertex of the target closed area can be determined first. Since the target closed area is a quadrilateral, the coordinates of each vertex are the coordinates of the four vertices of the quadrilateral. After obtaining the position coordinates of each vertex of the target closed area, the edge of the original image can be further determined by the position coordinates of each vertex of the target closed area. For example, the position coordinates of each vertex of the target closed area can be sorted according to the relative position relationship of each vertex of the quadrilateral, and then the position coordinates of each vertex of the sorted target closed area are mapped to the original image, and then the position coordinates of these vertices in the original image are used to determine the edge of the original image. In which, in the area outside the edge of the original image, it can be considered that there is no relevant content of the insurance claim material, while for the area within the edge of the original image, there is relevant content of the insurance claim material.

[0087] The image processing method of insurance claim materials provided by the embodiment of the present application includes first obtaining the original image of the insurance claim materials, then converting the original image into a grayscale image, then obtaining each selected closed area in the grayscale image, and then screening out a target closed area from each selected closed area, wherein the target closed area is specifically a selected closed area with the largest area and equivalent to a quadrilateral among each selected closed area, and then determining the edge of the original image by the position coordinates of each vertex of the target closed area. Therefore, even if the edge of the original image is unclear, the edge of the original image can be determined by the method provided by the embodiment of the present application, thereby improving the success rate of insurance claims.

[0088] After determining the edge of the original image through the above-mentioned steps S21 to S25, the method can further include, through the edge of the original image, cutting out the target area image from the original image, such as cutting out the image area within the edge of the original image, so as to serve as the target area image; and then further performing tilt correction on the target area image.

[0089] For example, in actual applications, when users take photos, the original image is usually tilted due to the wrong camera angle of the mobile phone or the incorrect placement of the insurance claim materials. In particular, the part of the original image related to the insurance claim materials (that is, the target area image) is tilted. At this time, the tilt correction can be performed in this way, so that when the insurance claim is made using the target area image after the tilt correction, the success rate can be further improved.

[0090] Among them, a specific method for performing tilt correction on the target area image includes: first determining the length and width of the target area image, for example, the length and width of the target area image can be calculated by the position coordinates of each vertex of the target area image; then the length and width are substituted as key parameters into the Imgproc.getPerspectiveTransform function in OpenCV to determine the perspective transformation matrix; then the target area image is tilt corrected through the perspective transformation matrix, for example, the perspective transformation matrix can be substituted as a key parameter into Imgproc.warpPerspective in OpenCV to perform tilt correction on the target area image.

[0091] Of course, after the target area image is tilt-corrected, the method may further include electronically submitting the target area image after the tilt correction. At this time, since the tilt correction has been performed on the one hand and the edges are clear on the other hand, the success rate can be improved when the target area image after the tilt correction is used for insurance claims.

[0092] The above is a specific description of the method provided in the embodiment of the present application. For ease of understanding, the method can be further described here in conjunction with a specific example. In this example, a series of operations are performed based on OpenCV.

[0093] At this point, you can first obtain the original image of the insurance claim material, then convert the original image into BGR format through the Imgproc.cvtColor function, and then convert the original image in BGR format into a grayscale image through Imgproc.cvtColor.

[0094] Then, the grayscale image can be blurred by the Imgproc.cvtColor function to obtain the blurred image; then, the blurred image can be normalized by the Core.normalize function to obtain the normalized image; after obtaining the normalized image, the Imgproc.threshold function can be used to further obtain the binary image of the normalized image.

[0095] Then, the first edge detection is further performed on the binary image through the Imgproc.canny function; then, the binary image after the first edge detection is normalized through the Core.normalize function to obtain a new normalized image; and then, the new normalized image is binarized through the Imgproc.threshold function to obtain a binary image of the new normalized image.

[0096] Then, the binary image of the new normalized image is subjected to morphological transformation through the Imgproc.morphologyEx function to obtain a morphologically transformed image; and then the second edge detection is performed through the Imgproc.findContours function to obtain each closed area to be selected.

[0097] Then, the 10 largest candidate closed areas are selected from each candidate closed area; then, polygon approximation is performed on each of the N candidate closed areas through the cv2.approxPolyDP function to identify whether the candidate closed area is a quadrilateral candidate closed area. After screening out the candidate closed areas of each quadrilateral, the one with the largest area is screened out from these quadrilateral candidate closed areas as the target closed area; then the edge of the original image is determined by the position coordinates of each vertex of the target closed area.

[0098] Of course, after the edge of the original image is determined, the target area image can be intercepted from the original image through the edge of the original image, and then the tilt correction is further performed on the target area image.

[0099] Based on the same inventive concept as the insurance claim material image processing method provided in the embodiment of the present application, the embodiment of the present application also provides an insurance claim material image processing device. For any details not described in detail in the embodiment of the device, reference may be made to the corresponding contents of the method embodiment. Figure 3FIG. 3 is a schematic diagram of a specific structure of the device 30, which includes: an original image acquisition unit 301, a grayscale image conversion unit 302, a closed region acquisition unit 303, a target closed region screening unit 304, and an edge determination unit 305, wherein:

[0100] The original image acquisition unit 301 is used to acquire the original image of the insurance claim material;

[0101] A grayscale image conversion unit 302, used to convert the original image into a grayscale image;

[0102] A candidate closed region acquisition unit 303 is used to acquire each candidate closed region in the grayscale image;

[0103] A target closed region screening unit 304 is used to screen out a target closed region from each candidate closed region, wherein the target closed region is specifically a candidate closed region with the largest area and equivalent to a quadrilateral among the candidate closed regions;

[0104] The edge determination unit 305 is used to determine the edge of the original image through the position coordinates of each vertex of the target closed area.

[0105] The device 30 provided in the embodiment of the present application is adopted. Since the device 30 adopts the same inventive concept as the method provided in the embodiment of the present application, on the premise that the method can solve the technical problem, the device 30 can also solve the technical problem, which will not be repeated here.

[0106] In addition, in actual applications, the technical effects achieved by combining the device 30 with specific hardware equipment, cloud technology, etc. are also within the scope of protection of the present application. For example, different units in the device 30 are deployed in different nodes in the distributed cluster in a distributed cluster manner, or some units are deployed in a cloud server, etc., to improve efficiency and reduce costs.

[0107] Among them, obtaining each candidate closed area in the grayscale image can specifically include: blurring the grayscale image to obtain a blurred image; normalizing the blurred image to obtain a normalized image; obtaining a binary image of the normalized image; performing a first edge detection on the binary image; normalizing the binary image after the first edge detection to obtain a new normalized image; obtaining a binary image of the new normalized image; performing morphological transformation on the binary image of the new normalized image to obtain a morphologically transformed image, wherein the morphological transformation includes any one or more of the following: expansion, distortion, and contraction; performing a second edge detection on the morphologically transformed image to obtain each candidate closed area.

[0108] The step of selecting the target closed area from each candidate closed area may specifically include: selecting the target closed area from each candidate closed area by polygonal approximation.

[0109] Among them, filtering out the target closed area from each candidate closed area can specifically include: selecting N candidate closed areas with the largest areas from each candidate closed area, where N is a positive integer greater than or equal to 2; and filtering out the target closed area from the N candidate closed areas with the largest areas by polygonal approximation.

[0110] Among them, selecting N to-be-selected closed areas with the largest areas from each to-be-selected closed area specifically includes: when the number of the to-be-selected closed areas is greater than a preset threshold, selecting N to-be-selected closed areas with the largest areas from each to-be-selected closed area.

[0111] The device may further include a tilt correction unit, which is used to intercept a target area image from the original image through an edge of the original image; and perform tilt correction on the target area image.

[0112] Among them, performing tilt correction on the target area image can specifically include: determining the length and width of the target area image; substituting the length and width as key parameters into the Imgproc.getPerspectiveTransform function in OpenCV to determine the perspective transformation matrix; and performing tilt correction on the target area image through the perspective transformation matrix.

[0113] Wherein, obtaining the original image of the insurance claim materials may specifically include: extracting the original image from an original video, wherein the original video is obtained by photographing the insurance claim materials.

[0114] An embodiment of the present invention further provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing all or part of the process of the method in the above embodiment described in any one of the first aspects of the embodiments of the present application.

[0115] The embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program implements all or part of the process of the method in the above embodiment when executed by a processor. The storage medium may be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD). The storage medium may also include a combination of the above-mentioned types of memory.

[0116] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for processing images of insurance claim materials, characterized in that: include: Obtain original images of insurance claim materials; Converting the original image into a grayscale image; Acquire each closed area to be selected in the grayscale image; Filter out a target closed area from each candidate closed area, wherein the target closed area is specifically a candidate closed area with the largest area and equivalent to a quadrilateral among the candidate closed areas; The edge of the original image is determined by the position coordinates of each vertex of the target closed area.

2. The method according to claim 1, characterized in that Acquiring each closed region to be selected in the grayscale image specifically includes: Performing blur processing on the grayscale image to obtain a blurred image; Normalizing the blurred image to obtain a normalized image; Acquire a binary image of the normalized image; Performing a first edge detection on the binary image; The binary image after the first edge detection is normalized to obtain a new normalized image; Obtaining a binary image of the new normalized image; Performing morphological transformation processing on the binary image of the new normalized image to obtain a morphologically transformed image, wherein the morphological transformation processing includes any one or more of the following: expansion, distortion, and contraction; A second edge detection is performed on the morphological transformation image to obtain each closed region to be selected.

3. The method according to claim 1, characterized in that The step of selecting a target closed area from each of the candidate closed areas specifically includes: selecting the target closed area from each of the candidate closed areas by polygonal approximation.

4. The method according to claim 1, characterized in that: The target closed area is selected from each candidate closed area, including: Selecting N largest closed regions from each closed region, where N is a positive integer greater than or equal to 2; The target closed area is selected from the N candidate closed areas with the largest areas by polygonal approximation.

5. The method according to claim 4, characterized in that Selecting N to-be-selected closed areas with the largest areas from each to-be-selected closed area specifically includes: when the number of the to-be-selected closed areas is greater than a preset threshold, selecting N to-be-selected closed areas with the largest areas from each to-be-selected closed area.

6. The method according to claim 1, characterized in that The method further comprises: intercepting a target area image from the original image through the edge of the original image; The target area image is subjected to tilt correction.

7. The method according to claim 6, characterized in that The target area image is subjected to tilt correction, specifically comprising: Determine the length and width of the target area image; Substitute the length and width as key parameters into the Imgproc.getPerspectiveTransform function in OpenCV to determine the perspective transformation matrix; The target area image is tilt-corrected by using the perspective transformation matrix.

8. The method according to claim 1, characterized in that Obtain original images of insurance claim materials, including: The original image is extracted from an original video, wherein the original video is obtained by photographing the insurance claim materials.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, for executing the insurance claim material image processing method as claimed in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the insurance claim material image processing method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • PPT frame extraction method based on OpenCV algorithm and related equipment

    CN110443780A

  • Morphological operation-based text region detection method and device

    CN111476800A

  • Document image correction method and device, storage medium and intelligent terminal equipment

    CN113627428A

  • Image processing method, image processing device, electronic equipment and storage medium

    CN115294557A