Method and apparatus for regulating dot-character size, and embedded system
An embedded system, character size technology, applied in the direction of 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 achieve 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
[0090] Example 1, performing a reduction operation on a character image may specifically include the following steps:
[0091] 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;
[0092] Step C2, calculating the scaling information is: width scaling ratio srcW / dstW=w1 / w2, height scaling ratio srcH / dstH=h1 / h2; since this example is a zoom-out operation, so w1>w2, h1>h2;
[0093] 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 Calculat...
example 2
[0123] Example 2: Enlarging the character image may specifically include the following steps:
[0124] 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;
[0125] Step D2, calculating scaling information is: width scaling ratio srcW / dstW=w1 / w2, height scaling ratio srcH / dstH=h1 / h2; wherein, 1
[0126] 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:
[0127] 1) initial step=w1, num=0, output data[0] / / initialization operation
[0128] 2) num=num+1
[0...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 