WO2021110089A1 - Method, apparatus, device and medium for card surface detection - Google Patents

Method, apparatus, device and medium for card surface detection Download PDF

Info

Publication number
WO2021110089A1
WO2021110089A1 PCT/CN2020/133562 CN2020133562W WO2021110089A1 WO 2021110089 A1 WO2021110089 A1 WO 2021110089A1 CN 2020133562 W CN2020133562 W CN 2020133562W WO 2021110089 A1 WO2021110089 A1 WO 2021110089A1
Authority
WO
WIPO (PCT)
Prior art keywords
card surface
preset area
target picture
alpha channel
detected
Prior art date
Application number
PCT/CN2020/133562
Other languages
French (fr)
Inventor
Lei Yang
Liang XIE
Jie He
Benlin WANG
Original Assignee
Giesecke+Devrient Mobile Security Gmbh
Giesecke+Devrient (China) Technologies 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 Giesecke+Devrient Mobile Security Gmbh, Giesecke+Devrient (China) Technologies Co., Ltd. filed Critical Giesecke+Devrient Mobile Security Gmbh
Publication of WO2021110089A1 publication Critical patent/WO2021110089A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour

Definitions

  • the present invention relates to the field of detection technology, in particular to a method, apparatus, device, and medium for card surface detection.
  • smart cards are widely used by users in daily life, but most smart cards belonging to the same category have the same style.
  • style of each person's transportation card is the same in appearance, and the appearance of bank cards belonging to the same bank are the same for everyone, which makes it impossible to meet the personalization needs of users.
  • the embodiment of the present invention provides a method, apparatus, device, and medium for card surface detection, which can automatically detect whether the uploaded pattern completely covers the entire card surface when the user customizes the card surface pattern, without manual verification, thereby improving the efficiency and accuracy of card surface detection.
  • a method for card surface detection comprises:
  • the method for card surface detection before obtaining the target picture, further comprises:
  • the Alpha channel values of the preset area By setting the initial Alpha channel values of the preset area to 0%, the Alpha channel values of the preset area covered with the target picture can be clearly distinguished from the initial Alpha channel values, thereby improving the accuracy of the card surface detection.
  • the detecting whether the target picture completely covers the preset area of the card surface to be detected comprises:
  • the target card does not completely cover the preset area of the card surface to be detected, it is also possible to generate adjustment prompt information based on the vertex position where the Alpha channel value has not changed, and provide adjustment suggestions for the user, which improves the user experience.
  • generating adjustment prompt information based on the vertex position where the Alpha channel value has not changed comprises:
  • generating adjustment prompt information based on the vertex position where the Alpha channel value has not changed comprises:
  • the user By performing a flashing prompt at the vertex position where the Alpha channel value has not changed by using the pixel values corresponding to the contrast color for the target picture, the user is enabled to more intuitively know on which position of the preset area of the card surface to be detected the target picture does not cover at this time, so that the user can adjust the position of the target picture pertinently, which improves the user experience.
  • an apparatus for card surface detection comprises: an obtaining module configured to obtain a target picture to make the target picture cover a preset area of a card surface to be detected;
  • a first detection module configured to detect the Alpha channel values of the vertices of the preset area
  • a device for card surface detection comprising:
  • processors implements the above method for card surface detection according to the embodiments of the present invention, when executing the computer program instructions.
  • the method, apparatus, device and medium for card surface detection provided by the embodiments of the present invention can detect whether the target picture completely covers the preset area of the card surface to be detected by detecting the Alpha channel values of the vertices of the preset area when the target picture covers the preset area of the card surface to be detected, without any manual verification, which improves the efficiency and the accuracy of card surface detection.
  • FIG. 1 shows a flowchart of a method for card surface detection according to an embodiment of the present invention
  • FIG. 2 shows a schematic diagram of card surface detection according to an embodiment of the present invention
  • FIG. 3 shows a schematic structural diagram of an apparatus for card surface detection according to an embodiment of the present invention.
  • FIG. 4 shows a structural diagram of an exemplary hardware architecture of an embodiment of the present invention.
  • a user In order to meet the needs of users for custom card patterns, a user is currently allowed to upload pictures, and the background picture of the card surface is drawn into a style of the picture uploaded by the user to meet the personalized need of the user.
  • the embodiments of the present invention provide a method, apparatus, device and medium for card surface detection, which can automatically detect whether the uploaded pattern completely covers the entire card surface when the user adjusts the coverage position of the uploaded picture in the preset area of the card surface, without manual verification, which improves the efficiency and the accuracy of card surface detection.
  • the Alpha channel represents an opaque parameter.
  • the Alpha channel values is 0%, it means completely transparency, and when the Alpha channel values are 100%, it means completely opaque.
  • the terminal device may display the target picture in the preset area of the card surface to be detected.
  • the size of the preset area of the card surface to be detected may be an area consistent with the size of the card to be detected.
  • the method for the card surface detection before obtaining the target picture, further comprises: setting initial Alpha channel values of the preset area of the card surface to be detected to 0%.
  • the preset area of the card surface to be detected can be set to colorless and transparent RGBA (0, 0, 0, 0) .
  • the Alpha channel values covered with the target picture can be clearly distinguished from the initial Alpha channel values, which makes it convenient for the terminal device to detect the Alpha channel values of the preset area and improves the efficiency for the terminal device to detect the Alpha channel values of the preset area, and improves the accuracy of the card surface detection.
  • the preset area of the card surface to be detected has initial Alpha channel values. If the target picture completely covers the preset area, it will be detected that the Alpha channel values of all vertices of the preset area changes, and are no longer the initial Alpha channel values of the preset area. However, if it is detected that the Alpha channel value of at least one vertex of the preset area has not changed and is still the initial Alpha channel value, it can be considered that the target picture does not completely cover the preset area of the card surface to be detected.
  • the vertex position where the Alpha channel value has not changed can be further determined. For example, it is known that the vertex position where the Alpha channel value has not changed is at the upper left corner of the preset area. Based on the determined vertex position where the Alpha channel value has not changed, an adjustment prompt message is generated.
  • FIG. 2 shows a schematic diagram of card surface detection according to an embodiment of the present invention.
  • the initial Alpha channel values of the preset area are 0%
  • the gray area is the display area of the target picture in the preset area.
  • the positions of the vertices of which the Alpha channel values are 0% can be further determined.
  • an adjustment prompt message can be generated.
  • the adjustment information can be adjustment prompt by way of flashing at the positions of vertices 1 and 4, or can be displaying adjustment prompt information by generating an information pop-up window.
  • the adjustment prompt information is generated based on the vertex positions where the Alpha channel values have not changed when the target card does not completely cover the preset area of the card surface to be detected, which can provide the user with adjustment suggestions, thereby improving the user experience.
  • the target picture may be prompted the user that the target picture needs to be moved to the vertex positions where the Alpha channel values have not changed, and/or that the target picture needs to be enlarged.
  • the user can be prompted with the adjustment prompt message "The target picture needs to be moved to the upper left corner of the preset area” , or the user is prompted with the adjustment prompt message of "The target picture needs to be moved to the lower left corner of the preset area” , the user can also be prompted with the adjustment prompt message "The target picture needs to be enlarged. " The user can independently choose the adjustment method according to the adjustment prompt information. For example, in the case shown in FIG. 2, the user only needs to choose to adjust by moving the target picture, without the need to enlarge the target picture.
  • the terminal can directly prompt the user to move to a certain direction of the preset area when it determines the vertex positions with the Alpha channel values of 0%are on the same side of the preset area. For example, when the positions of the vertices with an Alpha channel values of 0%are the upper left corner and the lower left corner of the preset area, the system determines that the two vertices are located on the left side of the preset display area, and it can prompt the user with an adjustment prompt identification of "The target picture needs to be moved to the left side of the preset area.
  • a flashing prompt may also be performed at the vertex position where the Alpha channel value has not changed.
  • flashing may be performed at the locations of vertex 1 and vertex 4 by identifying of shapes such as rectangle and circle to remind the user of the uncovered position of the target picture in the preset area.
  • the preset rule may be that among the multiple background colors included in the target picture, the contrast color for the background color with the largest proportion is used as the contrast color for the target picture.
  • the multiple background colors included in the target picture are red, blue, and green.
  • red occupies 60%of the background color of the target picture, which occupies the largest proportion, so the contrast color of red, that is cyan, is selected as the contrast color for the target picture.
  • flashing with cyan may be performed at the top left corner vertex of the preset area (the vertex of which the Alpha channel value has not changed) .
  • this application also provides a specific implementation of the device for card surface detection. See FIG. 3.
  • the device for card surface detection according to the embodiment of the present invention will be described in detail below with reference to FIG. 3.
  • the device for card surface detection corresponds to the card surface detection method.
  • Fig. 3 shows a schematic structural diagram of a device for card surface detection according to an embodiment of the present invention.
  • the device for card surface detection comprises: an obtaining module 310 configured to obtain a target picture to make the target picture cover the preset area of a card surface to be detected.
  • a detection module 320 configured to detect the Alpha channel values of the vertices of the preset area, and detect whether the target picture completely covers the preset area of the card surface to be detected based on the Alpha channel values of the vertices of the preset area.
  • the terminal device through the device for card surface detection, after obtaining the target picture uploaded by the user, the terminal device only needs to detect the Alpha channel values of the vertices of the preset area, and by judging the Alpha channel values of the vertices of the preset area, to judge whether the target picture completely covers the preset area of the card surface to be detected. There is no need for manual verification, and there are a small amount of calculations for a system, which can improve the efficiency of system detection.
  • the device for detecting card surface further comprises:
  • a setting module configured to set initial Alpha channel values of the preset area of the card surface to be detected to 0%before obtaining the target picture.
  • the detection module is further configured to determine that the target picture does not completely cover the preset area of the card surface to be detected, if an Alpha channel value of at least one vertex of the preset area has not changed.
  • the obtaining module 310 further comprises:
  • a determining module configured to determine the vertex position where the Alpha channel value has not changed if the target picture does not completely cover the preset area of the card surface to be detected.
  • a generation sub-module is configured to generate adjustment prompt information based on the vertex position where the Alpha channel value has not changed.
  • the user by determining the vertex position where the Alpha channel value has not changed, and providing the user with specific adjustment prompt information, the user can adjust the picture pertinently, thereby improving the user experience.
  • the generating submodule is further configured to: perform a flashing prompt at the vertex position where the Alpha channel value has not changed.
  • the generating sub-module is specifically configured to:
  • the preset rule comprises: among the multiple background colors included in the target picture, the contrast color for the background color that occupies the largest proportion is used as the contrast color for the target picture.
  • the user by performing a flashing prompt at the vertex position where the Alpha channel value has not changed using the pixel values corresponding to the contrast color for the target picture, the user can more intuitively know on which position the target picture does not cover on the preset area of the card to be detected at this time, so that the user can adjust the position of the target picture pertinently, thereby improving the user experience.
  • Each module of the device for card surface detection provided by the embodiment of the present invention has the function of implementing the method/steps of the card surface detection of the embodiments shown in FIGs. 1 to 2, and can achieve the technical effect corresponding to the embodiment shown in FIGs. 1 to 2, and the details thereof are omitted for the sake of description simplicity.
  • FIG. 4 shows a structural diagram of an exemplary hardware architecture of a computing device capable of implementing the method and device for card surface detection according to the embodiments of the present invention.
  • the computing device 400 comprises an input device 401, an input interface 402, a central processor 403, a memory 404, an output interface 405, and an output device 406.
  • the input interface 402, the central processor 403, the memory 404, and the output interface 405 are connected to each other through a bus 410, and the input device 401 and the output device 406 are respectively connected to the bus 410 through the input interface 402 and the output interface 405, and then connected to the other components of the computing device 400.
  • the input device 401 receives input information from the outside, and transmits the input information to the central processor 403 through the input interface 402; the central processor 403 processes the input information based on the computer executable instructions stored in the memory 404 to generate output information, stores the output information in the memory 404 temporarily or permanently, and then transmits the output information to the output device 406 through the output interface 405; and the output device 406 outputs the output information to the outside of the computing device 400 for use by the user.
  • the computing device 400 shown in FIG. 4 may also be implemented as a device for card surface detection, which may comprise: a memory having stored thereon computer executable instructions; and a processor, which can implement the method for card surface detection described in conjunction with FIG. 1 and FIG. 2 when executing the computer-executable instructions.
  • An embodiment of the present invention also provides a computer-readable storage medium on which computer program instructions are stored; and when the computer program instructions are executed by a processor, the method for card surface detection provided in the embodiments of the present invention is implemented.

