WO2017088485A1 - 圆形图案显示平滑的优化处理方法、系统及智能设备 - Google Patents

圆形图案显示平滑的优化处理方法、系统及智能设备 Download PDF

Info

Publication number
WO2017088485A1
WO2017088485A1 PCT/CN2016/088822 CN2016088822W WO2017088485A1 WO 2017088485 A1 WO2017088485 A1 WO 2017088485A1 CN 2016088822 W CN2016088822 W CN 2016088822W WO 2017088485 A1 WO2017088485 A1 WO 2017088485A1
Authority
WO
WIPO (PCT)
Prior art keywords
transparency
points
coordinate
point
circular pattern
Prior art date
Application number
PCT/CN2016/088822
Other languages
English (en)
French (fr)
Inventor
周利宾
Original Assignee
惠州Tcl移动通信有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 惠州Tcl移动通信有限公司 filed Critical 惠州Tcl移动通信有限公司
Priority to US15/546,805 priority Critical patent/US10438324B2/en
Publication of WO2017088485A1 publication Critical patent/WO2017088485A1/zh

Links

Classifications

    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • G06T5/80
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/12Indexing scheme for image data processing or generation, in general involving antialiasing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Definitions

  • the present invention relates to the field of display control technologies, and in particular, to an optimized processing method, system, and smart device for graphic pattern display smoothing.
  • the object of the present invention is to provide a user with an optimized processing method, system and smart device for graphic pattern display smoothing, which overcomes the prior art intelligent terminal internally set as a low power consumption chip. On the top, the defects of the circular pattern edges are not smooth.
  • a circular pattern showing smooth optimization processing methods including:
  • the transparency compensation values of the two points adjacent to the point corresponding to any coordinate of the circular pattern in the X-axis direction and the Y-axis direction are respectively calculated;
  • the circular pattern shows a smooth optimization processing method, wherein the calculation formula of the transparency compensation value of two points adjacent to the point corresponding to any one of the coordinates is:
  • tran (dx-floor(dx))*maxtrans+0.5;
  • the above tran is a transparency compensation value
  • dy or dx respectively represents the point Y coordinate value or the coordinate value of X
  • the floor(dy) and floor(dx) respectively bring dy and dx into the floor function, and the obtained is not larger than dy
  • an integer of dx maxtrans is the maximum limit of transparency.
  • the circular pattern shows a smooth optimized processing method, wherein the circular pattern comprises: a circle, an arc or a ring.
  • a circular pattern display smoothing optimization processing method which includes:
  • the transparency compensation values of the two points adjacent to the point corresponding to any coordinate of the circular pattern in the X-axis direction and the Y-axis direction are respectively calculated;
  • the circular pattern displays a smooth optimization processing method, wherein the coordinate values of all points on the graphic pattern are obtained according to the center coordinates and the radius of the circular pattern, including:
  • tran (dx-floor(dx))*maxtrans+0.5;
  • the above tran is a transparency compensation value
  • dy or dx respectively represents the point Y coordinate value or the coordinate value of X
  • the floor(dy) and floor(dx) respectively bring dy and dx into the floor function, and the obtained is not larger than dy
  • an integer of dx maxtrans is the maximum limit of transparency.
  • the graphic pattern displays a smooth optimized processing method, wherein the circular pattern comprises: a circle, an arc or a ring.
  • a graphic pattern display smoothing optimization processing system which comprises:
  • a data acquisition module configured to acquire a center coordinate on a circular pattern to be optimized, obtain coordinate values of all points on the graphic pattern according to the center coordinates and a radius of the circular pattern, and obtain transparency, red, green and blue of all points RGB parameters;
  • the adjacent compensation calculation module is configured to calculate, according to the maximum limit value of the transparency, a transparency compensation value of two points adjacent to a point corresponding to a coordinate of the circular pattern in the coordinate X-axis direction and the Y-axis direction;
  • a drawing point module configured to calculate a transparency compensation value of the corresponding point according to a transparency compensation value of the adjacent two points according to a principle that the transparency is gradually increased or decreased, and calculate the corresponding point Transparency compensation and RGB parameters of the corresponding points, re-drawing the corresponding points;
  • a repeating point module is used to sequentially re-draw all the points on the graphic pattern.
  • the graphic pattern display is a smooth optimization processing system, wherein the data acquisition module further includes:
  • the coordinate value calculation unit is configured to obtain the coordinate value of all points on the circular pattern according to the radius of the image pattern, with the center coordinate of the graphic pattern to be optimized as the origin of the coordinate axis.
  • the graphic pattern display is a smooth optimization processing system, wherein a calculation formula of a transparency compensation value of two adjacent points of a point corresponding to any one of the adjacent compensation calculation modules is:
  • tran (dx-floor(dx))*maxtrans+0.5;
  • the above tran is a transparency compensation value
  • dy or dx respectively represents the point Y coordinate value or the coordinate value of X
  • the floor(dy) and floor(dx) respectively bring dy and dx into the floor function, and the obtained is not larger than dy
  • an integer of dx maxtrans is the maximum limit of transparency.
  • the graphic pattern displays a smooth optimized processing system, wherein the circular pattern comprises: a circle, an arc or a ring.
  • a smart device wherein the graphic device display smoothing optimization processing system is a mobile phone, a tablet computer or a wearable device.
  • the invention provides a method, a system and a smart device for optimizing graphic pattern display smoothing.
  • a transparency compensation value of two points adjacent to a point corresponding to any coordinate in the X-axis direction and the Y-axis direction and calculating a transparency compensation value of the corresponding point according to the transparency compensation value of the adjacent two points, and calculating Transparency compensation of the corresponding point and RGB of the corresponding point Green Blue, red, green and blue) parameters, redraw all the points on the graphic pattern.
  • the method and system thereof are micro control units without an FPU (mcu, Microcontroller)
  • the intelligent device solves the problem of how to smoothly draw a circle, and provides support for the performance of the low-end low-power chip, and the method and system thereof of the invention are simple to implement, and have good coupling with the platform function, and effectively improve The intelligence of installing a low-power chip smart device.
  • FIG. 1 is a schematic diagram of a circular pattern displayed by a smart device with an FPU unit in a system chip in the prior art
  • FIG. 2 is a schematic diagram of a circular pattern displayed by a smart device without an FPU unit in a system chip in the prior art
  • FIG. 3 is a schematic diagram of the method according to the present invention for optimizing a circular pattern displayed by a smart device without an FPU unit in a system chip;
  • Figure 4 is a schematic view showing the steps of a specific embodiment of the method of the present invention.
  • FIG. 5 is a schematic diagram showing the principle structure of a system for performing smooth optimization of graphic pattern display provided by the invention.
  • the present invention provides an optimized processing method for the circular pattern display smoothing, as shown in FIG. Show, including:
  • Patterns include: circles, arcs or rings.
  • the graphic pattern to be optimized is first obtained, and the center coordinates of the circular pattern are positioned, and the coordinates of the center of the circular pattern are obtained, and the coordinate values of all the points on the pattern are obtained.
  • the circular pattern may be a circle, a ring or an arc, and the patterns all have a center and a radius, and the edges thereof are displayed as being unsmooth on a smart device without floating-point operations of the FPU unit.
  • the circular pattern is redrawn by setting the transparency. Specifically, the transparency of the points on the circular pattern is sequentially enhanced or sequentially weakened, and the circular pattern is clicked. It seems that there is a gradual process with the basemap, so that the circular pattern as a whole looks like a smooth arc. Therefore, in order to achieve the above effect, in this step, it is necessary to first set the compensation standard of transparency, that is, transparency.
  • the maximum limit is the reference, and the transparency of each point on the circular pattern is calculated separately, and the transparency compensation value corresponding to each point is calculated based on the maximum limit.
  • the acquisition of the transparency value of the dot and the calculation of the transparency compensation value may be sequentially performed from the X-axis direction and the Y-axis direction, respectively.
  • the transparency compensation value of the corresponding point is calculated according to the transparency compensation value of the adjacent two points, and the calculated transparency compensation of the corresponding point is The RGB parameters of the corresponding points are redrawn to the corresponding points.
  • each pixel has four components A, R, G, and B.
  • the left and right adjacent points of each point on the circle are processed by their transparency to make it A smooth transition effect with the reference coordinate point to achieve an anti-aliasing smooth round effect.
  • tran (dx-floor(dx)) ⁇ maxtrans + 0.5;
  • the above tran is a transparency compensation value
  • dy or dx respectively represents the point Y coordinate value or the coordinate value of X
  • the floor(dy) and floor(dx) respectively bring dy and dx into the floor function, and the obtained is not larger than dy
  • an integer of dx maxtrans is the maximum limit of transparency.
  • step S4 Repeat step S3 to sequentially re-draw all the points on the graphic pattern.
  • the display pattern optimized by the circular pattern according to the method described in the above steps S1-S4 can obtain the same effect as the circular pattern displayed by the high-performance chip in FIG. 1 after floating point calculation.
  • the step S1 further includes:
  • the center coordinate of the circular pattern to be positioned is selected as the origin of the coordinate axis, which simplifies the calculation of the coordinate point corresponding to the point on the pattern, and improves the processing data of the chip. effectiveness.
  • the method of the present invention is further described below with reference to the steps of the specific embodiment and the algorithm program for optimizing the painting garden.
  • the algorithm program for optimizing the circle is as follows:
  • Double temp sqrt(1 - ((i * i * 1.0f) / (radius * Radius)));
  • Gdi_cf_separate_color (GDI_COLOR_FORMAT_32, Circle_color, &a, &r, &g, &b);
  • Alpha gdi_cf_get_color(GDI_COLOR_FORMAT_32, Tran, r, g, b);
  • Alpha2 gdi_cf_get_color(GDI_COLOR_FORMAT_32, (maxTrans - tran), r, g, b);
  • Gdi_draw_pixel4 (x, y, i, floor(dy), alpha2)
  • Gdi_draw_pixel4 (x, y, i, floor(dy) + 1, alpha);
  • Gdi_cf_separate_color (GDI_COLOR_FORMAT_32, Circle_color, &a, &r, &g, &b);
  • Alpha gdi_cf_get_color(GDI_COLOR_FORMAT_32, Tran, r, g, b);
  • Alpha2 gdi_cf_get_color(GDI_COLOR_FORMAT_32, (maxTrans - tran), r, g, b);
  • Gdi_draw_pixel4 (x, y, floor(dx), i, alpha2)
  • Gdi_draw_pixel4 (x, y, floor(dx) + 1, i, alpha);
  • H1 first obtains the coordinates of the center of the circular pattern, and sets the compensation standard for the transparency, that is, sets the transparency to its maximum limit of 255.
  • H2 Obtain a transparency value of each point and an RGB value of each point according to the center coordinates and the radius value.
  • H311 in the Y-axis direction, calculate the transparency compensation value of the previous point of any point on the pattern and the transparency compensation value of the latter point, that is, if the point is the Y point, the Y-1 coordinate point and Y+1 are calculated.
  • H321 in the X-axis direction, calculate the transparency compensation value of the previous point of any point on the pattern and the transparency compensation value of the latter point, that is, if the point is the X point, the X-1 coordinate point and the X+1 are calculated.
  • the above tran is a transparency compensation value
  • dy or dx respectively represents the point Y coordinate value or the coordinate value of X
  • the floor(dy) and floor(dx) respectively bring dy and dx into the floor function, and the obtained is not larger than dy
  • an integer of dx maxtrans is the maximum limit of transparency.
  • H322 calculates a transparency compensation value of the Y point according to the calculated transparency compensation values of two adjacent points.
  • the important features of this part of the software also include pure C code to achieve a smooth circle, independent application programming interface (api, Application Programming Interface) package function, which brings extremely convenient portability and greatly reduces the coupling with the platform function.
  • the important features of this part of the software also include the independent algorithm, which achieves a good optimization effect.
  • the present invention further provides an optimized processing system for graphic pattern display smoothing, as shown in FIG. 5, including:
  • the data acquisition module 110 is configured to acquire the coordinates of the center of the circle on the circular pattern to be optimized, obtain the coordinate values of all the points on the graphic pattern according to the coordinates of the center of the circle and the radius of the circular pattern, and obtain the transparency and RGB parameters of all the points. ;
  • the adjacent compensation calculation module 120 is configured to calculate a transparency compensation value of two points adjacent to a point corresponding to any coordinate of the circular pattern in the coordinate X-axis direction and the Y-axis direction, based on the maximum limit value of the transparency;
  • a drawing point module 130 configured to calculate a transparency compensation value of the corresponding point according to a transparency compensation value of the adjacent two points according to a principle that the transparency gradually increases or decreases, and the calculated corresponding correspondence
  • the transparency compensation of the point and the RGB parameter of the corresponding point, and the corresponding point is redrawn;
  • the drawing point module 140 is used to sequentially re-draw all the points on the graphic pattern.
  • the data acquisition module further includes:
  • the coordinate value calculation unit is configured to obtain the coordinate value of all points on the circular pattern according to the radius of the image pattern, with the center coordinate of the graphic pattern to be optimized as the origin of the coordinate axis.
  • tran (dx-floor(dx)) ⁇ maxtrans + 0.5;
  • the above tran is a transparency compensation value
  • dy or dx respectively represents the point Y coordinate value or the coordinate value of X
  • the floor(dy) and floor(dx) respectively bring dy and dx into the floor function, and the obtained is not larger than dy
  • an integer of dx maxtrans is the maximum limit of transparency.
  • the graphic pattern displays a smooth optimized processing system, wherein the circular pattern comprises: a circle, an arc or a ring.
  • the present invention also discloses a smart device, which comprises the graphic pattern display smoothing optimization processing system, wherein the smart device is a mobile phone, a tablet computer or a wearable device. .
  • the invention provides an optimized processing method, system and intelligent device for graphic pattern display smoothing.
  • the circular pattern is calculated in the coordinate X-axis direction with the maximum limit of transparency as a reference.
  • a transparency compensation value of two points adjacent to a point corresponding to any coordinate in the Y-axis direction and calculating a transparency compensation value of the corresponding point according to the transparency compensation value of the adjacent two points, and calculating the The transparency compensation of the corresponding point and the RGB parameters of the corresponding point are redrawn to draw all the points on the graphic pattern.
  • the method and system thereof solve the problem of how to smoothly draw a circle for an mcu smart device without an FPU, provide support for the performance of a low-end low-power chip, and implement the method and system thereof according to the present invention. Simple, coupled with platform functions, effectively improving the intelligence of smart devices with low-power chips.
  • the program may be stored in a computer readable storage.
  • the program may include a process of an embodiment of the foregoing methods, wherein the storage medium may be a magnetic disk, an optical disk, a read-only storage memory, or a random storage memory.

