CN111144395A - Method and device for rapidly inversely labeling characters and graphs based on Cadence skip - Google Patents
Method and device for rapidly inversely labeling characters and graphs based on Cadence skip Download PDFInfo
- Publication number
- CN111144395A CN111144395A CN201911376309.XA CN201911376309A CN111144395A CN 111144395 A CN111144395 A CN 111144395A CN 201911376309 A CN201911376309 A CN 201911376309A CN 111144395 A CN111144395 A CN 111144395A
- Authority
- CN
- China
- Prior art keywords
- pixel grid
- grid points
- frame
- point
- coordinates
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000002372 labelling Methods 0.000 title claims abstract description 16
- 238000012163 sequencing technique Methods 0.000 claims description 9
- 238000007639 printing Methods 0.000 claims description 6
- 238000012545 processing Methods 0.000 abstract description 4
- 230000002349 favourable effect Effects 0.000 abstract 1
- 230000006870 function Effects 0.000 description 10
- 238000004590 computer program Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000007650 screen-printing Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000012423 maintenance Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000004886 process control Methods 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000003973 paint Substances 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/22—Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
- G06V10/225—Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition based on a marking or identifier characterising the area
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/148—Segmentation of character regions
- G06V30/153—Segmentation of character regions using recognition of characters or words
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Character Discrimination (AREA)
Abstract
The invention provides a method and a device for fast reverse-labeling characters and graphs based on Cadence skip, wherein the method comprises the following steps: setting a frame capable of containing characters and graphics and determining the coordinates of a lower left point and the coordinates of an upper right point of the frame; setting the side length of the pixel grid points, obtaining the length and the width of the frame according to the coordinates of the left lower point and the coordinates of the right upper point, and defining all the pixel grid points in the frame range according to the length and the width of the frame and the side length of the pixel grid points; scanning all the pixel grid points to obtain the area of the graph in each pixel grid point, comparing each area with a threshold value, and performing graph denotation on the pixel grid points with the areas larger than the threshold value and the pixel grid points with the areas not larger than the threshold value. The method can inversely mark the characters on the PCB into shape, and is favorable for improving the definition of characters when the processing capacity of a PCB factory is insufficient or the control of the PCB factory is not good.
Description
Technical Field
The invention relates to the field of computers, in particular to a method and a device for quickly inversely marking characters and graphs based on Cadence skip.
Background
At present, a plurality of PCB design software exist in the market, Cadence is used as the most widely applied software in the industry, not only is the Cadence provided with strong functions and a plurality of related software to support, but also because the Cadence provides an open secondary development interface and a more perfect development language library, a user can develop the Cadence according to the own needs. The speaker language is a high-level programming language which is built in Cadence software and is based on a C language and an LISP language, the Cadence provides rich interactive functions for the speaker language, and the work efficiency can be greatly improved by researching the speaker language and then writing tools.
The main function of the PCB character layer is to mark the name and position frame of each part on the circuit board, which is convenient for maintenance and identification after assembly. But at present because the PCB inboard space is not enough, the typeface can't enlarge and the PCB board factory prints the not good problem of silk screen printing technique, easily leads to the silk screen printing quality not good, and the typeface is fuzzy, is difficult for the engineer to discern when the maintenance of equipment back.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method and an apparatus for fast inversely labeling a text and a graphic based on Cadence skip, so as to realize that a white paint portion of a text is inversely labeled in a Shape form, which is easier for an engineer to perform a later maintenance identification.
Based on the above purpose, an aspect of the embodiments of the present invention provides a method for fast denormalizing a character and a graphic based on Cadence skip, which includes the following steps:
setting a frame capable of containing characters and graphics and determining the coordinates of a lower left point and the coordinates of an upper right point of the frame;
setting the side length of the pixel grid points, obtaining the length and the width of the frame according to the coordinates of the left lower point and the coordinates of the right upper point, and defining all the pixel grid points in the frame range according to the length and the width of the frame and the side length of the pixel grid points;
scanning all the pixel grid points to obtain the area of the graph in each pixel grid point, comparing each area with a threshold value, and performing graph denotation on the pixel grid points with the areas larger than the threshold value and the pixel grid points with the areas not larger than the threshold value.
In some embodiments, the setting can include a frame containing the text and graphics and determining coordinates of a bottom left point and coordinates of a top right point of the frame further comprises:
setting a frame capable of containing each character and figure, determining the coordinates of a lower left point and an upper right point of the frame corresponding to each character and figure, and putting all coordinate values into a numerical sequence;
and taking out a first value and a second value of the coordinate values in the sequence, respectively placing the first value and the second value in different sub-sequence, and sequencing the numerical values in the sub-sequence from small to large.
In some embodiments, setting the side length of the pixel grid points, obtaining the length and width of the frame according to the coordinates of the lower left point and the coordinates of the upper right point, and defining all the pixel grid points within the frame according to the length and width of the frame and the side length of the pixel grid points further includes:
and defining all pixel grid points in the frame capable of containing each character and graph according to the sorted sub-number sequence and the set side length of the pixel grid points.
In some embodiments, scanning all of the pixel grid points to obtain an area size of the graph in each pixel grid point, and comparing each of the areas to a threshold, and graphically demarking the pixel grid points with the area greater than the threshold from the pixel grid points with the area not greater than the threshold further comprises:
and inversely labeling the area outside the border capable of containing each character and figure and inside the border capable of containing all the character and figure as a figure printing area.
In some embodiments, taking the first value and the second value of the coordinate value in the sequence and placing them in different sub-sequences respectively, and sorting the values in the sub-sequences from small to large includes:
and taking out a first value of the coordinate values in the sequence and placing the first value in a first sub-sequence, taking out a second value of the coordinate values in the sequence and placing the second value in a second sub-sequence, and sequencing the numerical values in the first sub-sequence and the second sub-sequence from small to large.
In some embodiments, the threshold is 0.5 the pixel grid.
Another aspect of the embodiments of the present invention provides a device for fast reverse-labeling characters and graphics based on Cadence skip, including:
at least one processor; and
a memory storing program code executable by the processor, the program code implementing the following steps when executed by the processor:
setting a frame capable of containing characters and graphics and determining the coordinates of a lower left point and the coordinates of an upper right point of the frame;
setting the side length of the pixel grid points, obtaining the length and the width of the frame according to the coordinates of the left lower point and the coordinates of the right upper point, and defining all the pixel grid points in the frame range according to the length and the width of the frame and the side length of the pixel grid points;
scanning all the pixel grid points to obtain the area of the graph in each pixel grid point, comparing each area with a threshold value, and performing graph denotation on the pixel grid points with the areas larger than the threshold value and the pixel grid points with the areas not larger than the threshold value.
In some embodiments, the setting can include a frame containing the text and graphics and determining coordinates of a bottom left point and coordinates of a top right point of the frame further comprises:
setting a frame capable of containing each character and figure, determining the coordinates of a lower left point and an upper right point of the frame corresponding to each character and figure, and putting all coordinate values into a numerical sequence;
and taking out a first value and a second value of the coordinate values in the sequence, respectively placing the first value and the second value in different sub-sequence, and sequencing the numerical values in the sub-sequence from small to large.
In some embodiments, setting the side length of the pixel grid points, obtaining the length and width of the frame according to the coordinates of the lower left point and the coordinates of the upper right point, and defining all the pixel grid points within the frame according to the length and width of the frame and the side length of the pixel grid points further includes:
and defining all pixel grid points in the frame capable of containing each character and graph according to the sorted sub-number sequence and the set side length of the pixel grid points.
In some embodiments, scanning all of the pixel grid points to obtain an area size of the graph in each pixel grid point, and comparing each of the areas to a threshold, and graphically demarking the pixel grid points with the area greater than the threshold from the pixel grid points with the area not greater than the threshold further comprises:
and the area outside the frame capable of containing each character and figure and inside the frame capable of containing all the character and figure is inversely marked as a figure printing area.
The invention has the following beneficial technical effects: the method and the device for quickly inversely marking the character and the graph based on Cadence skip can inversely mark the character and the graph into a graph shape when the size of the character on the PCB with limited space cannot meet the processing capacity of a PCB factory, and are beneficial to improving the definition of the character; on the PCB board that the space is enough, also can lead to the silk screen sometimes to show fuzziness because of PCB board factory process control is not good, can mark the typeface back into shape form, help the definition of discerning the characters.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a flow chart of a method for rapid denotation of text graphics based on Cadence Skill according to the present invention;
FIG. 2 is a diagram illustrating a frame configured to contain text and graphics according to an embodiment of the invention;
FIG. 3 is a diagram illustrating a frame configured to contain a first text and graphics according to an embodiment of the invention;
FIG. 4 is a schematic illustration of a silk-screen reverse marking of text into a pattern according to the method of the present invention;
FIG. 5 is a schematic diagram of a hardware structure of a device for fast reverse-labeling text and graphics based on Cadence sky according to the present invention.
Detailed Description
Embodiments of the present invention are described below. However, it is to be understood that the disclosed embodiments are merely examples and that other embodiments may take various and alternative forms. The figures are not necessarily to scale; certain features may be exaggerated or minimized to show details of particular components. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a representative basis for teaching one skilled in the art to variously employ the present invention. As one of ordinary skill in the art will appreciate, various features illustrated and described with reference to any one of the figures may be combined with features illustrated in one or more other figures to produce embodiments that are not explicitly illustrated or described. The combination of features shown provides a representative embodiment for a typical application. However, various combinations and modifications of the features consistent with the teachings of the present invention may be desired for certain specific applications or implementations.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
Based on the above purpose, an embodiment of the present invention provides a method for fast reverse-labeling a text and a graphic based on Cadence skip on the one hand, as shown in fig. 1, including the following steps:
step S101: setting a frame capable of containing characters and graphics and determining the coordinates of a lower left point and the coordinates of an upper right point of the frame;
step S102: setting the side length of the pixel grid points, obtaining the length and the width of the frame according to the coordinates of the left lower point and the coordinates of the right upper point, and defining all the pixel grid points in the frame range according to the length and the width of the frame and the side length of the pixel grid points;
step S103: scanning all the pixel grid points to obtain the area of the graph in each pixel grid point, comparing each area with a threshold value, and performing graph denotation on the pixel grid points with the areas larger than the threshold value and the pixel grid points with the areas not larger than the threshold value.
In some embodiments, the setting can include a frame containing the text and graphics and determining coordinates of a bottom left point and coordinates of a top right point of the frame further comprises: setting a frame capable of containing each character and figure, determining the coordinates of a lower left point and an upper right point of the frame corresponding to each character and figure, and putting all coordinate values into a numerical sequence; and taking out a first value and a second value of the coordinate values in the sequence, respectively placing the first value and the second value in different sub-sequence, and sequencing the numerical values in the sub-sequence from small to large.
In some embodiments, setting the side length of the pixel grid points, obtaining the length and width of the frame according to the coordinates of the lower left point and the coordinates of the upper right point, and defining all the pixel grid points within the frame according to the length and width of the frame and the side length of the pixel grid points further includes: and defining all pixel grid points in the frame capable of containing each character and graph according to the sorted sub-number sequence and the set side length of the pixel grid points.
In some embodiments, scanning all of the pixel grid points to obtain an area size of a graph in each pixel grid point, comparing each of the areas with a threshold, and graphically demarking the pixel grid points with the area greater than the threshold and the pixel grid points with the area not greater than the threshold further comprises: and inversely labeling the area outside the border capable of containing each character and figure and inside the border capable of containing all the character and figure as a figure printing area.
In some embodiments, taking a first value and a second value of the coordinate values in the sequence and placing the first value and the second value in different sub-sequences respectively, and sorting the numerical values in the sub-sequences from small to large comprises: and taking out a first value of the coordinate values in the sequence and placing the first value in a first sub-sequence, taking out a second value of the coordinate values in the sequence and placing the second value in a second sub-sequence, and sequencing the numerical values in the first sub-sequence and the second sub-sequence from small to large.
In the embodiment according to the present invention, as shown in fig. 2, a frame capable of containing all fonts is set, and the coordinates of the lower left point and the upper right point, i.e., PointA (X1, Y1) and PointA (X2, Y2) are obtained. Then all the characters shape (graph) is obtained, and the characters to be printed are marked in shape in cadence Allegro usually, so that the part marked with shape is printed with white paint when the PCB is finally silkscreened. In the method provided by the invention, a frame capable of containing the shape of each alphabetic character is obtained, as shown in fig. 3, the lower left point and the upper right point of each frame, namely the lower left point and the upper right point of each shape, points A1 and B1 in the figure, and the like are obtained, and are put into a series of box-list ((A1B 1) (A2B 2) (A3B 3) … …).
Respectively taking out a first value of an element in the box of the number series, placing the first value in the box of the number series, respectively taking out a second value of the element in the box, placing the second value in the box of the number series, respectively placing the second value in the box of the number series, and carrying out small-to-large ordering on the box _ X, box _ Y elements; then the PointA indicated in fig. 2 is the first value of box _ X and box _ Y and the PointB is the last value of box _ X and box _ Y.
In one embodiment according to the present invention, the size of a pixel is 0.01mil by setting the size of a dot to 0.01mil, each dot corresponding to a pixel. Thus, it is easy to think that the number of pixels in one line of the frame containing the first letter is (X2-X1)/0.01, and the number of pixel lines is (Y2-Y1)/0.01.
In some embodiments, the threshold is 0.5 the pixel grid. Scanning all pixels from left to right and from top to bottom to obtain the shape area size of each pixel, if the shape area is larger than 0.5 pixel, regarding that the pixel has a shape and marking the pixel as 1, otherwise, no shape is marked as 0, namely, uniformly marking all areas outside the frame capable of containing each character and graph and inside the frame capable of containing the character and graph as 0. And carrying out shape de-labeling on the regions marked as 1 and 0. That is, when the screen printing is performed on the PCB, the area other than the text in the frame containing all the text is printed, and the vacant position displays the text that should be printed, as shown in fig. 4. Therefore, when the font size cannot meet the processing capacity of a PCB (printed circuit board) factory, the font is reversely marked into a shape form, which is beneficial to improving the definition of characters; on the sufficient PCB board in space, also can lead to the silk screen printing to show fuzziness because of PCB board factory process control is not good sometimes, with the font anti-mark for shape form, its definition that helps discerning the characters in visual effect.
Where technically feasible, the technical features listed above for the different embodiments may be combined with each other or changed, added, omitted, etc. to form further embodiments within the scope of the invention.
It can be seen from the above embodiments that the method for quickly inversely labeling text and graphics based on Cadence skip provided by the embodiments of the present invention can inversely label the font into the shape of the graphics when the font size on the PCB with limited space cannot meet the process capability of the PCB manufacturer, which is helpful for improving the definition of the text; on the PCB board that the space is enough, also can lead to the silk screen sometimes to show fuzziness because of PCB board factory process control is not good, can mark the typeface back into shape form, help the definition of discerning the characters.
Based on the above object, in another aspect of the embodiments of the present invention, a device for fast reverse-labeling text and graphics based on Cadence skip is provided, which includes:
at least one processor; and
a memory storing program code executable by the processor, the program code implementing the following steps when executed by the processor:
setting a frame capable of containing characters and graphics and determining the coordinates of a lower left point and the coordinates of an upper right point of the frame;
setting the side length of the pixel grid points, obtaining the length and the width of the frame according to the coordinates of the left lower point and the coordinates of the right upper point, and defining all the pixel grid points in the frame range according to the length and the width of the frame and the side length of the pixel grid points;
scanning all the pixel grid points to obtain the area of the graph in each pixel grid point, comparing each area with a threshold value, and performing graph denotation on the pixel grid points with the areas larger than the threshold value and the pixel grid points with the areas not larger than the threshold value.
In some embodiments, the setting can include a frame containing the text and graphics and determining coordinates of a bottom left point and coordinates of a top right point of the frame further comprises: setting a frame capable of containing each character and figure, determining the coordinates of a lower left point and an upper right point of the frame corresponding to each character and figure, and putting all coordinate values into a numerical sequence; and taking out a first value and a second value of the coordinate values in the sequence, respectively placing the first value and the second value in different sub-sequence, and sequencing the numerical values in the sub-sequence from small to large.
In some embodiments, setting the side length of the pixel grid points, obtaining the length and width of the frame according to the coordinates of the lower left point and the coordinates of the upper right point, and defining all the pixel grid points within the frame according to the length and width of the frame and the side length of the pixel grid points further includes: and defining all pixel grid points in the frame capable of containing each character and graph according to the sorted sub-number sequence and the set side length of the pixel grid points.
In some embodiments, scanning all of the pixel grid points to obtain an area size of a graph in each pixel grid point, comparing each of the areas with a threshold, and graphically demarking the pixel grid points with the area greater than the threshold and the pixel grid points with the area not greater than the threshold further comprises: and the area outside the frame capable of containing each character and figure and inside the frame capable of containing all the character and figure is inversely marked as a figure printing area.
Fig. 5 is a schematic diagram of a hardware structure of an embodiment of the device for fast reverse-labeling characters and graphics based on Cadence skip provided by the present invention.
Taking the computer device shown in fig. 5 as an example, the computer device includes a processor 501 and a memory 502, and may further include: an input device 503 and an output device 504.
The processor 501, the memory 502, the input device 503 and the output device 504 may be connected by a bus or other means, and fig. 5 illustrates the connection by a bus as an example.
The memory 502 is used as a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the Cadence skip fast denotation character and graphic based method in this embodiment of the present application. The processor 501 executes various functional applications and data processing of the server by running the nonvolatile software program, instructions and modules stored in the memory 502, that is, the method for quickly denotling character graphics based on Cadence skip in the above method embodiment is implemented.
The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the data storage area can store data and the like created by a method for quickly inversely marking characters and graphics based on Cadence skip. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 502 optionally includes memory located remotely from processor 501, which may be connected to local modules via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 503 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus based on the Cadence skip rapid reverse-sign text graphic method. The output device 504 may include a display device such as a display screen.
Program instructions/modules corresponding to the one or more Cadence skip rapid denotation character and graphic-based methods are stored in the memory 502, and when executed by the processor 501, the Cadence skip rapid denotation character and graphic-based methods in any of the above method embodiments are executed.
Any embodiment of the computer device for executing the method for quickly inversely labeling the character and the graphic based on the Cadence skip can achieve the same or similar effects as any corresponding method embodiment.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes in the methods of the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
In addition, the apparatuses, devices and the like disclosed in the embodiments of the present invention may be various electronic terminal devices, such as a mobile phone, a Personal Digital Assistant (PDA), a tablet computer (PAD), a smart television and the like, or may be a large terminal device, such as a server and the like, and therefore the scope of protection disclosed in the embodiments of the present invention should not be limited to a specific type of apparatus, device. The client disclosed in the embodiment of the present invention may be applied to any one of the above electronic terminal devices in the form of electronic hardware, computer software, or a combination of both.
Furthermore, the method disclosed according to an embodiment of the present invention may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the above-described functions defined in the method disclosed in the embodiments of the present invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) described herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in a variety of forms such as synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions described herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, or the like.
The above-described embodiments are possible examples of implementations and are presented merely for a clear understanding of the principles of the invention. Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of an embodiment of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.
Claims (10)
1. A method for rapidly inversely labeling characters and graphs based on Cadence skip is characterized by comprising the following steps:
setting a frame capable of containing characters and graphics and determining the coordinates of a lower left point and the coordinates of an upper right point of the frame;
setting the side length of the pixel grid points, obtaining the length and the width of the frame according to the coordinates of the left lower point and the coordinates of the right upper point, and defining all the pixel grid points in the frame range according to the length and the width of the frame and the side length of the pixel grid points;
scanning all the pixel grid points to obtain the area of the graph in each pixel grid point, comparing each area with a threshold value, and performing graph denotation on the pixel grid points with the areas larger than the threshold value and the pixel grid points with the areas not larger than the threshold value.
2. The method of claim 1, wherein setting a frame that can contain text and graphics and determining coordinates of a bottom left point and coordinates of a top right point of the frame further comprises:
setting a frame capable of containing each character and figure, determining the coordinates of a lower left point and an upper right point of the frame corresponding to each character and figure, and putting all coordinate values into a numerical sequence;
and taking out a first value and a second value of the coordinate values in the sequence, respectively placing the first value and the second value in different sub-sequence, and sequencing the numerical values in the sub-sequence from small to large.
3. The method of claim 2, wherein setting a side length of a pixel grid point, obtaining a length and a width of the bounding box according to the coordinates of the lower left point and the coordinates of the upper right point, and defining all pixel grid points within the bounding box according to the length and the width of the bounding box and the side length of the pixel grid point further comprises:
and defining all pixel grid points in the frame capable of containing each character and graph according to the sorted sub-number sequence and the set side length of the pixel grid points.
4. The method of claim 3, wherein scanning all of the pixel grid points to obtain an area size of the graph in each pixel grid point, and comparing each of the areas to a threshold, and graphically demarking pixel grid points having the area greater than the threshold to pixel grid points having the area not greater than the threshold further comprises:
and inversely labeling the area outside the border capable of containing each character and figure and inside the border capable of containing all the character and figure as a figure printing area.
5. The method of claim 2, wherein the step of extracting the first value and the second value of the coordinate value in the sequence of numbers and placing the first value and the second value in different sub-sequences of numbers respectively, and the step of sorting the values in the sub-sequences of numbers from small to large comprises the steps of:
and taking out a first value of the coordinate values in the sequence and placing the first value in a first sub-sequence, taking out a second value of the coordinate values in the sequence and placing the second value in a second sub-sequence, and sequencing the numerical values in the first sub-sequence and the second sub-sequence from small to large.
6. The method of claim 1, wherein the threshold is 0.5 of the pixel grid point.
7. A device based on Cadence sky fast reverse-sign characters and graphics is characterized by comprising:
at least one processor; and
a memory storing program code executable by the processor, the program code implementing the following steps when executed by the processor:
setting a frame capable of containing characters and graphics and determining the coordinates of a lower left point and the coordinates of an upper right point of the frame;
setting the side length of the pixel grid points, obtaining the length and the width of the frame according to the coordinates of the left lower point and the coordinates of the right upper point, and defining all the pixel grid points in the frame range according to the length and the width of the frame and the side length of the pixel grid points;
scanning all the pixel grid points to obtain the area of the graph in each pixel grid point, comparing each area with a threshold value, and performing graph denotation on the pixel grid points with the areas larger than the threshold value and the pixel grid points with the areas not larger than the threshold value.
8. The apparatus of claim 7, wherein the setting is capable of including a frame containing text and graphics and determining coordinates of a bottom left point and coordinates of a top right point of the frame further comprises:
setting a frame capable of containing each character and figure, determining the coordinates of a lower left point and an upper right point of the frame corresponding to each character and figure, and putting all coordinate values into a numerical sequence;
and taking out a first value and a second value of the coordinate values in the sequence, respectively placing the first value and the second value in different sub-sequence, and sequencing the numerical values in the sub-sequence from small to large.
9. The apparatus of claim 8, wherein setting a side length of a pixel grid point, obtaining a length and a width of the frame according to the coordinates of the lower left point and the coordinates of the upper right point, and defining all pixel grid points within the frame according to the length and the width of the frame and the side length of the pixel grid point further comprises:
and defining all pixel grid points in the frame capable of containing each character and graph according to the sorted sub-number sequence and the set side length of the pixel grid points.
10. The apparatus of claim 9, wherein scanning all of the pixel grid points to obtain an area size of a graph in each pixel grid point, and comparing each of the areas to a threshold, and graphically demarking pixel grid points having the area greater than the threshold to pixel grid points having the area not greater than the threshold further comprises:
and the area outside the frame capable of containing each character and figure and inside the frame capable of containing all the character and figure is inversely marked as a figure printing area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911376309.XA CN111144395B (en) | 2019-12-27 | 2019-12-27 | Method and device for quickly inversely labeling characters and graphs based on Cadence Skill |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911376309.XA CN111144395B (en) | 2019-12-27 | 2019-12-27 | Method and device for quickly inversely labeling characters and graphs based on Cadence Skill |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111144395A true CN111144395A (en) | 2020-05-12 |
CN111144395B CN111144395B (en) | 2022-05-24 |
Family
ID=70520971
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911376309.XA Active CN111144395B (en) | 2019-12-27 | 2019-12-27 | Method and device for quickly inversely labeling characters and graphs based on Cadence Skill |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111144395B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113076715A (en) * | 2021-04-02 | 2021-07-06 | 苏州谋时软件科技有限公司 | Method and system for creating character block in Allegro |
CN113220375A (en) * | 2021-04-26 | 2021-08-06 | 深圳市国鑫恒运信息安全有限公司 | Method and system for generating hollow text silk screen based on Allegro software |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050157930A1 (en) * | 2004-01-20 | 2005-07-21 | Robert Cichielo | Method and system for performing image mark recognition |
CN108460385A (en) * | 2018-03-02 | 2018-08-28 | 山东超越数控电子股份有限公司 | A kind of Document Segmentation method and apparatus |
CN109035370A (en) * | 2018-07-23 | 2018-12-18 | 郑州云海信息技术有限公司 | A kind of picture mask method and system |
-
2019
- 2019-12-27 CN CN201911376309.XA patent/CN111144395B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050157930A1 (en) * | 2004-01-20 | 2005-07-21 | Robert Cichielo | Method and system for performing image mark recognition |
CN108460385A (en) * | 2018-03-02 | 2018-08-28 | 山东超越数控电子股份有限公司 | A kind of Document Segmentation method and apparatus |
CN109035370A (en) * | 2018-07-23 | 2018-12-18 | 郑州云海信息技术有限公司 | A kind of picture mask method and system |
Non-Patent Citations (1)
Title |
---|
王亮等: "一种改进的二值图像像素标记算法", 《南京师范大学学报(工程技术版)》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113076715A (en) * | 2021-04-02 | 2021-07-06 | 苏州谋时软件科技有限公司 | Method and system for creating character block in Allegro |
CN113220375A (en) * | 2021-04-26 | 2021-08-06 | 深圳市国鑫恒运信息安全有限公司 | Method and system for generating hollow text silk screen based on Allegro software |
CN113220375B (en) * | 2021-04-26 | 2024-04-19 | 深圳市国鑫恒运信息安全有限公司 | Method and system for generating hollow text silk screen based on Allegro software |
Also Published As
Publication number | Publication date |
---|---|
CN111144395B (en) | 2022-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109801347B (en) | Method, device, equipment and medium for generating editable image template | |
CN109978972B (en) | Method and device for editing characters in picture | |
CN113190781B (en) | Page layout method, device, equipment and storage medium | |
CN109035370B (en) | Picture labeling method and system | |
CN111144395B (en) | Method and device for quickly inversely labeling characters and graphs based on Cadence Skill | |
CN109522898B (en) | Handwritten sample picture labeling method and device, computer equipment and storage medium | |
US9983764B2 (en) | Method, electronic device, and non-transitory storage medium for adjusting icons | |
CN113012265B (en) | Method, apparatus, computer device and medium for generating needle-type printed character image | |
CN113822116A (en) | Text recognition method and device, computer equipment and storage medium | |
CN110781639B (en) | Method and device for automatic marking in PCB design | |
CN112615616A (en) | Pre-emphasis circuit, method and display device | |
US7057617B1 (en) | Font memory and font data reading method | |
CN110996026B (en) | OSD display method, device, equipment and storage medium | |
CN107608733B (en) | Picture display method and device and terminal equipment | |
CN114937270A (en) | Ancient book word processing method, ancient book word processing device and computer readable storage medium | |
US8085279B2 (en) | Drawing an image with transparent regions on top of another image without using an alpha channel | |
CN110992251B (en) | Logo replacing method and device in video and electronic equipment | |
CN114237468B (en) | Text and picture translation method and device, electronic equipment and readable storage medium | |
CN110706317A (en) | Method and device for generating mathematical formula data mixed by printing and handwriting | |
CN113449485B (en) | Lead generation method, device, equipment and storage medium | |
CN106598934A (en) | Electronic book data display method and device, and terminal equipment | |
CN111046243B (en) | Method, equipment and medium for configuring SONIC (self-organizing network) based on network topology map | |
CN113269102B (en) | Seal information identification method and device, computer equipment and storage medium | |
CN111554277B (en) | Voice data recognition method, device, equipment and medium | |
US12062246B2 (en) | Extracting text from an image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |