Quantitative Image Analysis
20240087285 · 2024-03-14
Assignee
Inventors
Cpc classification
G06V20/30
PHYSICS
G06V10/751
PHYSICS
G06V20/95
PHYSICS
G06V10/36
PHYSICS
G06V10/86
PHYSICS
G06T3/40
PHYSICS
International classification
G06V10/74
PHYSICS
G06V10/75
PHYSICS
G06T3/40
PHYSICS
Abstract
The present invention provides a method for quantitatively rating the degree of similarity of images by using orientation, resizing of the digital image, pixilation of the digital image, creation of an image string suitable for generating a hit-score. In the generation of the image string color codes e.g. by the RGB system is used. The hit-score can be a percentage identity or homology between the image strings of the two digital images, said hit-score being the rating of the similarity between the two digital images. The invention also related to the use of the method in process of assessing insurance claims. Further the invention to the use of said method and for a computer program with instruction for carrying out the method.
Claims
1. A method for quantitatively rating the degree of similarity between two digital images, comprising the following steps for each of the digital images: check whether image width is less than image height, if image width is less than image height rotate image 90 degrees to obtain a horizontal orientated digital image, resize the horizontal orientated digital image to a resized digital image having a certain fixed size and number of pixels, pixelate the digital image to pixels of a fixed size to obtain a pixilated image with an average color of each pixelated area, calculate total pixel values of the pixelated image top row and calculate total pixel values of the pixelated image bottom row, compare the total pixel value of the top row with the total pixel value of the pixilated image bottom row, if the total pixel value of pixilated image the top row is less than the total pixel value of the pixilated image bottom row, then rotate the pixilated image 180 degrees; If the total pixel value of the pixilated image top row is equal to total pixel value of the pixilated image bottom row, then proceed calculating the next row from top row and compare to next row from bottom row, if the total pixel value of the next row from top are equal to the total pixel value of the next row from bottom proceed with next rows until the centre row is reached, calculate total pixel values of the pixelated image first column and calculate total pixel values of the pixelated image last column and compare the total pixel values; if the total pixel value of the pixilated image first-column is less than the total pixel value of the pixilated image last column value, then flip the pixilated image over its vertical axis; if the total pixel value of the pixilated image first-column value is equal to the total pixel value of the pixilated image last column value, then proceed calculating the total pixel value of the pixilated image next column from first column and compare to the total pixel value of the pixilated image next column from last column; if the total pixel value of the pixilated image next column from first column are equal to total pixel value of the pixilated image of the next column from last column proceed with next columns until centre column is reached, read a pixel from each of the pixelated area in the pixilated image and calculate closest predefined color of each of the pixels read to obtain a pixel RGB, convert each pixel RGB color to HEX value, add each pixel HEX value to an image string representing the image pixel value, and then calculate a hit-score as a percentage identity or homology between the image strings of the two digital images, said hit-score being the rating of the similarity between the two digital images.
2. A method according to claim 1 further comprising the step of rotating the pixilated image 180 degrees if the total pixel value of the pixilated image row V from top is less than the total pixel value of the pixilated image row V from bottom, where V is an integer larger than 1.
3. A method according to claim 1 further comprising the step of flipping the pixilated image over its vertical axis if the total pixel value of the pixilated image number Z column from first column is less than the total pixel value of the pixilated image of number Z column from last column, where Z is an integer larger than 1.
4. A method for quantitatively rating the degree of similarity between two digital images, comprising the following steps for each of the digital images: resize the digital image to a digital image having a certain fixed size and number of pixels, divide the resized digital image into a number of sections having X rows and Y columns so that each section has the same number of pixels, divide each section into a number of pixels by rows and columns so that each section has the same number of pixels, for each pixel, determine the color code value set, e.g. RGB, and assign a score being an integer or a letter for each of the primary colors (e.g. R, G and B), then assemble these scores into a pixel string, for each section assemble all the pixel strings into a section string by appending the pixel strings in a fixed order through all the pixels in the section, and assemble all the section strings into an image string by appending the section strings in a fixed order through all the sections of said resized digital image, then calculate a hit-score as a percentage identity or homology between the image strings of the two digital images, said hit-score being the rating of the similarity between the two digital images.
5. The method according to claim 4, wherein X and Y are the same, i.e. division of the resized digital images are being pixelated and colors transformed to closest colors from predefined color list.
6. The method according to claim 4, wherein X and Y are both 3 or 4.
7. The method according to claim 4, wherein said number of pixels in each section is in the range from 6 to 70, in the range from 8 to 49, in the range from 9 to 25, in the range from 9 to 16, or wherein said number of pixels in each section is 8, 9, 12, 15, 16 or 20.
8. The method according to claim 1, wherein the color code value set is RGB (red, green, blue) giving a three digit/letter pixel string or CMYK (cyan, magenta, yellow and black) giving a four digit/letter pixel string.
9. The method according to claim 1, wherein said score being an integer or a letter is selected from an integer, a single digit integer, an integer in the range from 1 to 7, an integer in the range from 1 to 5 and an integer in the range from 1 to 3.
10. The method according to claim 1, wherein said score being an integer or a letter is selected from a letter, a letter from a group of three letters, a letter from a group of five letters or a letter from a group of seven letters, such as (a, b, c) or (f, g, h, i, j).
11. The method according to claim 4, wherein said fixed order for assembling the strings is row by row starting from the top row moving down or starting from the bottom row moving up.
12. The method according to claim 4, wherein said fixed order for assembling the strings is column by column starting from the left hand column moving right or starting from the right hand column moving left.
13. A method for determining whether a digital image has already been handled as the same digital image or a modification thereof, comprising the determination of an image string by the method defined in claim 1 and calculating the hit-score as a percentage identity or homology between the image string of said image and the image strings in a database comprising the image strings of previously handled images, for which image strings have been calculated and stored in the database.
14. The method of claim 13, which does not require access to the previously handled digital images for which image strings are stored in a database.
15. The method according to claim 13, wherein said modification of the image is a rotated image, a resized image, a skewed image, a cropped image, a mirrored image, an image with addition or elimination of one or more elements such as text or signs, or a combination thereof.
16. Use of the method as defined in claim 1 for the verification of the uniqueness of an image, such as a digital image.
17. Use of the method as defined in claim 1 in the process of handling insurance claims for increased security in the pay-out process.
18. A computing device having a processor adapted to perform the steps of a method as defined in claim 1.
19. A computer program comprising instructions which cause the computer to carry out the method as defined in claim 1, when the program is executed by a computer.
20. A computer-readable medium comprising instructions which cause the computer to carry out the method as defined in claim 1, when executed by a computer.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
DETAILED DESCRIPTION OF THE INVENTION
[0054] In the following the invention is described in detail through exemplary embodiments which should not be considered as limiting to the scope of the invention.
[0055] Throughout the present text and figures it is noted that number identifiers are used to designate both the singular and the plural form of an item or concept. For instance, the identifier 100 is used both in singular for digital image (100) and in plural for digital images (100).
[0056]
[0057] In one embodiment the modification of the image is a rotated image, a resized image, a skewed image, a cropped image, a mirrored image, an image with addition or elimination of one or more elements such as text or signs, an image with a part being blurred, or a combination thereof.
[0058] In an aspect the present invention provides a method for quantitatively rating the degree of similarity between two digital images (100), comprising the following steps for each of the digital images (100): [0059] resize the digital image (100) to a digital image having a certain fixed size and number of pixels (110), [0060] divide the resized digital image (110) into a number of sections (120) having X rows and Y columns so that each section has the same number of pixels (130), [0061] divide each section (120) into a number of pixels (130) by rows and columns, so that each section has the same number of pixels (130), [0062] for each pixel (130), determine the color code value set (140), e.g. RGB, and assign a score being an integer or a letter for each of the primary colors (e.g. R, G and B), then assemble these scores into a pixel string (150), [0063] for each section (120) assemble all the pixel strings (150) into a section string (160) by appending the pixel strings (150) in a fixed order through all the pixels (130) in the section (120), and [0064] assemble all the section strings (160) into an image string (170) by appending the section strings (160) in a fixed order through all the sections (120) of said resized digital image (110),
then calculate a hit-score (180) as a percentage identity or homology between the image strings (170) of the two digital images (100), said hit-score (180) being the rating of the similarity between the two digital images (100).
[0065] In the practical use of the method of the invention the image string (170) of a particular digital image (100) can be calculated by the method of the invention and then compared by calculation of percentage identity or homology to a plurality of image strings (170) in a database where said plurality of image strings (170) are often generated previously by using the same method with the same parameters for resizing the digital image (100), dividing into sections (120) and pixels (130), generation of pixel strings (150) and section strings (160) ending up with the image string (170).
[0066] In this practical application of the method of the invention, the requestor of the quantitative image uniqueness analysis who submits the digital image will receive the highest hit-score (180) or a group of the highest hit-scores (180) calculated by comparing the image string (170) with a plurality of previously generated image strings (170) in a database.
[0067] In one exemplary embodiment the assignment of a score for the color code value set (140) being RGB (46, 117, 182) is as follows: For each of R(46), G(117) and B(182) an integer between 1-5 is assigned via the following system: [0068] If R(0)=1 [0069] If R(1-85)=2 [0070] If R(86-170)=3 [0071] If R(171-254)=4 [0072] If R(255)=5.
[0073] The same assignment for G and B. In this embodiment the pixel (130) having the color code value set RGB (46, 117, 182) will generate the pixel string (150) being 234.
[0074] Hence, in a section (120) having 3 rows and 3 columns there will be 9 pixels (130) and thus 9 pixel strings (150). When these 9 pixel strings (150) are assembled it will give a section string (160) which has a length of 27 integers, e.g.: [0075] 222 232 444 222 234 222 222 431 334.
[0076] If the resized image (110) was divided by 4 rows and 4 columns into 16 sections (120), then the image string (170) has 1627=432 integers.
[0077] In another exemplary embodiment
[0078] It is well known to the person skilled in the art how to calculate a hit-score (180) as a percentage identity or homology between the image strings (170) of the two digital images (100). Since the two image strings (170) used for calculating the percentage identity or homology are always the same length, the algorithm for calculating percentage identity is very simple: align the two image strings (170) and count how many position have identical integer or letter, and divide that number by the length of the image string (170) times 100 (unit: %). Also, when calculating percentage homology the image strings (170) have the same length, hence for homology there will only be the added rule for how big a discrepancy qualifies for homology. The calculation is then to sum the homologous and identical positions of the image strings (170), divide by the length of the image string (170) times 100 (unit: %).
[0079] It is given that the division of the resized images (110) is by X rows and Y columns into the sections (120), then the sections (120) are either squares or rectangles. Choosing between squares and rectangles here is based on the size and format of the digital image, since the better match will give the best method/algorithm for the purpose.
[0080] In one embodiment, both X and Y are 3 or 4. In another embodiment (X, Y) is selected from (3,4), (4,3), (3,5) and (5,3).
[0081] Also, the division of the sections (120) into pixels (130) by rows and columns results in squares or rectangles of the pixels (130) in one given section (120). In one embodiment the number of pixels (130) in each section is in the range from 6 to 70, in the range from 8 to 49, in the range from 9 to 25, or in the range from 9 to 16.
[0082] In another embodiment the number of pixels (130) in each section is 8, 9, 12, 15, 16 or 20.
[0083] In another exemplary embodiment the assignment of a score for the color code value set (140) being RGB (46, 117, 182) is as follows: For each of R(46), G(117) and B(182) an integer between 1-6 is assigned via the following system: [0084] If R(0-9)=1 [0085] If R(10-40)=2 [0086] If R(41-99)=3 [0087] If R(100-170)=4 [0088] If R(171-245)=5 [0089] If R(246-255)=6.
[0090] The same assignment for G and B. In this exemplary embodiment the pixel (130) having the color code value set RGB (46, 117, 182) will generate the pixel string (150) being 345.
[0091] In another aspect the present invention provides a method for quantitatively rating the degree of similarity between two digital images (100), comprising the following steps for each of the digital images (100): [0092] Check whether image width is less than image height, if image width is less than image height rotate image 90 degrees to obtain a horizontal orientated digital image (190), [0093] resize the horizontal orientated digital image (190) to a resized digital image (110) having a certain fixed size and number of pixels (130), [0094] pixelate the digital image to pixels of a fixed size to obtain a pixilated image (200) with an average color of each pixelated area (195), [0095] calculate total pixel values of the pixelated image (200) top row and calculate total pixel values of the pixelated image (200) bottom row [0096] compare the total pixel value of the top row with the total pixel value of the pixilated image bottom row, if the total pixel value of pixilated image the top row is less than the total pixel value of the pixilated image bottom row, then rotate the pixilated image (200) 180 degrees; If the total pixel value of the pixilated image top row is equal to total pixel value of the pixilated image bottom row, then proceed calculating the next row from top row and compare to next row from bottom row, if the total pixel value of the next row from top are equal to the total pixel value of the next row from bottom proceed with next rows until the centre row is reached (201), [0097] calculate total pixel values of the pixelated image (200) first column and calculate total pixel values of the pixelated image (200) last column and compare the total pixel values; if the total pixel value of the pixilated image first-column is less than the total pixel value of the pixilated image last column value, then flip the pixilated image (200) over its vertical axis; if the total pixel value of the pixilated image first-column value is equal to the total pixel value of the pixilated image last column value, then proceed calculating the total pixel value of the pixilated image next column from first column and compare to the total pixel value of the pixilated image next column from last column; if the total pixel value of the pixilated image next column from first column are equal to total pixel value of the pixilated image of the next column from last column proceed with next columns until centre column is reached (202), [0098] read a pixel from each of the pixelated area in the pixilated image (198) and calculate closest predefined color of each of the pixels red (203) to obtain a pixel RGB, [0099] convert each pixel RGB color to HEX value (204), [0100] add each pixel HEX value to an image string (170) representing the image pixel value, [0101] then calculate a hit-score (180) as a percentage identity or homology between the image strings (170) of the two digital images (100), said hit-score (180) being the rating of the similarity between the two digital images (100).
[0102] In the practical use of the method of the invention the image string (170) of a particular digital image (100) is calculated by the method of the invention and then compared by calculation of percentage identity or homology to a plurality of image strings (170) in a database where said plurality of image strings (170) are often generated previously by using the same method with the same parameters for resizing the digital image (100), dividing into pixels (130), generation of pixel strings (202) ending up with the image string (170).
[0103] In this practical application of the method of the invention, the requestor of the quantitative image uniqueness analysis who submits the digital image will receive the highest hit-score (180) or a group of the highest hit-scores (180) calculated by comparing the image string (170) with a plurality of previously generated image strings (170) in a database.
[0104] In one exemplary embodiment the assignment of a score for the color code value set being RGB (230,172,109) is as follows. Calculate distance to closest predefined 140 colorssample listed below: [0105] PowderBlue;176,224,230 [0106] Purple;128,0,128 [0107] Red;255,0,0 [0108] RosyBrown;188,143,143 [0109] RoyalBlue;65,105,225 [0110] SaddleBrown;139,69,19 [0111] Salmon;250,128,114 [0112] SandyBrown;244,164,96 [0113] SeaGreen;46,139,87 [0114] SeaShell;255,245,238 [0115] Sienna;160,82,45 [0116] Silver;192,192,192 [0117] SkyBlue;135,206,235 [0118] SlateBlue;106,90,205 [0119] SlateGray;112,128,144
[0120] The calculated closest color is RGB (244,164,96). The RGB pixel value is transformed from decimal to hexadecimal notation to provide conform data representation. Thus (244,164,96) is F4A460 which is the pixel string.
[0121] Pixels strings representing each pixel in the digital images is assembled into a single sting representing the digital image (170). [0122] . . . 4A460F4A460DEB887FFF5EEFFFFFFFFFAFAFFFAFAFFFAFAFFFAFAFF FAFAF5F5F5556B2F2F4F4FFAEBD7F5DEB3DEB887E9967AF5DEB3DEB887F 4A460F4A460F4A460F4A460DEB887D3D3D3A9A9A9COCOCOFFFFFFFFFFFFF 8F8FFC0C0C02F4F4F2F4F4FDEB887F4A460F4A460F4A460F4A460F4A460F4 A460F4A460F4A460F4A46 . . . .
[0123] As will be evident from the above two exemplary embodiments using a different system for assignment of the score for the color code value set (160) being RGB (46, 117, 182), the method of the invention works for the comparison of two or more image strings (170) provided all of these image strings (170) are generated by the same method, i.e. same parameter for resizing the digital image (100), dividing into pixels (202), generation of pixel strings (203) ending up with the image string (170).
[0124] The color code value set 140 may be determined based on different color systems. In one embodiment the color code value set 140 is based on the RGB (red, green, blue) system giving a three digit/letter pixel string (150). The RGB system is widely used and commercial scanners can provide this format. Another color system is the CMYK (cyan, magenta, yellow and black) system giving a four digit/letter pixel string 150.
[0125] The score assigned to each pixel using the color code value set (140) can be any system which combines simplicity and discriminatory ability. In an embodiment, said score is an integer or a letter which is selected from an integer, a single digit integer, an integer in the range from 1 to 7, an integer in the range from 1 to 5 and an integer in the range from 1 to 3. In another embodiment, said score is an integer or a letter which is selected from a letter, a letter from a group of three letters, a letter from a group of five letters or a letter from a group of seven letters, such as (a, b, c) or (f, g, h, i, j).
[0126] In an embodiment, said fixed order for assembling the strings is row by row starting from the top row moving down or starting from the bottom row moving up.
[0127] In an embodiment, said fixed order for assembling the strings is column by column starting from the left hand column moving right or starting from the right hand column moving left.
[0128] In a further aspect the present invention provides the use of the method for the verification of the uniqueness of an image, such as from a digital image (100).
[0129] Such a use of the method of the invention for verification of the uniqueness of an image is advantageous in a number of industries, in particular in connection with the prevention of fraud, such as insurance fraud or fraud with product guarantees. In the latter situation a manufacturer of e.g. expensive engine parts may be faced with guarantee claims over broken engine part, in which case it is advantageous to ensure that an image of the broken engine part is unique, i.e. it has not already been submitted via another engines part retailer.
[0130] In a further aspect the present invention provides the use of the method in the process of handling insurance claims for increased security in the pay-out process.
[0131] As set out above, it is an great advantage that the method converts the digital image to an image string (170), since the actual image of the latter is not available and hence the image strings (170) can be stored in a database (200) without the set-up required for handling confidential documents and personal information under e.g. GDRP or HIPAA.
[0132] In a further aspect the present invention provides a computing device (210) having a processor (211) adapted to perform the steps of the present method.
[0133] In a yet further aspect the present invention provides a computer program comprising instructions which cause the computer (210) to carry out the method, when the program is executed by a computer (210).
[0134] In a yet further aspect the present invention provides a computer-readable medium comprising instructions which cause the computer (210) to carry out the method, when executed by a computer (210).
[0135]
[0136] The networking interface (212) receives requests for digital image (100) uniqueness verification from various devices, such as over an organizations intranet, an insurance claim handling system, or a public internet. The networking interface (212) transmits the signal to the processor (211) for computations according to the steps of the method, see e.g.
[0137] The processor (211) performs the division of the resized image (110) into sections (120), and division of the sections (120) into pixels (130), followed by the assignment of a score for each of the individual color codes and assembling them into a pixel string (150). For all the sections (120), the processor (211) then generates a section string (160) by assembling all the pixel strings (150) from a section (120) and then generates the image string (170) by assembling all of the section strings (160). The processor (211) finally calculates a hit-score (180) as a percentage identity or homology between the image strings (170) of two digital images (100), said hit-score (180) being the rating of the similarity between the two digital images (100). This hit-score (180) is returned via the networking interface (212) to the device making the request for uniqueness verification (e.g., an insurance investigator). As described above the practical use of the method of the invention will often imply that an image string (170) is compared by the calculation using another, previously generated, image string (170) or plurality of image strings (170) from a database.
[0138] Alternatively as illustrated in
[0139] The hit-score (180) is a percentage number in the range from 0% indicating no similarity to 100% indicating exact match under parameters used in the method. The requestor for comparing digital images will determine one or more threshold levels for alerts on initiating closer analysis and scrutiny in relation to digital image not being unique. For instance, above the threshold of 95% an alert is issued to the requestor while for a threshold between 85% and 95% an observance notice is issued to the requestor.