Abstract

图形图案显示平滑的优化处理方法及其系统,通过得到图形图案上全部点的坐标值,以透明度的最大限值为基准,分别计算圆形图案在坐标X、Y轴方向上任意一坐标所对应点相邻两个点的透明度补偿值,根据该透明度补偿值计算出对应点的透明度补偿值,并以计算出的透明度补偿和RGB参数,重新画出图形图案上全部的点。

Description

圆形图案显示平滑的优化处理方法、系统及智能设备 技术领域
本发明涉及显示控制技术领域,尤其涉及的是一种图形图案显示平滑的优化处理方法、系统及智能设备。
背景技术
随着智能硬件的火热发展,各种硬件平台的智能手表解决方案也百花齐放,相对于苹果开发的高性能的A7 芯片,可以很好的进行浮点运算,对圆形图案进行平滑显示,如图1所示,而一些低性能的低功耗芯片也很具有优势,但是在图形显示上却有先天不足,因为低功耗芯片中没有浮点运算 (FPU,Float Point Unit)单元,不支持浮点运算.所以没有办法进行复杂的图形用户界面(GUI,Graphical User Interface)计算,去实现平滑圆的显示,如图2所示,导致显示的圆形图案边缘不光滑,不能满足用户对图案美观的需求。
因此,现有技术有待于进一步的改进。
技术问题
鉴于上述现有技术中的不足之处,本发明的目的在于为用户提供一种图形图案显示平滑的优化处理方法、系统及智能设备,克服现有技术中内部设置为低功耗芯片的智能终端上,显示出的圆形图案边缘不光滑的缺陷。
技术解决方案
本发明解决技术问题所采用的技术方案如下:
一种圆形图案显示平滑的优化处理方法,其中包括:
获取待优化圆形图案上的圆心坐标,所述圆形图案具有圆心和半径,且其边缘在无浮点运算单元进行浮点运算的智能设备上显示为不平滑;
以待优化图形图案的圆心坐标为坐标轴的原点,根据图像图案的半径,得到圆形图案上全部点的坐标值,同时还获取全部点的透明度和红绿蓝RGB参数;
以透明度的最大限值为基准,分别计算圆形图案在坐标X轴方向和Y轴方向上任意一坐标所对应点相邻两个点的透明度补偿值;
按照透明度逐渐增大或者逐渐减小的原则,根据所述相邻两个点的透明度补偿值计算出所述对应点的透明度补偿值,并以计算出的所述对应点的透明度补偿和所述对应点的RGB参数,重新画出所述对应点,直至依次重新画出所述图形图案上全部的点。
所述圆形图案显示平滑的优化处理方法,其中,所述任意一坐标所对应点相邻两个点的透明度补偿值的计算公式为:
当沿Y轴方向时,tran=(dy-floor(dy))*maxtrans+0.5,
当沿X轴方向时,tran=(dx-floor(dx))*maxtrans+0.5;
上述tran为透明度补偿值;dy或者dx分别表示该点Y坐标值或者X的坐标值;所述floor(dy)和floor(dx)分别为将dy和dx带入floor函数,得到的不大于dy和dx的整数;maxtrans为透明度的最大限值。
所述圆形图案显示平滑的优化处理方法,其中,所述圆形图案包括:圆、圆弧或者圆环。
一种圆形图案显示平滑的优化处理方法,其中,包括:
获取待优化圆形图案上的圆心坐标,根据所述圆心坐标及圆形图案的半径,得到图形图案上全部点的坐标值,同时还获取全部点的透明度和红绿蓝RGB参数;
以透明度的最大限值为基准,分别计算圆形图案在坐标X轴方向和Y轴方向上任意一坐标所对应点相邻两个点的透明度补偿值;
按照透明度逐渐增大或者逐渐减小的原则,根据所述相邻两个点的透明度补偿值计算出所述对应点的透明度补偿值,并以计算出的所述对应点的透明度补偿和所述对应点的RGB参数,重新画出所述对应点,直至依次重新画出所述图形图案上全部的点。
所述圆形图案显示平滑的优化处理方法,其中,所述根据所述圆心坐标及圆形图案的半径,得到图形图案上全部点的坐标值包括:
以待优化图形图案的圆心坐标为坐标轴的原点,根据图像图案的半径,得到圆形图案上全部点的坐标值。
所述图形图案显示平滑的优化处理方法,其中,所述任意一坐标所对应点相邻两个点的透明度补偿值的计算公式为:
当沿Y轴方向时,tran=(dy-floor(dy))*maxtrans+0.5,
当沿X轴方向时,tran=(dx-floor(dx))*maxtrans+0.5;
上述tran为透明度补偿值;dy或者dx分别表示该点Y坐标值或者X的坐标值;所述floor(dy)和floor(dx)分别为将dy和dx带入floor函数,得到的不大于dy和dx的整数;maxtrans为透明度的最大限值。
所述图形图案显示平滑的优化处理方法,其中,所述圆形图案包括:圆、圆弧或者圆环。
一种图形图案显示平滑的优化处理系统,其中,包括:
数据获取模块,用于获取待优化圆形图案上的圆心坐标,根据所述圆心坐标及圆形图案的半径,得到图形图案上全部点的坐标值,同时还获取全部点的透明度和红绿蓝RGB参数;
相邻补偿计算模块,用于以透明度的最大限值为基准,分别计算圆形图案在坐标X轴方向和Y轴方向上任意一坐标所对应点相邻两个点的透明度补偿值;
画点模块,用于按照透明度逐渐增大或者逐渐减小的原则,根据所述相邻两个点的透明度补偿值计算出所述对应点的透明度补偿值,并以计算出的所述对应点的透明度补偿和所述对应点的RGB参数,重新画出所述对应点;
重复画点模块,用于依次重新画出所述图形图案上全部的点。
所述图形图案显示平滑的优化处理系统,其中,所述数据获取模块还包括:
坐标值计算单元,用于以待优化图形图案的圆心坐标为坐标轴的原点,根据图像图案的半径,得到圆形图案上全部点的坐标值。
所述图形图案显示平滑的优化处理系统,其中,所述相邻补偿计算模块中任意一坐标所对应点相邻两个点的透明度补偿值的计算公式为:
当沿Y轴方向时,tran=(dy-floor(dy))*maxtrans+0.5,
当沿X轴方向时,tran=(dx-floor(dx))*maxtrans+0.5;
上述tran为透明度补偿值;dy或者dx分别表示该点Y坐标值或者X的坐标值;所述floor(dy)和floor(dx)分别为将dy和dx带入floor函数,得到的不大于dy和dx的整数;maxtrans为透明度的最大限值。
所述图形图案显示平滑的优化处理系统,其中,所述圆形图案包括:圆、圆弧或者圆环。
一种智能设备,其中,包括所述的图形图案显示平滑的优化处理系统,所述智能设备为手机、平板电脑或穿戴设备。
有益效果
有益效果,本发明提供了一种图形图案显示平滑的优化处理方法、系统及智能设备,通过得到图形图案上全部点的坐标值,以透明度的最大限值为基准,分别计算圆形图案在坐标X轴方向和Y轴方向上任意一坐标所对应点相邻两个点的透明度补偿值,根据所述相邻两个点的透明度补偿值计算出所述对应点的透明度补偿值,并以计算出的所述对应点的透明度补偿和所述对应点的RGB(Red Green Blue,红绿蓝)参数,重新画出图形图案上全部的点。所述方法及其系统,为不带有FPU的微控制单元(mcu,Microcontroller Unit)智能设备解决了如何平滑画圆的问题,为低端的低功耗芯片的性能提供了支持,并且本发明所述方法及其系统,实现简单,与平台函数耦合性好,有效的提高了安装有低功耗芯片智能设备的智能性。
附图说明
图1是现有技术中系统芯片中带有FPU单元的智能设备显示的圆形图案的示意图;
图2是现有技术中系统芯片中不带有FPU单元的智能设备显示的圆形图案的示意图;
图3为本发明所述方法对系统芯片中不带有FPU单元的智能设备显示的圆形图案进行优化处理后的示意图;
图4是本发明所述方法具体实施例的步骤示意图;
图5是发明所提供的一种图形图案显示平滑的优化处理的系统的原理结构示意图。
本发明的最佳实施方式
为使本发明的目的、技术方案及优点更加清楚、明确,以下参照附图并举实施例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用于解释本发明,并不用于限定本发明。
为了解决现有技术中智能设备中低功耗芯片不能进行浮点计算,无法实现圆形图案的平滑显示的缺陷,本发明提供了一种圆形图案显示平滑的优化处理方法,如图3所示,包括:
S1、获取待优化圆形图案上的圆心坐标,根据所述圆心坐标及圆形图案的半径,得到图形图案上全部点的坐标值,同时还获取全部点的透明度和RGB参数;所述圆形图案包括:圆、圆弧或者圆环。
本方法中首先获取待优化处理的图形图案,对其圆形图案的圆心坐标进行定位,获取该圆形图案的圆心坐标和半径后,获取该图案上全部点的坐标值。
具体的,所述圆形图案可以为圆、圆环或者圆弧,这些图案都具有圆心和半径,且其边缘在无FPU单元进行浮点运算的智能设备上显示为不平滑。
S2、以透明度的最大限值为基准,分别计算圆形图案在坐标X轴方向和Y轴方向上任意一坐标所对应点相邻两个点的透明度补偿值。
为了让圆形图案看起来比较平滑,本发明中通过设置透明度的方式对圆形图案进行重新画点,具体的,为使圆形图案上点的透明度依次增强或者依次减弱,圆形图案上点看起来能够跟底图有一个渐变的过程,从而达到圆形图案整体看起来会是一个平滑的圆弧,因此为了达到上述效果,本步骤中,需要首先设置透明度的补偿标准,即以透明度的最大限值为基准,分别计算圆形图案上每一个点的透明度,以最大限值为基准,计算每个点所对应的透明度补偿值。
具体的,在实施例中,可以分别从X轴方向和Y轴方向依次进行点的透明度值的获取,以及透明度补偿值的计算。
S3、按照透明度逐渐增大或者逐渐减小的原则,根据所述相邻两个点的透明度补偿值计算出所述对应点的透明度补偿值,并以计算出的所述对应点的透明度补偿和所述对应点的RGB参数,重新画出所述对应点。
由于是采用透明度逐渐增大或者逐渐减少,因此在对每个点的具体补偿值进行计算时,需要考虑其相邻两个点的透明度补充值,并且以这两个相邻的透明度补偿值为基准,对该点进行透明度补偿。具体的,使用渐变灰滤镜的原理,每一个像素点都有A,R,G,B四个分量,在圆上的每一个点的左右相邻点取它们的透明度进行算法处理,使之与基准坐标点达到平滑过渡的效果,从而达到抗锯齿平滑圆的效果。
在本步骤中任意一坐标所对应点相邻两个点的透明度补偿值的计算公式为:
当沿Y轴方向时,tran=(dy-floor(dy))×maxtrans+0.5,
当沿X轴方向时,tran=(dx-floor(dx))×maxtrans+0.5;
上述tran为透明度补偿值;dy或者dx分别表示该点Y坐标值或者X的坐标值;所述floor(dy)和floor(dx)分别为将dy和dx带入floor函数,得到的不大于dy和dx的整数;maxtrans为透明度的最大限值。
S4、重复步骤S3,依次重新画出所述图形图案上全部的点。
采用上述步骤S1-S4所述方法对圆形图案进行优化后的显示图案,可以得到其效果与图1中高性能芯片经过浮点计算后,显示的圆形图案效果相同。
所述步骤S1还包括:
S11、以待优化图形图案的圆心坐标为坐标轴的原点,根据图像图案的半径,得到圆形图案上全部点的坐标值。
为了方便透明度补偿值的计算,在具体实施例中,选择将定位出的圆形图案的圆心坐标为坐标轴的原点,简化了计算图案上点所对应坐标点的运算,提高了芯片处理数据的效率。
下面以其具体实施例的步骤,结合优化画园的算法程序,对本发明所述方法进一步说明,如下为所述优化画圆的算法程序:
void gdi_draw_anti_circle(S32x, S32y, S32 radius, gdi_color circle_color)
{
S32 quarter = (S32)(0.707 * radius + 0.5);
S32 i;
double dx, dy;
double delt;
U32 tran;
U32 alpha, alpha2;
U32 maxTrans = 0xFF;
kal_uint32 a, r, g, b;
for (i = 0; i <= quarter; ++i)
{
double temp = sqrt(1 - ((i * i * 1.0f) / (radius * radius)));
dy = radius * temp;
delt = dy - floor(dy);
tran = (U32)(delt * maxTrans + 0.5);
gdi_cf_separate_color(GDI_COLOR_FORMAT_32, circle_color, &a, &r, &g, &b);
alpha = gdi_cf_get_color(GDI_COLOR_FORMAT_32, tran, r, g, b);
alpha2 = gdi_cf_get_color(GDI_COLOR_FORMAT_32, (maxTrans - tran), r, g, b);
gdi_draw_pixel4(x, y, i, floor(dy), alpha2);
gdi_draw_pixel4(x, y, i, floor(dy) + 1, alpha);
}
for (i = 0; i <= quarter; ++i)
{
dx = radius * sqrt(1 - (i * i * 1.0f) / (radius * radius));
delt = dx - floor(dx);
tran = (U32)(delt * maxTrans + 0.5);
gdi_cf_separate_color(GDI_COLOR_FORMAT_32, circle_color, &a, &r, &g, &b);
alpha = gdi_cf_get_color(GDI_COLOR_FORMAT_32, tran, r, g, b);
alpha2 = gdi_cf_get_color(GDI_COLOR_FORMAT_32, (maxTrans - tran), r, g, b);
gdi_draw_pixel4(x, y, floor(dx), i, alpha2);
gdi_draw_pixel4(x, y, floor(dx) + 1, i, alpha);
}
}
如图4所示,上述优化算法程序所包括的主要步骤为:
H1、首先获取圆形图案的圆心坐标,以及设置透明度的补偿标准,即设置透明度为其最大限值255。
H2、根据所述圆心坐标和半径值,获取每个点的透明度值和每个点的RGB值。
H311、在Y轴方向上,计算图案上任意一个点的前一点的透明度补偿值及其后一点的透明度补偿值,即若该点为Y点时,则计算Y-1坐标点和Y+1坐标点的透明度补偿值,该补偿值的计算公式为:tran=(dy-floor(dy))*maxtrans+0.5。
H321,在X轴方向上,计算图案上任意一个点的前一点的透明度补偿值及其后一点的透明度补偿值,即若该点为X点时,则计算X-1坐标点和X+1坐标点的透明度补偿值,该补偿值的计算公式为:tran=(dx-floor(dx))*maxtrans+0.5。
上述tran为透明度补偿值;dy或者dx分别表示该点Y坐标值或者X的坐标值;所述floor(dy)和floor(dx)分别为将dy和dx带入floor函数,得到的不大于dy和dx的整数;maxtrans为透明度的最大限值。
H312,根据计算出的相邻两点的透明度补偿值,计算该Y点的透明度补偿值。
H322,根据计算出的相邻两点的透明度补偿值,计算该Y点的透明度补偿值。
H313,采用同样的方法,重新画出Y+1坐标点对应的点。
H323,采用同样的方法,重新画出X+1坐标点对应的点。
上述方法,在为不带FPU的mcu智能设备,比如:智能手表,解决了在cost down的同时保证了GUI效果,为产品带来更大的竞争力,该部分软件重要特征还包括纯C代码实现了平滑画圆,独立的应用程序编程接口(api,Application Programming Interface)封装函数,带来了极其方便的可移植性及极大的降低了与平台函数的耦合性,该部分软件重要特征还包括独立完成的算法,取得了很好的优化处理效果。
在上述方法的前提下,本发明还提供了一种图形图案显示平滑的优化处理系统,如图5所示,包括:
数据获取模块110,用于获取待优化圆形图案上的圆心坐标,根据所述圆心坐标及圆形图案的半径,得到图形图案上全部点的坐标值,同时还获取全部点的透明度和RGB参数;
相邻补偿计算模块120,用于以透明度的最大限值为基准,分别计算圆形图案在坐标X轴方向和Y轴方向上任意一坐标所对应点相邻两个点的透明度补偿值;
画点模块130,用于按照透明度逐渐增大或者逐渐减小的原则,根据所述相邻两个点的透明度补偿值计算出所述对应点的透明度补偿值,并以计算出的所述对应点的透明度补偿和所述对应点的RGB参数,重新画出所述对应点;
重复画点模块140,用于依次重新画出所述图形图案上全部的点。
所述数据获取模块还包括:
坐标值计算单元,用于以待优化图形图案的圆心坐标为坐标轴的原点,根据图像图案的半径,得到圆形图案上全部点的坐标值。
所述相邻补偿计算模块中任意一坐标所对应点相邻两个点的透明度补偿值的计算公式为:
当沿Y轴方向时,tran=(dy-floor(dy))×maxtrans+0.5,
当沿X轴方向时,tran=(dx-floor(dx))×maxtrans+0.5;
上述tran为透明度补偿值;dy或者dx分别表示该点Y坐标值或者X的坐标值;所述floor(dy)和floor(dx)分别为将dy和dx带入floor函数,得到的不大于dy和dx的整数;maxtrans为透明度的最大限值。
所述图形图案显示平滑的优化处理系统,其中,所述圆形图案包括:圆、圆弧或者圆环。
在上述图形图案显示平滑的优化处理系统的基础上,本发明还公开了一种智能设备,其中包括所述的图形图案显示平滑的优化处理系统,所述智能设备为手机、平板电脑或穿戴设备。
本发明提供了一种图形图案显示平滑的优化处理方法、系统及智能设备,通过得到图形图案上全部点的坐标值,以透明度的最大限值为基准,分别计算圆形图案在坐标X轴方向和Y轴方向上任意一坐标所对应点相邻两个点的透明度补偿值,根据所述相邻两个点的透明度补偿值计算出所述对应点的透明度补偿值,并以计算出的所述对应点的透明度补偿和所述对应点的RGB参数,重新画出图形图案上全部的点。所述方法及其系统,为不带有FPU的mcu智能设备解决了如何平滑画圆的问题,为低端的低功耗芯片的性能提供了支持,并且本发明所述方法及其系统,实现简单,与平台函数耦合性好,有效的提高了安装有低功耗芯片智能设备的智能性。
可以理解的是,对本领域普通技术人员来说,可以理解实现上述实施例方法中的全部或部分流程可以通过计算机程序指令相关的硬件来完成,所述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程,其中,所述的存储介质可为磁碟、光盘、只读存储记忆体或者随机存储记忆体等。

Claims (17)

  1. 一种圆形图案显示平滑的优化处理方法,其中包括:
    获取待优化圆形图案上的圆心坐标,所述圆形图案具有圆心和半径,且其边缘在无浮点运算单元进行浮点运算的智能设备上显示为不平滑;
    以待优化图形图案的圆心坐标为坐标轴的原点,根据图像图案的半径,得到圆形图案上全部点的坐标值,同时还获取全部点的透明度和红绿蓝RGB参数;
    以透明度的最大限值为基准,分别计算圆形图案在坐标X轴方向和Y轴方向上任意一坐标所对应点相邻两个点的透明度补偿值;
    按照透明度逐渐增大或者逐渐减小的原则,根据所述相邻两个点的透明度补偿值计算出所述对应点的透明度补偿值,并以计算出的所述对应点的透明度补偿和所述对应点的RGB参数,重新画出所述对应点,直至依次重新画出所述图形图案上全部的点。
  2. 根据权利要求1所述图形图案显示平滑的优化处理方法,其中所述任意一坐标所对应点相邻两个点的透明度补偿值的计算公式为:
    当沿Y轴方向时,tran=(dy-floor(dy))*maxtrans+0.5,
    当沿X轴方向时,tran=(dx-floor(dx))*maxtrans+0.5;
    上述tran为透明度补偿值;dy或者dx分别表示该点Y坐标值或者X的坐标值;所述floor(dy)和floor(dx)分别为将dy和dx带入floor函数,得到的不大于dy和dx的整数;maxtrans为透明度的最大限值。
  3. 根据权利要求1所述图形图案显示平滑的优化处理方法,其中所述圆形图案包括:圆、圆弧或者圆环。
  4. 根据权利要求2所述图形图案显示平滑的优化处理方法,其中所述圆形图案包括:圆、圆弧或者圆环。
  5. 一种圆形图案显示平滑的优化处理方法,其中包括:
    获取待优化圆形图案上的圆心坐标,根据所述圆心坐标及圆形图案的半径,得到图形图案上全部点的坐标值,同时还获取全部点的透明度和红绿蓝RGB参数;
    以透明度的最大限值为基准,分别计算圆形图案在坐标X轴方向和Y轴方向上任意一坐标所对应点相邻两个点的透明度补偿值;
    按照透明度逐渐增大或者逐渐减小的原则,根据所述相邻两个点的透明度补偿值计算出所述对应点的透明度补偿值,并以计算出的所述对应点的透明度补偿和所述对应点的RGB参数,重新画出所述对应点,直至依次重新画出所述图形图案上全部的点。
  6. 根据权利要求5所述圆形图案显示平滑的优化处理方法,其中所述根据所述圆心坐标及圆形图案的半径,得到图形图案上全部点的坐标值包括:
    以待优化图形图案的圆心坐标为坐标轴的原点,根据图像图案的半径,得到圆形图案上全部点的坐标值。
  7. 根据权利要求6所述图形图案显示平滑的优化处理方法,其中所述任意一坐标所对应点相邻两个点的透明度补偿值的计算公式为:
    当沿Y轴方向时,tran=(dy-floor(dy))*maxtrans+0.5,
    当沿X轴方向时,tran=(dx-floor(dx))*maxtrans+0.5;
    上述tran为透明度补偿值;dy或者dx分别表示该点Y坐标值或者X的坐标值;所述floor(dy)和floor(dx)分别为将dy和dx带入floor函数,得到的不大于dy和dx的整数;maxtrans为透明度的最大限值。
  8. 根据权利要求5所述图形图案显示平滑的优化处理方法,其中所述圆形图案包括:圆、圆弧或者圆环。
  9. 根据权利要求6所述图形图案显示平滑的优化处理方法,其中所述圆形图案包括:圆、圆弧或者圆环。
  10. 根据权利要求7所述图形图案显示平滑的优化处理方法,其中所述圆形图案包括:圆、圆弧或者圆环。
  11. 一种图形图案显示平滑的优化处理系统,其中包括:
    数据获取模块,用于获取待优化圆形图案上的圆心坐标,根据所述圆心坐标及圆形图案的半径,得到图形图案上全部点的坐标值,同时还获取全部点的透明度和红绿蓝RGB参数;
    相邻补偿计算模块,用于以透明度的最大限值为基准,分别计算圆形图案在坐标X轴方向和Y轴方向上任意一坐标所对应点相邻两个点的透明度补偿值;
    画点模块,用于按照透明度逐渐增大或者逐渐减小的原则,根据所述相邻两个点的透明度补偿值计算出所述对应点的透明度补偿值,并以计算出的所述对应点的透明度补偿和所述对应点的RGB参数,重新画出所述对应点;
    重复画点模块,用于依次重新画出所述图形图案上全部的点。
  12. 根据权利要求11所述图形图案显示平滑的优化处理系统,其中所述数据获取模块还包括:
    坐标值计算单元,用于以待优化图形图案的圆心坐标为坐标轴的原点,根据图像图案的半径,得到圆形图案上全部点的坐标值。
  13. 根据权利要求12所述图形图案显示平滑的优化处理系统,其中所述相邻补偿计算模块中任意一坐标所对应点相邻两个点的透明度补偿值的计算公式为:
    当沿Y轴方向时,tran=(dy-floor(dy))*maxtrans+0.5,
    当沿X轴方向时,tran=(dx-floor(dx))*maxtrans+0.5;
    上述tran为透明度补偿值;dy或者dx分别表示该点Y坐标值或者X的坐标值;所述floor(dy)和floor(dx)分别为将dy和dx带入floor函数,得到的不大于dy和dx的整数;maxtrans为透明度的最大限值。
  14. 根据权利要求11所述图形图案显示平滑的优化处理系统,其中所述圆形图案包括:圆、圆弧或者圆环。
  15. 根据权利要求12所述图形图案显示平滑的优化处理系统,其中所述圆形图案包括:圆、圆弧或者圆环。
  16. 根据权利要求13所述图形图案显示平滑的优化处理系统,其中所述圆形图案包括:圆、圆弧或者圆环。
  17. 一种智能设备,其中其包括权利要求11所述的图形图案显示平滑的优化处理系统,所述智能设备为手机、平板电脑或穿戴设备。
