Method and apparatus for regulating dot-character size, and embedded system
An embedded system and character size technology, which is applied in cathode ray tube indicators, instruments, static indicators, etc., can solve the problems of wasting system space and resources, increasing system costs, and limited resources of embedded systems, and achieves reduction System cost, improvement of amplification distortion, effect of saving system space and resources
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
example 1
[0089] Example 1, performing a reduction operation on a character image may specifically include the following steps:
[0090] Step C1, the original size of obtaining the dot matrix character is srcW*srcH, and the target size is dstW*dstH; wherein, srcW is the width of the dot matrix character original image, srcH is the height of the dot matrix character original image, and dstW is the dot matrix character target The width of the image, dstH is the height of the dot matrix character target image;
[0091] Step C2, calculate the scaling information as follows: width scaling ratio srcW / dstW=w1 / w2, height scaling ratio srcH / dstH=h1 / h2; since this example is for zooming out, w1>w2, h1>h2;
[0092] Step C3, carry out the proportional reduction operation in the horizontal direction, specifically, the width ratio can be calculated by using the floor function and the ceil function respectively, that is, s1=floor(w1 / w2), s2=ceil(w1 / w2), according to the following algorithm Calculate ...
example 2
[0098] Example 2: Enlarging the character image may specifically include the following steps:
[0099] Step D1, the original size of obtaining the dot matrix character is srcW*srcH, and the target size is dstW*dstH; wherein, srcW is the width of the original image of the dot matrix character, srcH is the height of the original image of the dot matrix character, and dstW is the target of the dot matrix character The width of the image, dstH is the height of the dot matrix character target image;
[0100] Step D2, calculating scaling information is: width scaling ratio srcW / dstW=w1 / w2, height scaling ratio srcH / dstH=h1 / h2; wherein, 1
[0101] Step D3. In this example, the linear interpolation method is used to perform the proportional enlargement operation in the horizontal direction. The algorithm can be specifically implemented by the following code:
[0102]
[0103] Step D4. Carry out the proportional enlargement operation in the vertical direction ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 