Abstract

Method, apparatus, device and medium for card surface detection. The method comprises: determining a target picture to make the target picture cover a preset area of a card surface to be detected; detecting the Alpha channel values of the vertices of the preset area; and detecting whether the target picture completely covers on the preset area of the card surface to be detected based on the Alpha channel values of the vertices of the preset area. The card surface detection method, apparatus, device and medium provided according to the embodiments can automatically detect whether an uploaded pattern completely covers the entire card surface when a user customizes the card surface pattern, which does not need manual verification, and improves the efficiency and accuracy of card surface detection.

Description

[Title established by the ISA under Rule 37.2] METHOD, APPARATUS, DEVICE AND MEDIUM FOR CARD SURFACE DETECTION TECHNICAL FIELD
The present invention relates to the field of detection technology, in particular to a method, apparatus, device, and medium for card surface detection.
BACKGROUND
With the gradual increase of personalized items, users also prefer to customize some patterns on items to make items more distinctive.
For example, smart cards are widely used by users in daily life, but most smart cards belonging to the same category have the same style. For example, the style of each person's transportation card is the same in appearance, and the appearance of bank cards belonging to the same bank are the same for everyone, which makes it impossible to meet the personalization needs of users.
Therefore, in order to meet the personalization needs of users, users currently can customize the pattern of the card surface. However, when the user customizes the card surface pattern, due to the different sizes of the uploaded pictures, it will often cause that the appearance of the card made by a system based on the picture uploaded by the user is affected due to factors such as the position and size of the picture being displayed on the card surface, and the use of the card is also affected. For this reason, the uploaded pictures are often reviewed manually to ensure that users can get cards that meet the requirements. However, the efficiency of manual review is low, and it is impossible to make accurate judgments for some minor errors.
SUMMARY
The embodiment of the present invention provides a method, apparatus, device, and medium for card surface detection, which can automatically detect whether the uploaded pattern completely covers the entire card surface when the user customizes the card surface pattern, without manual verification, thereby improving the efficiency and accuracy of card surface detection.
In a first aspect, a method for card surface detection is provided, the method comprises:
obtaining the target picture to make the target picture cover a preset area of a card surface to be detected;
detecting Alpha channel values of the vertices of the preset area; and 
detecting whether the target picture completely covers the preset area of the card surface to be detected based on the Alpha channel values of the vertices of the preset area.
In the case that the target picture covers the preset area of the card surface to be detected, by detecting the Alpha channel values of the vertices of the preset area, it can be detected whether the target picture completely covers the preset area of the card surface to be detected, without manual verification, thus improving the efficiency and accuracy of card surface detection.
In some implementations of the first aspect, the method for card surface detection, before obtaining the target picture, further comprises:
setting initial Alpha channel values of the preset area of the card surface to be detected to 0%.
By setting the initial Alpha channel values of the preset area to 0%, the Alpha channel values of the preset area covered with the target picture can be clearly distinguished from the initial Alpha channel values, thereby improving the accuracy of the card surface detection.
In some implementation of the first aspect, based on the Alpha channel values of the vertices of the preset area, the detecting whether the target picture completely covers the preset area of the card surface to be detected comprises:
determining that the target picture does not completely cover the preset area of the card surface to be detected if the Alpha channel values of at least one vertices of the preset area have not changed.
By detecting that the Alpha channel values of at least one vertex of the preset area has not changed, it can be determined that the target picture does not completely cover the preset area of the card surface to be detected, which can reduce the calculation amount of the system and improve the detection efficiency of the system.
In some implementation of the first aspect, after detecting whether the target picture completely covers the preset area of the card surface to be detected, the method further comprises:
determining the vertex position where the Alpha channel value has not changed if the target picture does not completely cover the preset area of the card surface to be detected; and
generating an adjustment prompt message based on the vertex position where the Alpha channel value has not changed.
In the case that the target card does not completely cover the preset area of the card surface to be detected, it is also possible to generate adjustment prompt information based on the vertex position where the Alpha channel value has not changed, and provide adjustment suggestions for the user, which improves the user experience.
In some implementations of the first aspect, generating adjustment prompt information based on the vertex position where the Alpha channel value has not changed, comprises:
prompting that the target picture needs to be moved to the vertex position where the Alpha channel value has not changed, and/or that the target picture needs to be enlarged.
By providing users with specific adjustment prompt information, users can adjust pictures pertinently, which improves the user experience.
In some implementations of the first aspect, generating adjustment prompt information based on the vertex position where the Alpha channel value has not changed, comprises:
performing a flashing prompt at the vertex position where the Alpha channel value has not changed.
In some implementations of the first aspect, generating adjustment prompt information based on the vertex position where the Alpha channel value has not changed, comprises:
obtaining pixel values corresponding to a contrast color for the target picture according to a preset rule; and
performing a flashing prompt at the vertex position where the Alpha channel value has not changed by using the pixel values corresponding to the contrast color for the target picture;
wherein the preset rule comprises: among the multiple background colors included in the target picture, using a contrast color for the background color with the largest proportion, as the contrast color for the target picture.
By performing a flashing prompt at the vertex position where the Alpha channel value has not changed by using the pixel values corresponding to the contrast color for the target picture, the user is enabled to more intuitively know on which position of the preset area of the card surface to be detected the target picture does not cover at this time, so that the user can adjust the position of the target picture pertinently, which improves the user experience.
In a second aspect, an apparatus for card surface detection is provided, the apparatus comprises: an obtaining module configured to obtain a target picture to make the target picture cover a preset area of a card surface to be detected;
a first detection module, configured to detect the Alpha channel values of the vertices of the preset area; and
a second detection module, configured to detect whether the target picture completely covers the preset area of the card surface to be detected based on the Alpha channel values of the vertices of the preset area.
In a third aspect, a device for card surface detection is provided, the device comprising:
a processor and a memory storing computer program instructions thereon; and the processor implements the above method for card surface detection according to the embodiments of the present invention, when executing the computer program instructions.
In a fourth aspect, there provides a computer storage medium having stored thereon computer program instructions, which implement the method for card surface detection according to the above embodiment of the present invention when executed by a processor.
The method, apparatus, device and medium for card surface detection provided by the embodiments of the present invention can detect whether the target picture completely covers the preset area of the card surface to be detected by detecting the Alpha channel values of the vertices of the preset area when the target picture covers the preset area of the card surface to be detected, without any manual verification, which improves the efficiency and the accuracy of card surface detection.
BRIEF DESCRIPTION OF THE DRAWINGS
In order to explain the technical solutions of the embodiments of the present invention more clearly, the accompanying drawings needed in the embodiments of the present invention will be briefly introduced in the following. For those of ordinary skill in the art, without creative work, other drawings can be obtained from these drawings.
FIG. 1 shows a flowchart of a method for card surface detection according to an embodiment of the present invention;
FIG. 2 shows a schematic diagram of card surface detection according to an embodiment of the present invention;
FIG. 3 shows a schematic structural diagram of an apparatus for card surface detection according to an embodiment of the present invention; and
FIG. 4 shows a structural diagram of an exemplary hardware architecture of an embodiment of the present invention.
DETAILED DESCRIPTION
The features and exemplary embodiments of each aspect of the present invention will be described in detail below. In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail in the following with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention, and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by showing examples of the present invention.
It should be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or  operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise" , "include" or any other variation thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device that comprises a series of elements comprises not only those elements, but also other elements that are not explicitly listed, or also comprises elements inherent to such process, method, article or device. If there are no more restrictions, the elements defined by the sentence "including... " do not exclude the existence of other same elements in the process, method, article, or device including the elements.
In order to meet the needs of users for custom card patterns, a user is currently allowed to upload pictures, and the background picture of the card surface is drawn into a style of the picture uploaded by the user to meet the personalized need of the user.
However, when the user adjusts the coverage position of the uploaded picture on the card surface, since the small error cannot be recognized by human eyes, it can not guarantee that the adjusted uploaded picture can completely cover the card surface, which finally will affect the appearance of the card.
Therefore, the embodiments of the present invention provide a method, apparatus, device and medium for card surface detection, which can automatically detect whether the uploaded pattern completely covers the entire card surface when the user adjusts the coverage position of the uploaded picture in the preset area of the card surface, without manual verification, which improves the efficiency and the accuracy of card surface detection.
The method, apparatus, device and medium for card surface detection according to the embodiments of the present invention will be described with reference to the accompanying drawings. It should be noted that these embodiments are not intended to limit the scope of the disclosure of the present invention.
The method for card surface detection according to an embodiment of the present invention will be described in detail below with reference to FIG. 1.
In order to better understand the technical solution of the present invention, the method for card surface detection of the embodiment of the present invention will be described in detail below with reference to FIG. 1.
FIG. 1 is a flowchart showing a method for card surface detection according to an embodiment of the present invention. As shown in FIG. 1, the method for card surface detection in the embodiment of the present invention may comprise the following steps:
S101, obtaining a target picture to make the target picture cover a preset area of a card surface to be detected;
S102, detecting Alpha channel values of the vertices of the preset area; and
S103, detecting whether the target picture completely covers the preset area of the card surface to be detected, based on the Alpha channel values of the vertices of the preset area.
Herein, it should be understood that the Alpha channel represents an opaque parameter. When the Alpha channel values is 0%, it means completely transparency, and when the Alpha channel values are 100%, it means completely opaque.
In the embodiment of the present invention, after obtaining the target picture uploaded by the user, the terminal device may display the target picture in the preset area of the card surface to be detected. Herein, the size of the preset area of the card surface to be detected may be an area consistent with the size of the card to be detected.
In view of the fact that the Alpha channel values of the vertices of the preset area will change when the target picture covers the preset area of the card  surface to be detected, therefore, it can be judged whether the target picture completely covers the preset area of the card surface to be detected by only detecting the Alpha channel values of the vertices of the preset area, and by judging whether an Alpha channel value of a vertex of the preset area changes. By using the card surface detection method of the embodiment of the present invention, the system needs a small amount of calculation, thereby improving the system detection efficiency.
In an embodiment of the present invention, the method for the card surface detection, before obtaining the target picture, further comprises: setting initial Alpha channel values of the preset area of the card surface to be detected to 0%. For example, the preset area of the card surface to be detected can be set to colorless and transparent RGBA (0, 0, 0, 0) .
In the embodiment of the present invention, by setting the initial Alpha channel values of the preset area of the card surface to be detected to 0%, the Alpha channel values covered with the target picture can be clearly distinguished from the initial Alpha channel values, which makes it convenient for the terminal device to detect the Alpha channel values of the preset area and improves the efficiency for the terminal device to detect the Alpha channel values of the preset area, and improves the accuracy of the card surface detection.
In an embodiment of the present invention, the preset area of the card surface to be detected has initial Alpha channel values. If the target picture completely covers the preset area, it will be detected that the Alpha channel values of all vertices of the preset area changes, and are no longer the initial Alpha channel values of the preset area. However, if it is detected that the Alpha channel value of at least one vertex of the preset area has not changed and is still the initial Alpha channel value, it can be considered that the target picture does not completely cover the preset area of the card surface to be detected.
For example, if the preset area is rectangle, the initial Alpha channel values of the preset area are 0%, and the Alpha channel value of the vertex at the upper left corner of the preset area of the card surface to be detected is still 0%, then it is determined that the Alpha channel value at the vertex of the upper left corner of the preset area of the card surface to be detected has not changed, and it can be considered that the target picture does not cover the vertex of the upper left corner of the preset area, so it can be judged that the target picture does not completely covers the preset area of the card surface to be detected.
In the embodiment of the present invention, by detecting the Alpha channel values at the vertices of the card surface to be detected, it can be judged whether the target picture completely covers the preset area of the card surface to be detected, the calculation amount is small, and the detection efficiency is high.
In an embodiment of the present invention, after detecting whether the target picture completely covers the preset area of the card surface to be detected, if it is known that the target picture does not completely cover the preset area of the card surface to be detected, the vertex position where the Alpha channel value has not changed can be further determined. For example, it is known that the vertex position where the Alpha channel value has not changed is at the upper left corner of the preset area. Based on the determined vertex position where the Alpha channel value has not changed, an adjustment prompt message is generated.
As an example, as shown in FIG. 2, FIG. 2 shows a schematic diagram of card surface detection according to an embodiment of the present invention. In FIG. 2, the initial Alpha channel values of the preset area are 0%, and the gray area is the display area of the target picture in the preset area. By detecting the Alpha channel values at the vertices of the preset area, it is obtained that there still exists vertices of which the Alpha channel values are 0% (vertices of which the Alpha channel values  have not changed) in the preset area, then it can be determined that the target picture does not completely covers the preset area of the card surface to be detected.
Next, the positions of the vertices of which the Alpha channel values are 0%can be further determined. When it is determined that the positions of the vertices of which the Alpha channel values are 0%are vertex 1 (upper left corner) and vertex 4 (lower left corner) of the preset area, an adjustment prompt message can be generated. Wherein, the adjustment information can be adjustment prompt by way of flashing at the positions of  vertices  1 and 4, or can be displaying adjustment prompt information by generating an information pop-up window.
In the embodiment of the present invention, the adjustment prompt information is generated based on the vertex positions where the Alpha channel values have not changed when the target card does not completely cover the preset area of the card surface to be detected, which can provide the user with adjustment suggestions, thereby improving the user experience.
In an embodiment of the present invention, based on the vertex positions where the Alpha channel values have not changed, it may be prompted the user that the target picture needs to be moved to the vertex positions where the Alpha channel values have not changed, and/or that the target picture needs to be enlarged.
For example, continue to refer to FIG. 2, continue to take the initial Alpha channel values of 0%in the preset area as an example, when it is determined that the vertex positions with the Alpha channel values of 0%are the vertex 1 (upper left corner) and vertex 4 (lower left corner) of the preset area, the user can be prompted with the adjustment prompt message "The target picture needs to be moved to the upper left corner of the preset area" , or the user is prompted with the adjustment prompt message of "The target picture needs to be moved to the lower left corner of the preset area" , the user can also be prompted with the adjustment prompt message "The target picture needs to be enlarged. " The user can independently choose the  adjustment method according to the adjustment prompt information. For example, in the case shown in FIG. 2, the user only needs to choose to adjust by moving the target picture, without the need to enlarge the target picture.
In addition, the terminal can directly prompt the user to move to a certain direction of the preset area when it determines the vertex positions with the Alpha channel values of 0%are on the same side of the preset area. For example, when the positions of the vertices with an Alpha channel values of 0%are the upper left corner and the lower left corner of the preset area, the system determines that the two vertices are located on the left side of the preset display area, and it can prompt the user with an adjustment prompt identification of "The target picture needs to be moved to the left side of the preset area.
In the embodiment of the present invention, by determining the vertex positions where the Alpha channel values have not changed, and providing the user with specific adjustment prompt information, the user can adjust the picture pertinently, thereby improving the user experience.
In an embodiment of the present invention, a flashing prompt may also be performed at the vertex position where the Alpha channel value has not changed.
For example, when it is determined that the positions of the vertices where the Alpha channel values have not changed are vertex 1 (upper left corner) of the preset area and vertex 4 (lower left corner) of the preset area, flashing may be performed at the locations of vertex 1 and vertex 4 by identifying of shapes such as rectangle and circle to remind the user of the uncovered position of the target picture in the preset area.
In an embodiment of the present invention, it is also possible to obtain the pixel values corresponding to the contrast color for the target picture according to a preset rule, and use the pixel values corresponding to the contrast color for the target picture to flash at the vertex position where the Alpha channel values have not  changed. Herein, the preset rule may be that among the multiple background colors included in the target picture, the contrast color for the background color with the largest proportion is used as the contrast color for the target picture.
For example, the multiple background colors included in the target picture are red, blue, and green. Among them, red occupies 60%of the background color of the target picture, which occupies the largest proportion, so the contrast color of red, that is cyan, is selected as the contrast color for the target picture. Next, flashing with cyan may be performed at the top left corner vertex of the preset area (the vertex of which the Alpha channel value has not changed) .
In the embodiment of the present invention, by performing a flashing prompt at the vertex position where the Alpha channel value has not changed using the pixel values corresponding to the contrast color for the target picture, the user can more intuitively know on which position the target picture does not cover on the preset area of the card to be detected at this time, so that the user can adjust the position of the target picture pertinently, thereby improving the user experience.
Based on the specific implementation of the card surface detection method provided in the foregoing embodiment, correspondingly, this application also provides a specific implementation of the device for card surface detection. See FIG. 3.
The device for card surface detection according to the embodiment of the present invention will be described in detail below with reference to FIG. 3. The device for card surface detection corresponds to the card surface detection method.
Fig. 3 shows a schematic structural diagram of a device for card surface detection according to an embodiment of the present invention.
As shown in FIG. 3, the device for card surface detection comprises: an obtaining module 310 configured to obtain a target picture to make the target picture cover the preset area of a card surface to be detected. a detection module 320 configured to detect the Alpha channel values of the vertices of the preset area, and detect whether the target picture completely covers the preset area of the card surface to be detected based on the Alpha channel values of the vertices of the preset area.
In the embodiment of the present invention, through the device for card surface detection, after obtaining the target picture uploaded by the user, the terminal device only needs to detect the Alpha channel values of the vertices of the preset area, and by judging the Alpha channel values of the vertices of the preset area, to judge whether the target picture completely covers the preset area of the card surface to be detected. There is no need for manual verification, and there are a small amount of calculations for a system, which can improve the efficiency of system detection.
In an embodiment of the present invention, the device for detecting card surface further comprises:
a setting module configured to set initial Alpha channel values of the preset area of the card surface to be detected to 0%before obtaining the target picture.
In the embodiment of the present invention, by setting the initial Alpha channel values of the preset area of the card surface to be detected to 0%, the Alpha channel values of the preset area covered by the target picture can be clearly distinguished from the initial Alpha channel values, thereby improving the accuracy of card surface detection.
In an embodiment of the present invention, the detection module is further configured to determine that the target picture does not completely cover the preset area of the card surface to be detected, if an Alpha channel value of at least one vertex of the preset area has not changed.
In the embodiment of the present invention, it can be determined whether the target picture completely covers the preset area of the card surface to be detected,  by detecting the Alpha channel values of the vertices of the card surface to be detected, the calculation amount is small, and the detection efficiency is high.
In an embodiment of the present invention, the obtaining module 310 further comprises:
a determining module configured to determine the vertex position where the Alpha channel value has not changed if the target picture does not completely cover the preset area of the card surface to be detected.
A generation sub-module is configured to generate adjustment prompt information based on the vertex position where the Alpha channel value has not changed.
In the embodiment of the present invention, the adjustment prompt information is generated based on the vertex position where the Alpha channel value has not changed when the target card does not completely cover the preset area of the card surface to be detected, which can provide the user with adjustment suggestions, thereby improving the user experience.
In an embodiment of the present invention, a generating submodule is specifically configured to:
prompt that the target picture needs to be moved to the vertex position where the Alpha channel value has not changed, and/or that the target picture needs to be enlarged.
In the embodiment of the present invention, by determining the vertex position where the Alpha channel value has not changed, and providing the user with specific adjustment prompt information, the user can adjust the picture pertinently, thereby improving the user experience.
In an embodiment of the present invention, the generating submodule is further configured to: perform a flashing prompt at the vertex position where the Alpha channel value has not changed.
In an embodiment of the present invention, the generating sub-module is specifically configured to:
obtain the pixel values corresponding to the contrast color for the target picture according to preset rules; and
perform a flashing prompt at the vertex position where the Alpha channel value has not changed using the pixel values corresponding to the contrast color for the target picture; herein, the preset rule comprises: among the multiple background colors included in the target picture, the contrast color for the background color that occupies the largest proportion is used as the contrast color for the target picture.
In the embodiment of the present invention, by performing a flashing prompt at the vertex position where the Alpha channel value has not changed using the pixel values corresponding to the contrast color for the target picture, the user can more intuitively know on which position the target picture does not cover on the preset area of the card to be detected at this time, so that the user can adjust the position of the target picture pertinently, thereby improving the user experience.
Each module of the device for card surface detection provided by the embodiment of the present invention has the function of implementing the method/steps of the card surface detection of the embodiments shown in FIGs. 1 to 2, and can achieve the technical effect corresponding to the embodiment shown in FIGs. 1 to 2, and the details thereof are omitted for the sake of description simplicity.
FIG. 4 shows a structural diagram of an exemplary hardware architecture of a computing device capable of implementing the method and device for card surface detection according to the embodiments of the present invention.
As shown in FIG. 4, the computing device 400 comprises an input device 401, an input interface 402, a central processor 403, a memory 404, an output  interface 405, and an output device 406. The input interface 402, the central processor 403, the memory 404, and the output interface 405 are connected to each other through a bus 410, and the input device 401 and the output device 406 are respectively connected to the bus 410 through the input interface 402 and the output interface 405, and then connected to the other components of the computing device 400.
Specifically, the input device 401 receives input information from the outside, and transmits the input information to the central processor 403 through the input interface 402; the central processor 403 processes the input information based on the computer executable instructions stored in the memory 404 to generate output information, stores the output information in the memory 404 temporarily or permanently, and then transmits the output information to the output device 406 through the output interface 405; and the output device 406 outputs the output information to the outside of the computing device 400 for use by the user.
In other words, the computing device 400 shown in FIG. 4 may also be implemented as a device for card surface detection, which may comprise: a memory having stored thereon computer executable instructions; and a processor, which can implement the method for card surface detection described in conjunction with FIG. 1 and FIG. 2 when executing the computer-executable instructions.
An embodiment of the present invention also provides a computer-readable storage medium on which computer program instructions are stored; and when the computer program instructions are executed by a processor, the method for card surface detection provided in the embodiments of the present invention is implemented.
It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the drawings. For brevity, a detailed description of the known method is omitted here. In the above  embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order of the steps after understanding the spirit of the present invention. The functional blocks shown in the above-mentioned structural block diagram may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC) , appropriate firmware, a plug-in, a function card, and so on. When implemented in software, the elements of the present invention are programs or code segments used to perform required tasks. The programs or code segments may be stored in a machine-readable medium, or transmitted on a transmission medium or communication link through a data signal carried in a carrier wave. "Machine-readable medium" may include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs) , floppy disks, CD-ROMs, optical disks, hard disks, fiber optic medium, radio frequency (RF) links, and so on. The code segments can be downloaded via a computer network such as the Internet, an intranet, etc.
The present invention can be implemented in other specific forms without departing from its spirit and essential characteristics. For example, the algorithm described in a specific embodiment can be modified, and the device architecture does not deviate from the basic spirit of the present invention. Therefore, the current embodiments are regarded as illustrative rather than restrictive in all aspects, and the scope of the present invention is defined by the appended claims rather than the foregoing description, and all changes falling within the meaning and equivalents of the claims are thus included in the scope of the present invention.