PCT/CN2016/088822 2015-11-25 2016-07-06 圆形图案显示平滑的优化处理方法、系统及智能设备 WO2017088485A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/546,805 US10438324B2 (en) 2015-11-25 2016-07-06 Optimizating method, system, and smart device to display circular patterns smoothly

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510828826.1 2015-11-25
CN201510828826.1A CN105427258B (zh) 2015-11-25 2015-11-25 圆形图案显示平滑的优化处理方法、系统及智能设备

Publications (1)

Publication Number Publication Date
WO2017088485A1 true WO2017088485A1 (zh) 2017-06-01

Family

ID=55505439

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/088822 WO2017088485A1 (zh) 2015-11-25 2016-07-06 圆形图案显示平滑的优化处理方法、系统及智能设备

Country Status (3)

Country Link
US (1) US10438324B2 (zh)
CN (1) CN105427258B (zh)
WO (1) WO2017088485A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10438324B2 (en) 2015-11-25 2019-10-08 Huizhou Tcl Mobile Communication Co., Ltd. Optimizating method, system, and smart device to display circular patterns smoothly

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107610143B (zh) 2017-09-29 2020-05-19 上海天马有机发光显示技术有限公司 图像处理方法、图像处理装置、图像处理系统及显示装置
CN107644410B (zh) 2017-09-29 2020-05-19 上海天马有机发光显示技术有限公司 图像处理方法、图像处理装置、图像处理系统及显示装置
CN110539639B (zh) * 2019-08-28 2020-12-01 南斗六星系统集成有限公司 一种基于仪表的渐变圆环显示方法、介质、仪表和装置
CN114756316A (zh) * 2022-03-29 2022-07-15 南斗六星系统集成有限公司 基于液晶屏的表情互动的显示方法、介质、仪表和装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770637A (zh) * 2009-12-28 2010-07-07 广东威创视讯科技股份有限公司 图形的抓取处理方法及处理装置
CN103559690A (zh) * 2013-11-05 2014-02-05 北京京东尚科信息技术有限公司 一种实现图像边沿平滑的方法
CN103617640A (zh) * 2013-11-13 2014-03-05 南京航空航天大学 一种线条图形反走样显示方法
CN105427258A (zh) * 2015-11-25 2016-03-23 惠州Tcl移动通信有限公司 圆形图案显示平滑的优化处理方法、系统及智能设备

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7764287B2 (en) * 2003-07-07 2010-07-27 Arcsoft, Inc. Graphic engine for approximating a quadratic bezier curve in a resource-constrained device
CN100453317C (zh) * 2004-01-05 2009-01-21 明基电通股份有限公司 改善锯齿效应的影像处理方法
US9105113B1 (en) * 2004-12-15 2015-08-11 Nvidia Corporation Method and system for efficiently rendering circles
US8559746B2 (en) * 2008-09-04 2013-10-15 Silicon Image, Inc. System, method, and apparatus for smoothing of edges in images to remove irregularities
KR101682147B1 (ko) * 2010-04-05 2016-12-05 삼성전자주식회사 변환 및 역변환에 기초한 보간 방법 및 장치
CN102262785B (zh) * 2010-05-24 2014-01-29 珠海扬智电子有限公司 点阵字型的边缘平滑方法、缩放方法
JP2013021636A (ja) * 2011-07-14 2013-01-31 Sony Corp 画像処理装置および方法、学習装置および方法、プログラム、並びに記録媒体
KR102226166B1 (ko) * 2014-02-05 2021-03-10 삼성전자 주식회사 전자장치에서 플랙서블 디스플레이의 표시 제어 방법 및 장치
CN103996170B (zh) * 2014-04-28 2017-01-18 深圳市华星光电技术有限公司 一种具有超高解析度的图像边缘锯齿消除方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770637A (zh) * 2009-12-28 2010-07-07 广东威创视讯科技股份有限公司 图形的抓取处理方法及处理装置
CN103559690A (zh) * 2013-11-05 2014-02-05 北京京东尚科信息技术有限公司 一种实现图像边沿平滑的方法
CN103617640A (zh) * 2013-11-13 2014-03-05 南京航空航天大学 一种线条图形反走样显示方法
CN105427258A (zh) * 2015-11-25 2016-03-23 惠州Tcl移动通信有限公司 圆形图案显示平滑的优化处理方法、系统及智能设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10438324B2 (en) 2015-11-25 2019-10-08 Huizhou Tcl Mobile Communication Co., Ltd. Optimizating method, system, and smart device to display circular patterns smoothly

