CN116206324A - Bank card display image generation method and system - Google Patents

Bank card display image generation method and system Download PDF

Info

Publication number
CN116206324A
CN116206324A CN202211423571.7A CN202211423571A CN116206324A CN 116206324 A CN116206324 A CN 116206324A CN 202211423571 A CN202211423571 A CN 202211423571A CN 116206324 A CN116206324 A CN 116206324A
Authority
CN
China
Prior art keywords
image
bank card
color
tone
taking area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211423571.7A
Other languages
Chinese (zh)
Inventor
费志军
刘禹彤
邱雪涛
吕旭峰
杨燕明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Unionpay Co Ltd
Original Assignee
China Unionpay Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN202211423571.7A priority Critical patent/CN116206324A/en
Publication of CN116206324A publication Critical patent/CN116206324A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/42Document-oriented image-based pattern recognition based on the type of document
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/18Extraction of features or characteristics of the image
    • G06V30/18105Extraction of features or characteristics of the image related to colour

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention relates to a method and a system for generating a bank card display image. The method comprises the following steps: for the inputted bank card image, selecting a specific area in the bank card image as a color taking area, and judging the color tone of the bank card image by analyzing the color characteristics of the color taking area; amplifying the bank card image to generate an amplified bank card image, and performing Gaussian blur processing on the amplified bank card image to generate a background image; determining display characters in a bank card display image based on the type of the bank card and determining the color of the display characters according to the tone of the bank card image; and taking the bank card image as a foreground card image, collaging the foreground card image, a background image and the display text with determined colors, and intercepting the background image containing the front Jing Ka image and part of the background image to generate a bank card display image. According to the invention, the problem that the display of the characters on the card surface in the bank card display image is unclear can be solved.

Description

