CN112287636A - Dot matrix character shadow superposition method and system - Google Patents
Dot matrix character shadow superposition method and system Download PDFInfo
- Publication number
- CN112287636A CN112287636A CN202011211485.0A CN202011211485A CN112287636A CN 112287636 A CN112287636 A CN 112287636A CN 202011211485 A CN202011211485 A CN 202011211485A CN 112287636 A CN112287636 A CN 112287636A
- Authority
- CN
- China
- Prior art keywords
- dot matrix
- gray
- shadow
- image
- character
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 239000011159 matrix material Substances 0.000 title claims abstract description 93
- 238000000034 method Methods 0.000 title claims abstract description 24
- 238000006243 chemical reaction Methods 0.000 claims description 13
- 230000004927 fusion Effects 0.000 claims description 4
- 230000000694 effects Effects 0.000 abstract description 16
- 238000013500 data storage Methods 0.000 description 2
- 229910002056 binary alloy Inorganic materials 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 230000016776 visual perception Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
- G06F40/109—Font handling; Temporal or kinetic typography
Abstract
The invention discloses a dot matrix character shadow superposition method and a system, wherein the method comprises the following steps: converting the gray value of each pixel point of the dot matrix character, and converting the dot matrix character from a second-order gray image to a multi-order gray image; obtaining a shadow layer image of the dot matrix character according to the shadow direction; and overlapping and fusing the multi-order gray level image of the dot matrix character and the shadow layer image to form a gray level character with gray level shadow. By adopting the technical scheme of the invention, the storage space for storing the dot matrix characters with the shadow effect can be saved.
Description
Technical Field
The invention relates to the field of font processing, in particular to a dot matrix character shadow superposition method and a dot matrix character shadow superposition system.
Background
Currently, in embedded systems using a lattice word library. The research and development of products pursue more beautiful display effects, pay attention to the visual perception of users, the display effect of characters is the more important feeling, and generally, in the display of dot matrix characters by embedded products, the display effect is only that characters are simply colored, and is single; the individual product positioning is high, if the shadow effect needs to be displayed, a mode of cutting a picture by a PC font is needed, the realization effect has more beautiful display, but the workload of UI design and the occupation of hardware resources are increased, the picture is stored in data in an RGB format, the data volume is 16 times of that of dot matrix data, and the expenditure of labor cost and hardware cost is increased invisibly.
Disclosure of Invention
The invention aims to solve the technical problem that resources are increased after a shadow effect is superimposed on dot matrix characters in the prior art, and provides a dot matrix character shadow superimposing method and a dot matrix character shadow superimposing system.
The embodiment of the invention provides a dot matrix character shadow superposition method, which comprises the following steps:
converting the gray value of each pixel point of the dot matrix character, and converting the dot matrix character from a second-order gray image to a multi-order gray image;
obtaining a shadow layer image of the dot matrix character according to the shadow direction;
and overlapping and fusing the multi-order gray level image of the dot matrix character and the shadow layer image to form a gray level character with gray level shadow.
In the embodiment of the invention, the multi-level gray scale image is 16 levels.
In the embodiment of the present invention, converting the gray value of each pixel of the dot matrix word includes:
scanning the dot matrix character, judging the gray value of each pixel point of the dot matrix character,
if the gray value of the pixel point is 0, converting the gray value into 0000;
if the gray-level value at the pixel point is 1, it is converted into 1111.
In an embodiment of the present invention, a system for superimposing a dot matrix character shadow is further provided, which includes:
the gray level conversion module is used for converting the gray level value of each pixel point of the dot matrix character and converting the dot matrix character from a second-order gray level image to a multi-order gray level image;
the shadow conversion module is used for obtaining a shadow layer image of the dot matrix characters according to the shadow direction;
and the image fusion module is used for superposing and fusing the multi-order gray level images of the dot matrix characters and the shadow layer images to form gray level characters with gray level shadows.
In the embodiment of the invention, the multi-level gray scale image is 16 levels.
In the embodiment of the present invention, the converting module converts the gray value of each pixel of the dot matrix character, and includes:
scanning the dot matrix character, judging the gray value of each pixel point of the dot matrix character,
if the gray value of the pixel point is 0, converting the gray value into 0000;
if the gray value at the pixel point is 1, it is converted into 1111
Compared with the prior art, in the dot matrix character shadow superposition method and system, the gray value of each pixel point of the dot matrix character is converted, and the dot matrix character is converted into a multi-order gray image from a second-order gray image; obtaining a shadow layer image of the dot matrix character according to the shadow direction; the multi-order gray level images of the dot matrix characters and the shadow layer images are overlapped and fused to form gray level characters with gray level shadows, only one set of original dot matrix word stock and corresponding gray level data storage space are needed, the effect of overlapping the gray level shadows is achieved in an algorithm, and the traditional word stock must store all the word stocks with the rest sizes including the dot matrix into the storage space, so that compared with the traditional word stock, the effect of dot matrix characters can be achieved, the storage space of the word stock is saved, and the cost is saved.
Drawings
Fig. 1 is a schematic flow chart of a dot matrix character shadow superimposing method according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a dot matrix character shadow superimposing system according to an embodiment of the present invention.
Detailed Description
As shown in FIG. 1, the embodiment of the present invention provides a dot matrix character shadow overlaying method, which includes steps S1-S3. The following description will be made separately.
Step S1: and converting the gray value of each pixel point of the dot matrix character, and converting the dot matrix character from a second-order gray image to a multi-order gray image.
It should be noted that the dot matrix word is usually a second-order gray image, the gray value of each pixel is represented by 0 or 1, and there are only two colors when displaying. However, for a dot character which is required to display a shadow effect, the gradation of the shadow portion is different from that of the font portion. Therefore, the second order gradation value cannot satisfy the requirement. In the embodiment of the present invention, the dot matrix word needs to be converted from a second-order gray image to a multi-order gray image. The multi-step gray scale image may be 4 steps, 8 steps, 16 steps or more, which is not limited by the present invention.
Taking the example of converting the gray value of each pixel point of the dot matrix character into 16 levels, the gray conversion process includes:
scanning the dot matrix character, judging the gray value of each pixel point of the dot matrix character,
if the gray value of the pixel point is 0, converting the gray value into 0000;
if the gray-level value at the pixel point is 1, it is converted into 1111.
It should be noted that, because the dot matrix word exists in binary form in the memory and the embedded system for displaying the dot matrix word, the binary system is adopted for conversion in the gray scale conversion process.
Step S2: obtaining a shadow layer image of the dot matrix character according to the shadow direction;
the direction of the shadow is set as required by the actual display effect. After the shadow direction is determined, the coordinates and the gray scale of each pixel point of the shadow layer image can be obtained in the coordinate system of the dot matrix character in a mapping mode according to the shadow direction.
Step S3: and overlapping and fusing the multi-order gray level image of the dot matrix character and the shadow layer image to form a gray level character with gray level shadow.
It should be noted that, in the scheme of the prior art, the dot matrix characters with the shadow effect are all directly stored in the form of pictures, which results in a large amount of storage space being occupied, and in the embodiment of the present invention, when the shadow effect is to be displayed, conversion is performed according to actual needs, so that a large amount of storage space is not occupied.
As shown in fig. 2, in accordance with the above dot-matrix character shadow superimposing method, in the embodiment of the present invention, a dot-matrix character shadow superimposing system is further provided, which includes a gray level conversion module, a shadow conversion module, and an image fusion module. The following description will be made separately.
The gray level conversion module is used for converting the gray level value of each pixel point of the dot matrix character and converting the dot matrix character from a second-order gray level image to a multi-order gray level image;
the shadow conversion module is used for obtaining a shadow layer image of the dot matrix characters according to the shadow direction;
and the image fusion module is used for superposing and fusing the multi-order gray level images of the dot matrix characters and the shadow layer images to form gray level characters with gray level shadows.
It should be noted that, in the above dot-matrix character shadow superimposing system, the contents of information interaction, execution process, and the like between the modules/units are based on the same concept as that of the above dot-matrix character shadow superimposing method, and the implementation process and the technical effect thereof are the same as those of the above dot-matrix character shadow superimposing method, and specific contents can be referred to the related description of the above dot-matrix character shadow superimposing method, and are not described herein again.
In summary, in the dot matrix character shadow superimposing method and system of the present invention, the gray value of each pixel point of the dot matrix character is converted, and the dot matrix character is converted from a second-order gray image to a multi-order gray image; obtaining a shadow layer image of the dot matrix character according to the shadow direction; the multi-order gray level images of the dot matrix characters and the shadow layer images are overlapped and fused to form gray level characters with gray level shadows, only one set of original dot matrix word stock and corresponding gray level data storage space are needed, the effect of overlapping the gray level shadows is achieved in an algorithm, and the traditional word stock must store all the word stocks with the rest sizes including the dot matrix into the storage space, so that compared with the traditional word stock, the effect of dot matrix characters can be achieved, the storage space of the word stock is saved, and the cost is saved.
Notably, one of ordinary skill in the art will understand that: the method and apparatus can be implemented by hardware related to program instructions, the program can be stored in a computer readable storage medium, and when executed, the program performs the steps of the method embodiments, and the storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
Claims (6)
1. A dot matrix character shadow superposition method is characterized by comprising the following steps:
converting the gray value of each pixel point of the dot matrix character, and converting the dot matrix character from a second-order gray image to a multi-order gray image;
obtaining a shadow layer image of the dot matrix character according to the shadow direction;
and overlapping and fusing the multi-order gray level image of the dot matrix character and the shadow layer image to form a gray level character with gray level shadow.
2. The method of superimposing dot-matrix character shades as recited in claim 1, wherein said multi-level gray scale image is 16 levels.
3. The method of superimposing dot matrix word shadows according to claim 2, wherein converting the gray value of each pixel of the dot matrix word comprises:
scanning the dot matrix character, judging the gray value of each pixel point of the dot matrix character,
if the gray value of the pixel point is 0, converting the gray value into 0000;
if the gray-level value at the pixel point is 1, it is converted into 1111.
4. A system for superimposing a shadow of a dot matrix word, comprising:
the gray level conversion module is used for converting the gray level value of each pixel point of the dot matrix character and converting the dot matrix character from a second-order gray level image to a multi-order gray level image;
the shadow conversion module is used for obtaining a shadow layer image of the dot matrix characters according to the shadow direction;
and the image fusion module is used for superposing and fusing the multi-order gray level images of the dot matrix characters and the shadow layer images to form gray level characters with gray level shadows.
5. The system for superimposing dot matrix word shades as defined in claim 4 wherein said multi-level gray scale image is 16 levels.
6. The system for superimposing a shade of dot matrix words as recited in claim 5, wherein said gray level conversion module converts the gray level value of each pixel of the dot matrix words, comprising:
scanning the dot matrix character, judging the gray value of each pixel point of the dot matrix character,
if the gray value of the pixel point is 0, converting the gray value into 0000;
if the gray-level value at the pixel point is 1, it is converted into 1111.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011211485.0A CN112287636A (en) | 2020-11-03 | 2020-11-03 | Dot matrix character shadow superposition method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011211485.0A CN112287636A (en) | 2020-11-03 | 2020-11-03 | Dot matrix character shadow superposition method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112287636A true CN112287636A (en) | 2021-01-29 |
Family
ID=74351199
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011211485.0A Pending CN112287636A (en) | 2020-11-03 | 2020-11-03 | Dot matrix character shadow superposition method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112287636A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05303375A (en) * | 1992-01-27 | 1993-11-16 | Matsushita Electric Ind Co Ltd | Character font data output device |
CN102332171A (en) * | 2011-07-26 | 2012-01-25 | 深圳市万兴软件有限公司 | Method and system for generating artistic fonts |
CN104133809A (en) * | 2014-07-28 | 2014-11-05 | 中国科学院软件研究所 | Font style bolding method |
CN104407781A (en) * | 2014-11-13 | 2015-03-11 | 天津大学 | Device and method for displaying three-dimensional menu on LCD (Liquid Crystal Display) screen |
CN107155074A (en) * | 2017-05-17 | 2017-09-12 | 威创集团股份有限公司 | Video Character Superpose method and system |
CN109543770A (en) * | 2018-11-30 | 2019-03-29 | 合肥泰禾光电科技股份有限公司 | Dot character recognition methods and device |
-
2020
- 2020-11-03 CN CN202011211485.0A patent/CN112287636A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05303375A (en) * | 1992-01-27 | 1993-11-16 | Matsushita Electric Ind Co Ltd | Character font data output device |
CN102332171A (en) * | 2011-07-26 | 2012-01-25 | 深圳市万兴软件有限公司 | Method and system for generating artistic fonts |
CN104133809A (en) * | 2014-07-28 | 2014-11-05 | 中国科学院软件研究所 | Font style bolding method |
CN104407781A (en) * | 2014-11-13 | 2015-03-11 | 天津大学 | Device and method for displaying three-dimensional menu on LCD (Liquid Crystal Display) screen |
CN107155074A (en) * | 2017-05-17 | 2017-09-12 | 威创集团股份有限公司 | Video Character Superpose method and system |
CN109543770A (en) * | 2018-11-30 | 2019-03-29 | 合肥泰禾光电科技股份有限公司 | Dot character recognition methods and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA1236940A (en) | Monochromatic representation of color images | |
US7505041B2 (en) | Iteratively solving constraints in a font-hinting language | |
KR100989010B1 (en) | Systems and methods for generating visual representations of graphical data and digital document processing | |
KR20130069596A (en) | Two-dimensional code with a logo, device for generating a two-dimensional code with a logo, method for generating a two-dimensional code with a logo, and program | |
US7961198B2 (en) | Managing color output by appearance intent | |
JP6433887B2 (en) | Electronic display device and driving method thereof | |
EP1600896A2 (en) | Character image generation | |
JP2015523593A5 (en) | ||
CN102783131A (en) | Data-generating device, data-generating method, data-generating program, and recording medium | |
JP2010191026A (en) | Terminal outputting image data in accordance with external display device, program, and method | |
US9153193B2 (en) | Primitive rendering using a single primitive type | |
US10621710B2 (en) | Display device and display method therefor | |
CN112287636A (en) | Dot matrix character shadow superposition method and system | |
CN115577570A (en) | Canvas layer processing method and device, electronic equipment and storage medium | |
CN111612858B (en) | Image display method and related device of electronic tag | |
CN111091606B (en) | Solution based on map overlay gradual change | |
CN110825995B (en) | Method for rapidly displaying gray-scale image | |
US20130063475A1 (en) | System and method for text rendering | |
CN110609684B (en) | Method for converting video into character animation under Spring boot frame | |
CN117478801A (en) | Display device and display method | |
JPH08314429A (en) | Translucent color image forming device | |
CN115424588A (en) | Character display edge processing method and device, terminal equipment and storage medium | |
CN118016005A (en) | Method for previewing display content and related product | |
CN113703699A (en) | Real-time output method and device of electronic file | |
CN117573048A (en) | Automatic document watermark generation method and terminal |
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 |