Also Published As

Publication number Publication date
US10438324B2 (en) 2019-10-08
US20180012338A1 (en) 2018-01-11
CN105427258A (zh) 2016-03-23
CN105427258B (zh) 2018-09-14

Similar Documents

Publication Publication Date Title
WO2017088485A1 (zh) 圆形图案显示平滑的优化处理方法、系统及智能设备
WO2018151505A1 (en) Electronic device and method for displaying screen thereof
WO2018155824A1 (en) Display apparatus and control method thereof
WO2014104472A1 (en) Method and apparatus for dual display
WO2018088806A1 (ko) 영상처리장치 및 영상처리방법
EP3092572A1 (en) Method and apparatus for screen sharing
WO2017076039A1 (zh) 一种智能设备多屏幕运行实现方法及其系统
WO2014189275A1 (en) Apparatus and method of recognizing external device in a communication system
WO2018090431A1 (zh) 画面亮度调整方法及画面亮度调整装置
WO2021029505A1 (en) Electronic apparatus and control method thereof
WO2020197018A1 (en) Image processing apparatus and image processing method thereof
WO2019045499A1 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND COMPUTER-READABLE RECORDING MEDIUM
WO2016072678A1 (en) User terminal device and method for controlling user terminal device thereof
WO2018161601A1 (zh) 屏幕背光调节方法、装置、存储介质及电子设备
WO2015020437A1 (en) Electronic device and method for editing object using touch input
WO2019231138A1 (en) Image display apparatus and operating method of the same
WO2018145597A1 (zh) 基于移动终端的屏幕补光拍照方法及系统、移动终端
WO2017206870A1 (zh) 一种传感器关闭方法、装置、存储介质及电子设备
WO2020184935A1 (en) Electronic apparatus and method for controlling thereof
WO2020159185A1 (en) Electronic device and control method thereof
WO2019054698A1 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND COMPUTER-READABLE RECORDING MEDIUM
WO2021075758A1 (en) Electronic apparatus and controlling method thereof
WO2012034469A1 (zh) 基于手势的人机交互方法及系统、计算机存储介质
WO2020141769A1 (en) Display apparatus, display system having the same, and method thereof
WO2017049436A1 (zh) 一种在安卓设备上进行图标排布的方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16867712

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15546805

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16867712

Country of ref document: EP

Kind code of ref document: A1