Bank card display image generation method and system
Technical Field
The invention relates to a computer technology, in particular to a method and a system for generating a bank card display image.
Background
In some applications related to bank cards, it is sometimes desirable to present a face graphic of the bank card and a background graphic around the card graphic. An example of a prior art bank card presentation image is shown in fig. 1. As shown in the upper half of fig. 1, the bank card presentation image includes: a front Jing Ka image (i.e., an image used to reveal the bank card itself) and a background image slightly larger than the front Jing Ka image. The background image generation method in the prior art is as follows: amplifying the foreground card image to generate a first background image; the brightness of the first background image is increased, and a second background image is generated; and the foreground card image is spliced at the central position of the second background image, and then the central part containing the foreground card image and part of the background image is intercepted to be used as a final bank card display image.
Since the background image is generated based on the foreground card image, the background image and the foreground card image are similar, and therefore, when the current Jing Ka image is collaged with the background image, the problems of unclear characters or unclear boundaries of the foreground card image and the background image can occur.
Specifically, fig. 2 is a diagram showing an example of unclear text in a bank card presentation image in the prior art. If the bank card is a pure black card or a card surface with black color as the main color, when the "online payment", "two-dimensional code payment", "mobile phone flash payment" are displayed without opening the function field (for example, as part of the box position in fig. 2) as shown in fig. 2, a fuzzy situation may occur,
fig. 3 is a view showing an example of unclear boundaries in a prior art bank card presentation image. If the bank card is a pure white or a card surface mainly white, when the alias of the card and the class II/III cut chart are displayed as shown in fig. 3, the problem of unclear and unclear display of the beveled cross bar boundary (such as the part of the irregular circle position in fig. 3) occurs.
Disclosure of Invention
In view of the above, the present invention aims to provide a method and a system for generating a bank card display image, which can avoid the problem of blurred boundaries due to the combination of the front Jing Ka and the background image.
The method for generating the bank card display image is characterized by comprising the following steps of:
a tone analysis step of selecting a specific area in an input bank card image as a color taking area, and judging the tone of the bank card image by analyzing the color characteristics of the color taking area;
a background image generating step of amplifying the inputted bank card image to generate an amplified bank card image, and blurring the amplified bank card image to generate a background image;
a display character generating step of determining display characters in a bank card display image based on the type of the bank card and determining colors of the display characters according to the color tone of the bank card image obtained in the color tone analyzing step; and
and an image synthesizing step of using the inputted bank card image as a foreground card image, and collaging the front Jing Ka image with the background image generated in the background image generating step and the display text whose color is determined in the display text generating step, and capturing the background image including the front Jing Ka image, the display text and a part of the display text to generate a bank card display image.
Optionally, in the case that the tone of the bank card image is determined to be a dark tone in the tone analysis step, determining that the color of the display text is white in the display text generation step;
when the tone analysis step determines that the tone of the card image is a bright tone, the display character generation step determines that the color of the display character is a black system.
Optionally, the tone analysis step includes:
selecting a plurality of color taking areas in the bank card image for the inputted bank card image; and
and judging the color tone of the bank card image according to the RGB color values of the plurality of color taking areas.
Optionally, the color taking area includes:
setting a first color taking area, so that the first color taking area is positioned at the lower left part of the bank card image;
setting a second color taking area, so that the second color taking area is positioned at the upper right of the bank card image; and
the third color taking area is arranged so that the third color taking area is positioned at the upper left of the bank card image and partially coincides with the first color taking area.
Optionally, the color taking area includes:
the image size of the front Jing Ka image is set to be (w, h), the lower left corner of the front Jing Ka image is set to be the origin,
selecting a first color taking area, so that the coordinate range of the first color taking area is as follows:
0.29w≤x≤0.59w,0.17h≤y≤0.28h;
selecting a second color taking area, so that the coordinate range of the second color taking area is as follows:
x is more than or equal to 0.81w and less than or equal to 0.97w, y is more than or equal to 0.83h and less than or equal to 0.94h; and
selecting a third color-taking area so that the coordinate range of the third color-taking area is
0.03w≤x≤0.59w,0.06h≤y≤0.18h,
Where x is the abscissa and y is the ordinate.
Optionally, in the tone analysis step, it is determined that any color value of RGB of the pixel point in the first color taking area is between a preset first color value range and a proportion of total pixel points in the pixel point occupying area that satisfies a condition is a first prescribed threshold or more, if yes, it is determined that the tone of the bank card image is a dark tone, otherwise, it is further determined whether any color value of RGB of the pixel point in the second color taking area and the third color taking area is between a preset second color value range and a proportion of total pixel points in the pixel point occupying area that satisfies a condition is a second prescribed threshold or more, if yes, it is determined that the bright tone of the bank card image is cut off, and if not, it is determined that the tone of the bank card image is a dark tone.
Optionally, the first color value ranges from 0 to 150, and the second color value ranges from 235 to 255.
Optionally, the first specified threshold is 50%, and the second specified threshold is 50%.
Optionally, in the step of generating the display text, when the color of the display text is determined to be black, a gray background blurred bar is further generated in the step of generating the display text for the display text region.
Optionally, in the step of generating the background image, if the color of the display text is determined to be white in the step of generating the display text, performing gaussian blur processing after the brightness of the amplified bank card image is improved;
and when the display text generating step determines that the color of the display text is black, in the background image generating step, performing Gaussian blur processing after reducing the brightness of the amplified bank card image to generate a background image.
The bank card display image generation system according to one aspect of the present invention is characterized by comprising:
the color tone analysis module is used for selecting a specific area in the inputted bank card image as a color taking area and judging the color tone of the bank card image by analyzing the color characteristics of the color taking area;
the background image generation module is used for amplifying the inputted bank card image to generate an amplified bank card image, and blurring the amplified bank card image to generate a background image;
the display text generation module is used for determining display text in a bank card display image based on the type of the bank card and determining the color of the display text according to the tone of the bank card image obtained by the tone analysis module;
and the image synthesis module takes the inputted bank card image as a foreground card image, the front Jing Ka image, the background image generated by the background image generation module and the display text with the color determined by the display text generation module are collaged, and the background image containing the front Jing Ka image, the display text and part of the display text is intercepted to generate a bank card display image.
Optionally, if the tone analysis module determines that the tone of the bank card image is a dark tone, determining that the color of the display text is a white line in the display text generation module;
and under the condition that the tone analysis module judges that the tone of the bank card image is a bright tone, the display character generation module determines that the color of the display character is a black system.
Optionally, in the tone analysis module, for the inputted bank card image, a plurality of color taking areas in the bank card image are selected, and the tone of the bank card image is judged according to the RGB color values of the plurality of color taking areas.
Optionally, the color taking area includes:
the image size of the front Jing Ka image is set to be (w, h), the lower left corner of the front Jing Ka image is set to be the origin,
selecting a first color taking area, so that the coordinate range of the first color taking area is as follows:
0.29w≤x≤0.59w,0.17h≤y≤0.28h;
selecting a second color taking area, so that the coordinate range of the second color taking area is as follows:
x is more than or equal to 0.81w and less than or equal to 0.97w, y is more than or equal to 0.83h and less than or equal to 0.94h; and
selecting a third color-taking area so that the coordinate range of the third color-taking area is
0.03w≤x≤0.59w,0.06h≤y≤0.18h,
Where x is the abscissa and y is the ordinate.
Optionally, in the tone analysis module, it is determined that any color value of RGB of the pixel point in the first color taking area is between a preset first color value range and a proportion of total pixel points in the pixel point occupying area that satisfies a condition is above a first preset threshold, if yes, it is determined that the tone of the bank card image is a dark tone, otherwise, it is further determined whether any color value of RGB of the pixel point in the second color taking area and the third color taking area is between a preset second color value range and a proportion of total pixel points in the pixel point occupying area that satisfies a condition is above a second preset threshold, if yes, it is determined that the bright tone of the bank card image is cut off, and if not, it is determined that the tone of the bank card image is a dark tone.
Optionally, the first color value ranges from 0 to 150, and the second color value ranges from 235 to 255.
Optionally, the first specified threshold is 50%, and the second specified threshold is 50%.
Optionally, in the case that the color of the display text is determined to be black in the display text generation module, a gray background fuzzy bar is further generated in the display text generation module for the display text region.
Optionally, in the case that the color of the display text is determined to be white in the display text generating module, in the background image generating module, performing gaussian blur processing on the amplified bank card image after improving the image brightness to generate a background image;
and under the condition that the display text generation module determines that the color of the display text is black, in the background image generation module, performing Gaussian blur processing after reducing the brightness of the amplified bank card image to generate a background image.
Optionally, the color taking area includes:
setting a first color taking area, so that the first color taking area is positioned at the lower left part of the bank card image;
setting a second color taking area, so that the second color taking area is positioned at the upper right of the bank card image; and
the third color taking area is arranged so that the third color taking area is positioned at the upper left of the bank card image and partially coincides with the first color taking area.
The computer readable medium according to an aspect of the present invention has stored thereon a computer program, wherein the computer program when executed by a processor implements the bank card presentation image generation method.
The computer equipment of one aspect of the invention comprises a storage module, a processor and a computer program stored on the storage module and capable of running on the processor, and is characterized in that the computer program is executed by the processor to realize the bank card display image generation method.
As described above, according to the method and system for generating a bank card display image of the present invention, a specific color taking area or color taking point is set for a bank card image, and the color or tone of the color taking area or color taking point is analyzed and confirmed to obtain the tone of the bank card image, and then the color of display text in a background image is set according to the tone of the bank card image, so that the problem that the display of text on the card surface in the bank card display image is unclear can be effectively solved, and the problem that the boundary between a foreground card image and the background image is blurred is solved by adding gaussian blur processing when generating the background image.
Drawings
An example of a prior art bank card presentation image is shown in fig. 1.
Fig. 2 is a view showing an example of unclear text in a prior art bank card presentation image.
Fig. 3 is a view showing an example of unclear boundaries in a prior art bank card presentation image.
Fig. 4 is a flowchart showing a method for generating a bank card presentation image according to the present invention.
Fig. 5 is a block diagram showing the configuration of the bank card presentation image generation system of the present invention.
Fig. 6 is a flowchart showing a method for generating a bank card presentation image according to an embodiment of the present invention.
Fig. 7 is a schematic diagram showing an example of a character color determination method in a bank card presentation image.
Detailed Description
The following presents a simplified summary of the invention in order to provide a basic understanding of the invention. It is not intended to identify key or critical elements of the invention or to delineate the scope of the invention.
For the purposes of brevity and explanation, the principles of the present invention are described herein primarily with reference to exemplary embodiments thereof. However, those skilled in the art will readily recognize that the same principles are equally applicable to all types of bank card presentation image generation methods and bank card presentation image generation systems, and that these same principles and any such variations may be implemented therein without departing from the true spirit and scope of the present patent application.
Also, in the following description, reference is made to the accompanying drawings that illustrate specific exemplary embodiments. Electrical, mechanical, logical and structural changes may be made to these embodiments without departing from the spirit and scope of the present invention. Furthermore, while a feature of the invention may have been disclosed with respect to only one of several implementations/embodiments, such feature may be combined with one or more other features of the other implementations/embodiments, as may be desired and/or advantageous for any given or identifiable function. The following description is, therefore, not to be taken in a limiting sense, and the scope of the present invention is defined by the appended claims and their equivalents.
Terms such as "comprising" and "including" mean that the technical solution of the present invention does not exclude the presence of other elements (modules) and steps than those directly and explicitly described in the description and claims.
Fig. 4 is a flowchart showing a method for generating a bank card presentation image according to the present invention.
As shown in fig. 4, the method for generating a bank card display image of the present invention includes the following steps:
tone analysis step S100: for an input bank card image, selecting a specific area in the bank card image as a color taking area, and judging the color tone of the bank card image by analyzing the color characteristics of the color taking area;
background image generation step S200: amplifying the inputted bank card image to generate an amplified bank card image, and performing Gaussian blur processing on the amplified bank card image to generate a background image;
a display text generation step S300: determining display characters in a bank card display image based on the type of the bank card and determining the color of the display characters according to the tone of the bank card image obtained in the tone analysis step; and
image synthesis step S400: the bank card image to be input may be a foreground card image, the background image generated in the step of generating the front Jing Ka image and the background image, and the display text whose color is specified in the step of generating the display text may be collaged, and as an example, the foreground card image may be overlaid on the background image and the display text may be added to a predetermined area (for example, below the foreground card image on the background image), and the background image including the front Jing Ka image and a part of the background image may be captured to generate the bank card display image.
When it is determined in the tone analysis step S100 that the tone of the card image is a dark tone, it is determined in the display text generation step S300 that the color of the display text is a white line;
when the tone analysis step S100 determines that the tone of the bank card image is a bright tone, the display character generation step S300 determines that the color of the display character is a black system.
Fig. 5 is a block diagram showing the configuration of the bank card presentation image generation system of the present invention.
As shown in fig. 5, the bank card presentation image generation system of the present invention includes:
the tone analysis module 200 is used for reading the image of the bank card, selecting a specific area in the image of the bank card as a color taking point, and judging the main tone of the bank card by analyzing the color characteristics of the color taking point;
the background image generating module 300 is configured to perform amplification processing on an input bank card image (for example, the bank card image may be input from the tone analyzing module 200 or the bank card image may be directly input from the outside) as a background image, adjust the brightness of the amplified bank card image according to the tone of the background image, and add gaussian blur to the image to generate a background image;
the display text generation module 400 is used for determining the text to be displayed in the bank card display image based on the type of the bank card and determining the color of the display text based on the background image tone of the bank card image;
the image synthesis module 500 is configured to collage the bank card image as a foreground card image, a background image and a display text, and intercept a range of the background image including the foreground card image and a part of the background image as a final bank card display image.
According to the method and the system for generating the bank card display image, provided by the invention, the color of the bank card image is obtained by setting the specific color taking area or color taking point for the bank card image and analyzing and confirming the color or the color tone of the color taking area or color taking point, and then the color of the display text in the background image is set according to the color tone of the bank card image, so that the problem that the text on the card surface in the bank card display image is not clearly displayed can be effectively solved, and the problem that the boundary of the foreground card image and the background image is fuzzy is solved by adding Gaussian blur processing when the background image is generated.
Next, a specific embodiment of the method for generating a bank card presentation image according to the present invention will be described.
Fig. 6 is a flowchart showing a method for generating a bank card presentation image according to an embodiment of the present invention.
As shown in fig. 6, the method for generating a bank card display image according to an embodiment of the present invention includes the following steps:
s1: the tone analysis module 100 reads the bank card image;
s2: the tone analysis module 100 uses the read bank card image as a foreground card image, determines 3 color taking areas according to the image size of the foreground card image,
s3: the background image generation module 300 acquires a bank card image from the tone analysis module 100, enlarges the bank card image, and serves as a background image B1;
s4: if any color value of the pixel points RGB in the color taking area 1 is between 0 and 150 (including equal), and the pixel points meeting the condition account for 50% or more of the total pixel points in the area, the color tone of the card surface is dark, and the step S6 is executed; otherwise, executing the step S5;
s5: if any color value of the pixel points RGB in the color taking area 2 and the color taking area 3 is between 235 and 255 (including equal), and the pixel points meeting the condition account for 50% or more of the total pixel points in the area, the color tone of the card surface is a bright color tone, and the step S8 is executed; otherwise, executing the step S6;
s6: the display text generation module 200 generates white text;
s7: in the case of generating white text, the background image generation module 300 increases the brightness of the background image B1, and S11 is executed;
s8: the display text generation module 300 generates black text;
s9: preferably, in the case of generating black text, the display text generation module 300 may also generate a gray background blurred bar in the display text region;
s10: the background image generation module 300 reduces the brightness of the background image B1;
s11: the background image generation module 300 adds gaussian blur to the background image B1;
s12: and covering the foreground card image on the middle position of the background image B1, adding the display text into a specified area, and cutting the synthesized image.
Among them, the 3 color taking areas in S2 are explained.
As one example, the 3 color extraction areas may include:
setting a color taking area 1 so that the color taking area 1 is positioned at the lower left of the bank card image;
setting a color taking area 2 so that the color taking area 2 is positioned at the upper right of the bank card image; and
the taking area 3 is set so that the taking area 3 is located at the upper left of the bank card image and partially coincides with the taking area 1.
More specifically, the following one example is also exemplified.
The image size of the foreground card image is set as (w, h), the lower left corner of the card surface is taken as the origin,
selecting a first color taking area, so that the coordinate range of the first color taking area is as follows:
0.29w≤x≤0.59w,0.17h≤y≤0.28h;
selecting a second color taking area, so that the coordinate range of the second color taking area is as follows:
x is more than or equal to 0.81w and less than or equal to 0.97w, y is more than or equal to 0.83h and less than or equal to 0.94h; and
selecting a third color-taking area so that the coordinate range of the third color-taking area is
0.03w≤x≤0.59w,0.06h≤y≤0.18h,
Where x is the abscissa and y is the ordinate.
Next, an example of a character color determination method in a bank card display image will be described. Fig. 7 is a schematic diagram showing an example of a character color determination method in a bank card presentation image.
In fig. 7, when any color value of the pixel points RGB in the color taking area 1 in the card surface is between 0 and 150 (including equal), and the pixel points satisfying the condition occupy 50% or more of the total pixel points in the area, the left-hand style in fig. 7 is adopted, that is, the fields of the card number, the card attribute, the card function, the number of cards and the like will become white, and the unopened fields will become light white (these characters are generally located in the background image below the foreground card image).
In fig. 7, when any color value of the pixel points RGB in the color taking area 2 and the color taking area 3 in the card surface is between 235 and 255 (including equal), and the pixel points satisfying the condition occupy 50% or more of the total pixel points in the area, the pattern on the right side of fig. 7 is adopted to change the blurred horizontal bar above the card surface into gray to make the blurred horizontal bar appear.
As described above, according to the method and system for generating a bank card display image of the present invention, not only can the problem of blurring of a typeface displayed at a certain position in the case where a bank card image is a solid black card or a color tone mainly including black be avoided, but also the problem of unclear and unclear display of a beveled bar border in the case where a bank card image is a solid white or a color tone mainly including white can be avoided.
The above examples mainly illustrate the bank card display image generation method and the bank card display image generation system of the present invention. Although only a few specific embodiments of the present invention have been described, those skilled in the art will appreciate that the present invention may be embodied in many other forms without departing from the spirit or scope thereof. Accordingly, the present examples and embodiments are to be considered as illustrative and not restrictive, and the invention is intended to cover various modifications and substitutions without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (22)