Claims (10)

  1. A method for card surface detection, comprising:
    obtaining a target picture to make the target picture cover a preset area of a card surface to be detected;
    detecting Alpha channel values of vertices of the preset area; and
    detecting whether the target picture completely covers the preset area of the card surface to be detected based on the Alpha channel values of the vertices of the preset area.
  2. The method for card surface detection according to claim 1, wherein the detecting whether the target picture completely covers the preset area of the card surface to be detected based on the Alpha channel values of the vertices of the preset area comprises:
    determining that the target picture does not completely cover the preset area of the card surface to be detected if the Alpha channel value of at least one vertex of the preset area has not changed.
  3. The method for card surface detection according to claim 1 or 2, wherein after detecting whether the target picture completely covers the preset area of the card surface to be detected, the method further comprises:
    determining a vertex position where Alpha channel value has not changed if the target picture does not completely covers the preset area of the card surface to be detected; and
    generating an adjustment prompt information based on the vertex position where the Alpha channel value has not changed.
  4. The method for card surface detection according to claim 3, wherein the generating an adjustment prompt information based on the vertex position where the Alpha channel value has not changed comprises:
    prompting that the target picture needs to be moved to the vertex position  where the Alpha channel value has not changed, and/or that the target picture needs to be enlarged.
  5. The method for card surface detection according to claim 3, wherein the generating an adjustment prompt information based on the vertex position where the Alpha channel value has not changed comprises:
    performing a flashing prompt at the vertex position where the Alpha channel value has not changed.
  6. The method for card surface detection according to claim 5, wherein the performing the flashing prompt at the vertex position where the Alpha channel value has not changed comprises:
    obtaining pixel values corresponding to a contrast color for the target image according to a preset rule; and
    performing a flashing prompt at the vertex position where the Alpha channel value has not changed using the pixel values corresponding to the contrast color for the target picture;
    wherein, the preset rule includes: among multiple background colors included in the target picture, using a contrast color for the background color with a largest proportion as the contrast color for the target image.
  7. The method for card surface detection according to claim 1, wherein before obtaining the target picture, the method further comprises:
    setting initial Alpha channel values of the preset area of the card surface to be detected to 0%.
  8. An apparatus for card surface detection, comprising:
    an obtaining module configured to obtain a target picture to make the target picture cover a preset area of a card surface to be detected;
    a first detection module configured to detect Alpha channel values of the vertices of the preset area; and
    a second detection module configured to detect whether the target picture completely covers the preset area of the card surface to be detected based on the Alpha channel values of the vertices of the preset area.
  9. A device for card surface detection, wherein the device comprises: a processor and a memory having stored computer program instructions; and
    the processor implements a method for card surface detection according to any one of claims 1-7 when executing the computer program instructions.
  10. A computer storage medium, wherein the computer storage medium has stored thereon computer program instructions, which, when executed by a processor, implements a method for card surface detection according to any one of claims 1-7.
PCT/CN2020/133562 2019-12-03 2020-12-03 Method, apparatus, device and medium for card surface detection WO2021110089A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911217528.3 2019-12-03
CN201911217528.3A CN110674818B (en) 2019-12-03 2019-12-03 Card surface detection method, device, equipment and medium

Publications (1)

Publication Number Publication Date
WO2021110089A1 true WO2021110089A1 (en) 2021-06-10

Family

ID=69088323

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/133562 WO2021110089A1 (en) 2019-12-03 2020-12-03 Method, apparatus, device and medium for card surface detection

Country Status (2)

Country Link
CN (1) CN110674818B (en)
WO (1) WO2021110089A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110674818B (en) * 2019-12-03 2020-04-24 捷德(中国)信息科技有限公司 Card surface detection method, device, equipment and medium
CN112801165B (en) * 2021-01-22 2024-03-22 中国银联股份有限公司 Card auditing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216924A (en) * 2008-01-11 2008-07-09 北京盈天信科技发展有限公司 A system and method to generate individualized bank cards
US8628008B1 (en) * 2008-10-16 2014-01-14 Wells Fargo Bank, N.A. System and method for card customization
CN108510036A (en) * 2018-03-27 2018-09-07 武汉天喻信息产业股份有限公司 A kind of card face image generating method based on parametrization
CN110674818A (en) * 2019-12-03 2020-01-10 捷德(中国)信息科技有限公司 Card surface detection method, device, equipment and medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1889732A1 (en) * 2006-08-18 2008-02-20 Setec Oy Method of superimposing an image onto another, method of personalizing a data carrier using the the method
US8416262B2 (en) * 2009-09-16 2013-04-09 Research In Motion Limited Methods and devices for displaying an overlay on a device display screen
DE102010030616A1 (en) * 2010-06-28 2011-12-29 Robert Bosch Gmbh Method and device for detecting a disturbing object in a camera image
US10250838B1 (en) * 2017-12-29 2019-04-02 Sling Media L.L.C. System and method for converting live action alpha-numeric text to re-rendered and embedded pixel information for video overlay
CN108564155A (en) * 2018-04-23 2018-09-21 捷德(中国)信息科技有限公司 Smart card method for customizing, device and server
CN109359644A (en) * 2018-08-28 2019-02-19 东软集团股份有限公司 Character image uniformity comparison method, apparatus, storage medium and electronic equipment
CN109275016B (en) * 2018-09-30 2021-11-16 联想(北京)有限公司 Display control method and display control apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216924A (en) * 2008-01-11 2008-07-09 北京盈天信科技发展有限公司 A system and method to generate individualized bank cards
US8628008B1 (en) * 2008-10-16 2014-01-14 Wells Fargo Bank, N.A. System and method for card customization
CN108510036A (en) * 2018-03-27 2018-09-07 武汉天喻信息产业股份有限公司 A kind of card face image generating method based on parametrization
CN110674818A (en) * 2019-12-03 2020-01-10 捷德(中国)信息科技有限公司 Card surface detection method, device, equipment and medium

