Methods for determining the position of DIP switches, related devices, and computer storage media
By determining the optimal position of the DIP switch on the bank card to match the card image, the problem of the DIP switch affecting the appearance was solved, improving customer experience and card sales.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BANK OF CHINA
- Filing Date
- 2022-08-02
- Publication Date
- 2026-07-31
AI Technical Summary
DIP switches affect the appearance of bank cards, impact customer experience, and reduce card sales.
By acquiring bank card image information, matching pixel color and position coordinates, and combining the color and size range of the DIP switch, the optimal position of the switch on the card is determined to ensure it matches the card image.
This improves the integration of the DIP switch with the card image, enhancing the customer experience and increasing card sales.
Smart Images

Figure CN115249154B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method for determining the position of a DIP switch, related devices, and computer storage media. Background Technology
[0002] Currently, in order to improve customer experience, banks use DIP switches to enable a single bank card to perform multiple business functions. While this method improves customer experience and saves costs, the presence of DIP switches affects the overall appearance of the card and thus impacts the customer experience. Summary of the Invention
[0003] In view of this, this application provides a method for determining the position of a DIP switch, a related device, and a computer storage medium, which can integrate the DIP switch with the card image and color to improve customer experience and thus increase card sales.
[0004] The first aspect of this application provides a method for determining the position of a DIP switch, including:
[0005] Obtain the image information that will be printed on the bank card;
[0006] The image information is matched with the size of the bank card to obtain the pixel color and pixel position coordinates of the image on the bank card;
[0007] Obtain the color and selectable size range of the DIP switch; wherein, the selectable size range refers to the number of pixels occupied by the DIP switch and the shape of the occupied pixels;
[0008] Based on the pixel color and position coordinates of each image on the bank card, and the color and selectable size range of the DIP switch, the size of the target DIP switch and its position on the bank card surface are determined.
[0009] Optionally, determining the size of the target DIP switch and its position on the bank card surface based on the pixel color and position coordinates of each image on the bank card, and the color and selectable size range of the DIP switch, includes:
[0010] The pixels of the image on the bank card are analyzed by traversal to determine whether there are two pixel regions that can cover the size of the switch pixels, and the pixel color in the two pixel regions is consistent with the DIP switch.
[0011] If two pixel regions can cover the size of the switch pixel, and the pixel color in the two pixel regions is the same as that of the DIP switch, then the DIP switch is placed in the two pixel regions to obtain the size and coordinates of the DIP switch.
[0012] If two pixel regions can cover the size of the switch pixels, but the pixel colors in the two pixel regions are inconsistent with the DIP switch, then it is determined whether there are regions whose colors are inconsistent with the DIP switch, but whose shapes are consistent with the DIP switch.
[0013] If it is determined that the color of a region is inconsistent with the DIP switch, but the shape is consistent with the DIP switch, determine whether there is a DIP switch whose size meets the span requirement of the two pixel regions.
[0014] If it is determined that the size of a DIP switch meets the span requirement of the two pixel areas, then the DIP switch is placed in the corresponding position.
[0015] If it is determined that the size of a DIP switch only meets the span requirement of a single pixel area, then another area with the same color as the DIP switch is selected.
[0016] Optionally, the method for determining the position of the DIP switch further includes:
[0017] If the image on the bank card does not match the shape and color of the DIP switch, then the area with the largest connected area of the same color in the image on the bank card should be selected as the target location.
[0018] The center position of the target location is set as the DIP switch position, and the smallest DIP switch is selected as the switch for this operation.
[0019] Optionally, the method for determining the position of the DIP switch further includes:
[0020] The size of the target DIP switch and its position on the bank card are uploaded to the bank's back-end system. During the card manufacturing process, the bank finds the corresponding coordinates on the bank card based on the data in the back-end system, manufactures an interface according to the size of the DIP switch, and then directly installs the switch after manufacturing.
[0021] A second aspect of this application provides a device for determining the position of a DIP switch, comprising:
[0022] The first acquisition unit is used to acquire the image information that will be printed on the bank card.
[0023] The matching unit is used to match the image information with the size of the bank card to obtain the pixel color and pixel position coordinates of the image on the bank card.
[0024] The second acquisition unit is used to acquire the color and selectable size range of the DIP switch; wherein, the selectable size range is the number of pixels occupied by the size of the DIP switch and the shape of the occupied pixels;
[0025] The determining unit is used to determine the size of the target DIP switch and its position on the bank card surface based on the pixel color and position coordinates of each image on the bank card, and the color and selectable size range of the DIP switch.
[0026] Optionally, the determining unit includes:
[0027] The analysis unit is used to determine whether there are two pixel regions that can cover the size of the switch pixel by traversing and analyzing the pixels of the image on the bank card, and the pixel color in the two pixel regions is consistent with the DIP switch.
[0028] The first determining subunit is used to determine that if there are two pixel regions that can cover the size of the switch pixel, and the pixel color in the two pixel regions is consistent with the DIP switch, then the DIP switch is placed in the two pixel regions to obtain the size and coordinates of the DIP switch.
[0029] The first judgment unit is used to determine whether there is a region whose color is inconsistent with the DIP switch but whose shape is consistent with the DIP switch if there are two pixel regions that can cover the size of the switch pixels, but the pixel color in the two pixel regions is inconsistent with the DIP switch.
[0030] The second judgment unit is used to determine whether there is a DIP switch whose size meets the span requirement of the two pixel areas if the judgment unit determines that there is an area whose color is inconsistent with the DIP switch but whose shape is consistent with the DIP switch.
[0031] The second determining subunit is used to determine that if the second determining unit determines that there is a DIP switch whose size meets the span requirement of the two pixel point regions, then the DIP switch is placed in the corresponding position.
[0032] The second determining subunit is further configured to select another region with the same color as the DIP switch if the second determining unit determines that the size of a DIP switch only meets the span requirement of a single pixel area.
[0033] Optionally, the DIP switch position determination device further includes:
[0034] The first selection unit is used to select the area with the largest connected area of the same color in the image on the bank card as the target location if the shape and color of the image on the bank card are inconsistent with those of the DIP switch.
[0035] The second selection unit is used to select the center position of the target location as the DIP switch position, and select the smallest DIP switch as the current switch.
[0036] Optionally, the DIP switch position determination device further includes:
[0037] The uploading unit is used to upload the size of the target DIP switch and its position on the bank card surface to the bank's back-end system. During the card manufacturing process, the bank finds the corresponding coordinates on the bank card surface based on the data in the bank's back-end system, manufactures the interface according to the size of the DIP switch, and then directly installs the switch after manufacturing is completed.
[0038] A third aspect of this application provides an electronic device, comprising:
[0039] One or more processors;
[0040] A storage device on which one or more programs are stored;
[0041] When the one or more programs are executed by the one or more processors, the one or more processors implement the position determination method of the DIP switch as described in any one of the first aspects.
[0042] The fourth aspect of this application provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for determining the position of a DIP switch as described in any one of the first aspects.
[0043] As can be seen from the above solutions, this application provides a method, related device, and computer storage medium for determining the position of a DIP switch. The method for determining the position of the DIP switch includes: first, acquiring image information to be printed on the bank card surface; then, matching the image information with the bank card size to obtain the pixel color and pixel position coordinates of the image on the bank card; next, acquiring the color and selectable size range of the DIP switch; wherein, the selectable size range refers to the number of pixels occupied by the DIP switch and the shape of the occupied pixels; finally, based on the pixel color and pixel position coordinates of each image on the bank card, and the color and selectable size range of the DIP switch, determining the size of the target DIP switch and its position on the bank card surface. This allows the DIP switch to be integrated with the card image and color, thereby improving customer experience and increasing card sales. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0045] Figure 1A detailed flowchart of a method for determining the position of a DIP switch provided in an embodiment of this application;
[0046] Figure 2 A flowchart illustrating a method for determining the position of a DIP switch, as provided in another embodiment of this application;
[0047] Figure 3 A flowchart illustrating a method for determining the position of a DIP switch, as provided in another embodiment of this application;
[0048] Figure 4 A schematic diagram of a DIP switch position determination device provided in another embodiment of this application;
[0049] Figure 5 This is a schematic diagram of an electronic device that implements a method for determining the position of a DIP switch, according to another embodiment of this application. Detailed Implementation
[0050] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0051] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0052] It should be noted that the concepts of "first" and "second" mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0053] It should be noted that the terms "a" and "a plurality of" used in this application are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0054] This application provides a method for determining the position of a DIP switch, such as... Figure 1 As shown, the specific steps include:
[0055] S101. Obtain the image information that will be printed on the bank card.
[0056] In the actual implementation of this application, the image information to be printed on the bank card can be obtained through, but is not limited to, the bank's back-end system, and users can upload and customize the bank card face, etc., which are not limited here.
[0057] S102. Match the image information with the size of the bank card to obtain the pixel color and pixel position coordinates of the image on the bank card.
[0058] S103, Obtain the color and selectable size range of the DIP switch.
[0059] The selectable size range includes the number of pixels occupied by the DIP switch and the shape of the occupied pixels.
[0060] S104. Based on the pixel color and pixel position coordinates of each image on the bank card, and the color and selectable size range of the DIP switch, determine the size of the target DIP switch and its position on the bank card surface.
[0061] Optionally, in another embodiment of this application, one implementation of step S104 is as follows: Figure 2 As shown, it includes:
[0062] S201. By traversing and analyzing the pixels of the image on the bank card, determine whether there are two pixel regions that can cover the size of the switch pixels, and the pixel colors in the two pixel regions are consistent with the DIP switch.
[0063] S202. If there are two pixel regions that can cover the size of the switch pixel, and the pixel color in the two pixel regions is the same as that of the DIP switch, then determine to place the DIP switch in the two pixel regions, and obtain the size and coordinates of the DIP switch.
[0064] The two pixel areas correspond to the two states of the DIP switch, namely open and closed.
[0065] S203. If there are two pixel areas that can cover the size of the switch pixels, but the pixel colors in the two pixel areas are inconsistent with the DIP switch, then determine whether there are areas whose colors are inconsistent with the DIP switch, but whose shapes are consistent with the DIP switch.
[0066] Specifically, if it is determined that there is an area whose color is inconsistent with the DIP switch, but whose shape is consistent with the DIP switch, then step S204 is executed.
[0067] S204. Determine if there is a DIP switch whose size meets the span requirement of two pixel areas.
[0068] Specifically, if it is determined that the size of a DIP switch meets the requirement of spanning two pixel areas, then step S205 is executed; if it is determined that the size of a DIP switch only meets the requirement of spanning one pixel area, then step S206 is executed.
[0069] S205. Confirm that the DIP switch is placed in the corresponding position.
[0070] S206. Select another area that matches the color of the DIP switch.
[0071] Optionally, in another embodiment of this application, one implementation of the method for determining the position of the DIP switch is as follows: Figure 3 As shown, it also includes:
[0072] S301. If the image on the bank card is inconsistent in shape and color with the DIP switch, the area with the largest connected area of the same color in the image on the bank card should be selected as the target location.
[0073] S302. Set the center position of the target location as the DIP switch position, and select the smallest DIP switch as the switch for this operation.
[0074] In the specific implementation of this application, if none of the above conditions are met, the position where the edge of the card image is closest to the color of the DIP switch is selected as the position for placing the DIP switch, and the smallest DIP switch is also selected.
[0075] Optionally, in another embodiment of this application, one implementation of the DIP switch position determination method further includes:
[0076] The size of the target DIP switch and its position on the bank card are uploaded to the bank's back-end system.
[0077] During the card manufacturing process, the bank finds the corresponding coordinates on the card surface based on the data in the bank's back-end system, manufactures an interface according to the size of the DIP switch, and then directly installs the switch after manufacturing is complete.
[0078] As can be seen from the above solution, this application provides a method for determining the position of a DIP switch: First, obtain the image information to be printed on the bank card; then, match the image information with the size of the bank card to obtain the pixel color and pixel position coordinates of the image on the bank card; next, obtain the color and selectable size range of the DIP switch; wherein, the selectable size range refers to the number of pixels occupied by the DIP switch and the shape of the occupied pixels; finally, based on the pixel color and pixel position coordinates of each image on the bank card, and the color and selectable size range of the DIP switch, determine the size of the target DIP switch and its position on the bank card. This allows the DIP switch to be integrated with the card image and color, thereby improving customer experience and increasing card sales.
[0079] The invention title provided by this invention can be used in the financial field or other fields, for example, in bank card production scenarios. Other fields refer to any field other than finance, such as data processing. The above are merely examples and do not limit the application areas of the invention title provided by this invention.
[0080] Another embodiment of this application provides a device for determining the position of a DIP switch, such as... Figure 4 As shown, it specifically includes:
[0081] The first acquisition unit 401 is used to acquire image information that will be printed on the face of the bank card.
[0082] The matching unit 402 is used to match the image information with the size of the bank card to obtain the pixel color and pixel position coordinates of the image on the bank card.
[0083] The second acquisition unit 403 is used to acquire the color and selectable size range of the DIP switch.
[0084] The selectable size range includes the number of pixels occupied by the DIP switch and the shape of the occupied pixels.
[0085] The determining unit 404 is used to determine the size of the target DIP switch and the position of the target DIP switch on the bank card surface based on the pixel color and pixel position coordinates of each image on the bank card, and the color and selectable size range of the DIP switch.
[0086] For details on the specific working process of the units disclosed in the above embodiments of this application, please refer to the corresponding method embodiments, such as... Figure 1 As shown, it will not be elaborated further here.
[0087] Optionally, in another embodiment of this application, one implementation of the determining unit 404 includes:
[0088] The analysis unit is used to traverse and analyze the pixels of the image on the bank card to determine whether there are two pixel regions that can cover the size of the switch pixels, and the pixel colors in the two pixel regions are consistent with the DIP switch.
[0089] The first determining subunit is used to determine that if there are two pixel regions that can cover the size of the switch pixel, and the pixel color in the two pixel regions is the same as that of the DIP switch, then the DIP switch will be placed in the two pixel regions to obtain the size and coordinates of the DIP switch.
[0090] The first judgment unit is used to determine whether there is a region whose color is inconsistent with the DIP switch but whose shape is consistent with the DIP switch if there are two pixel regions that can cover the size of the switch pixels, but the pixel color in the two pixel regions is inconsistent with the DIP switch.
[0091] The second judgment unit is used to determine whether there is a DIP switch whose size meets the span requirement of two pixel areas if the judgment unit determines that there is an area whose color is inconsistent with the DIP switch, but whose shape is consistent with the DIP switch.
[0092] The second determining subunit is used to determine to place the DIP switch in the corresponding position if the second determining unit determines that the size of a DIP switch meets the span requirement of two pixel regions.
[0093] The second determining subunit is also used to select another area with the same color as the DIP switch if the second determining unit determines that the size of the DIP switch only meets the span requirement of a one-pixel area.
[0094] For details on the specific working process of the units disclosed in the above embodiments of this application, please refer to the corresponding method embodiments, such as... Figure 2 As shown, it will not be elaborated further here.
[0095] Optionally, in another embodiment of this application, one implementation of the DIP switch position determination device further includes:
[0096] The first selection unit is used to select the largest connected area of the same color in the image on the bank card as the target location if the image on the bank card is inconsistent in shape and color with the DIP switch.
[0097] The second selection unit is used to set the center position of the target location as the DIP switch position, and select the smallest DIP switch as the current switch.
[0098] For details on the specific working process of the units disclosed in the above embodiments of this application, please refer to the corresponding method embodiments, such as... Figure 3 As shown, it will not be elaborated further here.
[0099] Optionally, in another embodiment of this application, one implementation of the DIP switch position determination device further includes:
[0100] The upload unit is used to upload the size of the target DIP switch and its position on the bank card to the bank's back-end system.
[0101] During the card manufacturing process, the bank finds the corresponding coordinates on the card surface based on the data in the bank's back-end system, manufactures an interface according to the size of the DIP switch, and then directly installs the switch after manufacturing is complete.
[0102] For details on the specific working process of the units disclosed in the above embodiments of this application, please refer to the corresponding method embodiments, which will not be repeated here.
[0103] As can be seen from the above solution, this application provides a device for determining the position of a DIP switch: First, the first acquisition unit 401 acquires the image information to be printed on the bank card surface; then, the matching unit 402 matches the image information with the size of the bank card to obtain the pixel color and pixel position coordinates of the image on the bank card; the second acquisition unit 403 acquires the color and selectable size range of the DIP switch; wherein, the selectable size range refers to the number of pixels occupied by the DIP switch and the shape of the occupied pixels; finally, the determination unit 404 determines the size of the target DIP switch and its position on the bank card surface based on the pixel color and pixel position coordinates of each image on the bank card, and the color and selectable size range of the DIP switch. This allows the DIP switch to be integrated with the card image and color, thereby improving customer experience and increasing card sales.
[0104] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0105] Another embodiment of this application provides an electronic device, such as... Figure 5 As shown, it includes:
[0106] One or more processors 501.
[0107] Storage device 502, on which one or more programs are stored.
[0108] When the one or more programs are executed by the one or more processors 501, the one or more processors 501 implement the position determination method of the DIP switch as described in any of the above embodiments.
[0109] Another embodiment of this application provides a computer storage medium storing a computer program thereon, wherein when the computer program is executed by a processor, it implements the method for determining the position of a DIP switch as described in any of the above embodiments.
[0110] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0111] It should be noted that the computer-readable medium described above in this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0112] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0113] Another embodiment of this application provides a computer program product, which, when executed, is used to perform the position determination method of the DIP switch described above.
[0114] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined in the methods of the embodiments of this application.
[0115] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
[0116] While several specific implementation details are included in the foregoing discussion, these should not be construed as limiting the scope of this application. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0117] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described application concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions claimed in this application.
Claims
1. A method for determining the position of a DIP switch, characterized in that, include: Obtain the image information that will be printed on the bank card; The image information is matched with the size of the bank card to obtain the pixel color and pixel position coordinates of the image on the bank card; Obtain the color and selectable size range of the DIP switch; wherein, the selectable size range refers to the number of pixels occupied by the DIP switch and the shape of the occupied pixels; Based on the pixel color and pixel position coordinates of each image on the bank card, and the color and selectable size range of the DIP switch, determine the size of the target DIP switch and its position on the bank card surface. The step of determining the size of the target DIP switch and its position on the bank card surface based on the pixel color and position coordinates of each image on the bank card, and the color and selectable size range of the DIP switch, includes: The pixels of the image on the bank card are analyzed by traversal to determine whether there are two pixel regions that can cover the size of the switch pixels, and the pixel color in the two pixel regions is consistent with the DIP switch. If two pixel regions can cover the size of the switch pixel, and the pixel color in the two pixel regions is the same as that of the DIP switch, then the DIP switch is placed in the two pixel regions to obtain the size and coordinates of the DIP switch. If two pixel regions can cover the size of the switch pixels, but the pixel colors in the two pixel regions are inconsistent with the DIP switch, then it is determined whether there are regions whose colors are inconsistent with the DIP switch, but whose shapes are consistent with the DIP switch. If it is determined that the color of a region is inconsistent with the DIP switch, but the shape is consistent with the DIP switch, determine whether there is a DIP switch whose size meets the span requirement of the two pixel regions. If it is determined that the size of a DIP switch meets the span requirement of the two pixel areas, then the DIP switch is placed in the corresponding position. If it is determined that the size of a DIP switch only meets the span requirement of a single pixel area, then another area with the same color as the DIP switch is selected.
2. The location determination method according to claim 1, characterized in that, Also includes: If the image on the bank card does not match the shape and color of the DIP switch, then the area with the largest connected area of the same color in the image on the bank card should be selected as the target location. The center position of the target location is set as the DIP switch position, and the smallest DIP switch is selected as the switch for this operation.
3. The location determination method according to claim 1, characterized in that, Also includes: The size of the target DIP switch and its position on the bank card are uploaded to the bank's back-end system. During the card manufacturing process, the bank finds the corresponding coordinates on the bank card based on the data in the back-end system, manufactures an interface according to the size of the DIP switch, and then directly installs the switch after manufacturing.
4. A device for determining the position of a DIP switch, characterized in that, include: The first acquisition unit is used to acquire the image information that will be printed on the bank card. The matching unit is used to match the image information with the size of the bank card to obtain the pixel color and pixel position coordinates of the image on the bank card. The second acquisition unit is used to acquire the color and selectable size range of the DIP switch; wherein, the selectable size range is the number of pixels occupied by the size of the DIP switch and the shape of the occupied pixels; The determining unit is used to determine the size of the target DIP switch and the position of the target DIP switch on the surface of the bank card based on the pixel color and pixel position coordinates of each image on the bank card, and the color and selectable size range of the DIP switch. The determining unit includes: The analysis unit is used to determine whether there are two pixel regions that can cover the size of the switch pixel by traversing and analyzing the pixels of the image on the bank card, and the pixel color in the two pixel regions is consistent with the DIP switch. The first determining subunit is used to determine that if there are two pixel regions that can cover the size of the switch pixel, and the pixel color in the two pixel regions is consistent with the DIP switch, then the DIP switch is placed in the two pixel regions to obtain the size and coordinates of the DIP switch. The first judgment unit is used to determine whether there is a region whose color is inconsistent with the DIP switch but whose shape is consistent with the DIP switch if there are two pixel regions that can cover the size of the switch pixels, but the pixel color in the two pixel regions is inconsistent with the DIP switch. The second judgment unit is used to determine whether there is a DIP switch whose size meets the span requirement of the two pixel areas if the first judgment unit determines that there is an area whose color is inconsistent with the DIP switch but whose shape is consistent with the DIP switch. The second determining subunit is used to determine that if the second determining unit determines that there is a DIP switch whose size meets the span requirement of the two pixel point regions, then the DIP switch is placed in the corresponding position. The second determining subunit is further configured to select another region with the same color as the DIP switch if the second determining unit determines that the size of a DIP switch only meets the span requirement of a single pixel area.
5. The position determining device according to claim 4, characterized in that, Also includes: The first selection unit is used to select the area with the largest connected area of the same color in the image on the bank card as the target location if the shape and color of the image on the bank card are inconsistent with those of the DIP switch. The second selection unit is used to select the center position of the target location as the DIP switch position, and select the smallest DIP switch as the current switch.
6. The position determining device according to claim 4, characterized in that, Also includes: The uploading unit is used to upload the size of the target DIP switch and its position on the bank card surface to the bank's back-end system. During the card manufacturing process, the bank finds the corresponding coordinates on the bank card surface based on the data in the bank's back-end system, manufactures the interface according to the size of the DIP switch, and then directly installs the switch after manufacturing is completed.
7. An electronic device, characterized in that, include: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the position determination method of the DIP switch as described in any one of claims 1 to 3.
8. A computer storage medium, characterized in that, It stores a computer program, wherein the computer program, when executed by a processor, implements the method for determining the position of a DIP switch as described in any one of claims 1 to 3.