1. A method for generating a bank card display image, comprising:
a tone analysis step of selecting a specific area in an input bank card image as a color taking area, and judging the tone of the bank card image by analyzing the color characteristics of the color taking area;
a background image generating step of amplifying the inputted bank card image to generate an amplified bank card image, and blurring the amplified bank card image to generate a background image;
a display character generating step of determining display characters in a bank card display image based on the type of the bank card and determining colors of the display characters according to the color tone of the bank card image obtained in the color tone analyzing step; and
and an image synthesizing step of using the inputted bank card image as a foreground card image, and collaging the front Jing Ka image with the background image generated in the background image generating step and the display text whose color is determined in the display text generating step, and capturing the background image including the front Jing Ka image, the display text and a part of the display text to generate a bank card display image.
2. The method for generating a bank card presentation image according to claim 1, wherein,
when the tone analysis step judges that the tone of the bank card image is dark, determining that the color of the display text is white in the display text generation step;
when the tone analysis step determines that the tone of the card image is a bright tone, the display character generation step determines that the color of the display character is a black system.
3. The method for generating a bank card presentation image according to claim 1, wherein,
the tone analysis step includes:
selecting a plurality of color taking areas in the bank card image for the inputted bank card image; and
and judging the color tone of the bank card image according to the RGB color values of the plurality of color taking areas.
4. The method for generating a bank card presentation image as claimed in claim 3, wherein,
the selecting the color taking area comprises the following steps:
selecting a first color taking area, so that the first color taking area is positioned at the lower left part of the bank card image;
selecting a second color taking area, so that the second color taking area is positioned at the upper right of the bank card image; and
and selecting a third color taking area, wherein the third color taking area is positioned at the upper left of the bank card image and partially coincides with the first color taking area.
5. The method for generating a bank card presentation image as claimed in claim 3, wherein,
the selecting the color taking area comprises the following steps:
let the image size of the front Jing Ka image be: w, h and with the lower left corner of the front Jing Ka image as the origin,
selecting a first color taking area, so that the coordinate range of the first color taking area is as follows:
0.29w≤x≤0.59w,0.17h≤y≤0.28h;
selecting a second color taking area, so that the coordinate range of the second color taking area is as follows:
x is more than or equal to 0.81w and less than or equal to 0.97w, y is more than or equal to 0.83h and less than or equal to 0.94h; and
selecting a third color-taking area so that the coordinate range of the third color-taking area is
0.03w≤x≤0.59w,0.06h≤y≤0.18h,
Where x is the abscissa and y is the ordinate.
6. The method for generating a bank card presentation image as claimed in claim 5, wherein,
in the tone analysis step, it is determined whether any color value of RGB of the pixel point in the first color taking area is within a preset first color value range, and a proportion of the pixel point occupying the condition within the color taking area is equal to or greater than a first preset threshold, if yes, it is determined that the tone of the bank card image is a dark tone, otherwise, it is further determined whether any color value of RGB of the pixel point in the second color taking area and the third color taking area is within a preset second color value range, and a proportion of the pixel point occupying the condition within the pixel point occupying the area is equal to or greater than a second preset threshold, if yes, it is determined that the bright tone of the bank card image is cut off, and if not, it is determined that the tone of the bank card image is a dark tone.
7. The method for generating a bank card presentation image as claimed in claim 6, wherein,
the first color value range is 0-150, and the second color value range is 235-255.
8. The method for generating a bank card presentation image as claimed in claim 6, wherein,
the first predetermined threshold is 50%, and the second predetermined threshold is 50%.
9. The method for generating a bank card presentation image as claimed in claim 2, wherein,
and under the condition that the color of the display text is determined to be black in the display text generation step, generating a gray background fuzzy horizontal bar in the display text area.
10. The method for generating a bank card presentation image as claimed in claim 9, wherein,
when the color of the display text is determined to be white in the display text generation step, in the background image generation step, performing Gaussian blur processing after the brightness of the amplified bank card image is improved to generate a background image;
and when the display text generating step determines that the color of the display text is black, in the background image generating step, performing Gaussian blur processing after reducing the brightness of the amplified bank card image to generate a background image.
11. A bank card presentation image generation system, comprising:
the color tone analysis module is used for selecting a specific area in the inputted bank card image as a color taking area and judging the color tone of the bank card image by analyzing the color characteristics of the color taking area;
the background image generation module is used for amplifying the inputted bank card image to generate an amplified bank card image, and blurring the amplified bank card image to generate a background image;
the display text generation module is used for determining display text in a bank card display image based on the type of the bank card and determining the color of the display text according to the tone of the bank card image obtained by the tone analysis module;
and the image synthesis module takes the inputted bank card image as a foreground card image, the front Jing Ka image, the background image generated by the background image generation module and the display text with the color determined by the display text generation module are collaged, and the background image containing the front Jing Ka image, the display text and part of the display text is intercepted to generate a bank card display image.
12. The bank card display image generation system of claim 10, wherein,
under the condition that the tone of the bank card image is judged to be dark tone in the tone analysis module, determining that the color of the display text is white in the display text generation module;
and under the condition that the tone analysis module judges that the tone of the bank card image is a bright tone, the display character generation module determines that the color of the display character is a black system.
13. The bank card display image generation system of claim 10, wherein,
and selecting a plurality of color taking areas in the bank card image for the inputted bank card image in the tone analysis module, and judging the tone of the bank card image according to the RGB color values of the plurality of color taking areas.
14. The bank card display image generation system of claim 10, wherein,
the selecting the color taking area comprises the following steps:
let the image size of the front Jing Ka image be w, h and take the lower left corner of the front Jing Ka image as the origin,
selecting a first color taking area, so that the coordinate range of the first color taking area is as follows:
0.29w≤x≤0.59w,0.17h≤y≤0.28h;
selecting a second color taking area, so that the coordinate range of the second color taking area is as follows:
x is more than or equal to 0.81w and less than or equal to 0.97w, y is more than or equal to 0.83h and less than or equal to 0.94h; and
selecting a third color-taking area so that the coordinate range of the third color-taking area is
0.03w≤x≤0.59w,0.06h≤y≤0.18h,
Where x is the abscissa and y is the ordinate.
15. The bank card display image generation system of claim 14, wherein,
in the tone analysis module, it is determined whether any color value of RGB of the pixel point in the first color taking area is within a preset first color value range, and a proportion of the pixel point occupying the total pixel points in the color taking area meeting the condition is more than a first preset threshold, if yes, it is determined that the tone of the bank card image is a dark tone, otherwise, it is further determined whether any color value of RGB of the pixel point in the second color taking area and the third color taking area is within a preset second color value range, and a proportion of the pixel point occupying the total pixel points in the color taking area meeting the condition is more than a second preset threshold, if yes, it is determined that the bright tone of the bank card image is cut off, and if not, it is determined that the tone of the bank card image is a dark tone.
16. The bank card display image generation system of claim 15, wherein,
the first color value range is 0-150, and the second color value range is 235-255.
17. The bank card display image generation system of claim 15, wherein,
the first predetermined threshold is 50%, and the second predetermined threshold is 50%.
18. The bank card display image generation system of claim 12, wherein,
and under the condition that the display text generation module determines that the color of the display text is black, generating a gray background fuzzy horizontal bar in the display text area.
19. The bank card display image generation system of claim 18, wherein,
under the condition that the color of the display text is determined to be white in the display text generation module, in the background image generation module, carrying out Gaussian blur processing after improving the brightness of the amplified bank card image to generate a background image;
and under the condition that the display text generation module determines that the color of the display text is black, in the background image generation module, performing Gaussian blur processing after reducing the brightness of the amplified bank card image to generate a background image.
20. The bank card display image generation system of claim 12, wherein,
the selecting the color taking area comprises the following steps:
selecting a first color taking area, so that the first color taking area is positioned at the lower left part of the bank card image;
selecting a second color taking area, so that the second color taking area is positioned at the upper right of the bank card image; and
and selecting a third color taking area, wherein the third color taking area is positioned at the upper left of the bank card image and partially coincides with the first color taking area.
21. A computer readable medium having a computer program stored thereon, characterized in that,
the computer program, when executed by a processor, implements the bank card presentation image generation method of any one of claims 1 to 10.
22. A computer device comprising a memory module, a processor and a computer program stored on the memory module and executable on the processor, characterized in that,
the method for generating a bank card display image according to any one of claims 1 to 10 is realized when the processor executes the computer program.
CN202211423571.7A 2022-11-15 2022-11-15 Bank card display image generation method and system Pending CN116206324A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211423571.7A CN116206324A (en) 2022-11-15 2022-11-15 Bank card display image generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211423571.7A CN116206324A (en) 2022-11-15 2022-11-15 Bank card display image generation method and system