Also Published As

Publication number Publication date
CN110674818A (en) 2020-01-10
CN110674818B (en) 2020-04-24

Similar Documents

Publication Publication Date Title
US20200334793A1 (en) Method and device for blurring image background, storage medium and electronic apparatus
WO2021110089A1 (en) Method, apparatus, device and medium for card surface detection
CN109977949A (en) Text positioning method, device, computer equipment and the storage medium of frame fine tuning
US20100201709A1 (en) Image display method and apparatus
US20200051225A1 (en) Fast Fourier Color Constancy
CN104412299A (en) Image processing device and recording medium
JP2000134486A (en) Image processing unit, image processing method and storage medium
CN107179889A (en) Interface color conditioning method, webpage color conditioning method and device
CN105489192A (en) Display with image automatic optimization function and image adjusting method thereof
JP2008252680A (en) Program for portable terminal device, and the portable terminal device
WO2021110090A1 (en) Method, apparatus, device and storage medium for detecting card surface picture
CN109729281A (en) Image processing method, device, storage medium and terminal
CN109614192A (en) Page brightness display methods and device
US20220180122A1 (en) Method for generating a plurality of sets of training image data for training machine learning model
JP2015075920A (en) Image processing apparatus, image processing method, and program
KR101842535B1 (en) Method for the optical detection of symbols
CN113920912B (en) Display attribute adjusting method and related equipment
CN111311500A (en) Method and device for carrying out color restoration on image
CN110880164A (en) Image processing method, device and equipment and computer storage medium
CN109766063A (en) A kind of nail beauty machine printing calibration method, device, nail beauty machine and storage medium
CN112051920B (en) Sight line falling point determining method and device
CN112504442B (en) Parameter determination method, device, equipment and storage medium
CN108053436B (en) Picture processing method and device, electronic equipment and picture server
CN103577791A (en) Red-eye detection method and system
CN113343965A (en) Image tilt correction method, apparatus and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20896125

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20896125

Country of ref document: EP

Kind code of ref document: A1