Publications (1)

Publication Number Publication Date
CN116206324A true CN116206324A (en) 2023-06-02

Family

ID=86516200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211423571.7A Pending CN116206324A (en) 2022-11-15 2022-11-15 Bank card display image generation method and system

Country Status (1)

Country Link
CN (1) CN116206324A (en)

Similar Documents

Publication Publication Date Title
EP2545499B1 (en) Text enhancement of a textual image undergoing optical character recognition
JP3881439B2 (en) Image processing device
US5093868A (en) Method for determining lines of character images for use in an optical reader
US7342585B2 (en) Use of an input overscaled bitmap to generate emboldened overscaled bitmap
CN114549670B (en) Image processing method and image processing system
JP3995185B2 (en) Frame recognition device and recording medium
US8254693B2 (en) Image processing apparatus, image processing method and program
CN112070708B (en) Image processing method, image processing apparatus, electronic device, and storage medium
CN113810674A (en) Image processing method and device, terminal and readable storage medium
CN112800718A (en) PDF document display method, computer equipment and storage medium
CN116206324A (en) Bank card display image generation method and system
JP2007079586A (en) Image processor
WO2008156686A2 (en) Applying a segmentation engine to different mappings of a digital image
EP1704556B1 (en) Method and system to combine a digital graphics object and a digital picture
CN112508024A (en) Intelligent identification method for embossed seal font of electrical nameplate of transformer
JP4653215B2 (en) Code recognition method and apparatus, electronic apparatus, program, and storage medium
CN111405345B (en) Image processing method, image processing device, display device and readable storage medium
EP4246428A1 (en) Perspective method for physical whiteboard and generation method for virtual whiteboard
EP0655703A2 (en) Method for scanning small fonts in an optical character recognition system
CN113971638A (en) Method, device, computer storage medium and terminal for realizing document restoration
JP2000040153A (en) Image processing method, medium recording image processing program and image processor
CN113902754A (en) Method for generating standardized electronic data
CN112561924A (en) Method, terminal and readable storage medium for automatically acquiring maximum overlapping area of multi-scene images
CN116740198A (en) Image processing method, apparatus, device, storage medium, and program product
JPH1166225A (en) Device and method for table information extraction and record medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination