CN108648249A - A kind of image rendering method, device and intelligent wearable device - Google Patents

A kind of image rendering method, device and intelligent wearable device Download PDF

Info

Publication number
CN108648249A
CN108648249A CN201810437065.0A CN201810437065A CN108648249A CN 108648249 A CN108648249 A CN 108648249A CN 201810437065 A CN201810437065 A CN 201810437065A CN 108648249 A CN108648249 A CN 108648249A
Authority
CN
China
Prior art keywords
layer
rendering
stacking element
stacking
accelerating engine
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
Application number
CN201810437065.0A
Other languages
Chinese (zh)
Other versions
CN108648249B (en
Inventor
王传辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN201810437065.0A priority Critical patent/CN108648249B/en
Publication of CN108648249A publication Critical patent/CN108648249A/en
Application granted granted Critical
Publication of CN108648249B publication Critical patent/CN108648249B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Image Generation (AREA)

Abstract

The invention discloses a kind of image rendering methods, including call figure accelerating engine, and corresponding stacking element is selected to be added separately in each figure layer out of stacking element to be shown;Start figure accelerating engine and carry out image rendering operations, obtains the rendering output of this operation;Judge whether stacking element to be shown, if in the presence of, figure accelerating engine is called again, the rendering output of last time operation is added in a figure layer, it selects several stacking elements to be added separately in remaining figure layer out of remaining stacking element to be shown, starts figure accelerating engine and carry out image rendering;If stacking element to be shown is not present, by the current image for rendering output and being completed as rendering.This invention simplifies programmings, directly the limited figure accelerating engine of function can be utilized to complete the image rendering scene of various complexity, expand application range;Invention additionally discloses a kind of device and intelligent wearable device based on the above method.

Description

A kind of image rendering method, device and intelligent wearable device
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of image rendering method.The invention further relates to one Image rendering device and intelligent wearable device of the kind based on the above method.
Background technology
It is continuously increased recently as embedded device (Intelligent bracelet, smartwatch etc.) function, equipment is to be shown Content also becomes increasingly complex, and the processing capacity of embedded MCU is not universal strong.So increasing to aobvious in order to meet Show the requirement of function, while reducing the load of MCU to reduce power consumption, extend the cruise duration of equipment, many MCU are integrated with figure Shape accelerating engine is used for rendering content to be shown, and the process of image rendering is that multiple stacking elements are added to figure to add After in the figure layer of fast engine, multiple figure layers are carried out with the process of the process of hybrid operation.
However, being limited to the conditions such as the volume of embedded device, cost and power consumption, this figure accelerating engine can be provided Function still compare limitation, such as:The figure layer number of offer is fewer;Each figure layer can only provide simple function --- it renders Single shape is (such as:Rectangle, circle etc.), the stacking element of each figure layer storage is only capable of as fixed picture format (such as:Rgb format, Yuv format etc.) or set form font is (such as:4 color depths, 8 color depths etc.) etc..This limited figure of function Accelerating engine will be helpless for the case where many more complicated (it is many that element is laminated) or MCU is needed to do many places Science and engineering is made.
In order to realize that these complicated scenes, present widespread practice are by way of software, writing program in advance will Same type or the element of position overlapping are parsed into a memory cache module, then integrally regard this memory buffer module as one A display pel is put into a figure layer, and programming is complex, and the feelings less in the element that same type or position are overlapped Under condition, can not the function of image rendering directly be completed using the limited figure accelerating engine of function, limited degree is big.
Therefore, how a kind of image rendering method, device that can simplify programming reduction using limited degree is provided And intelligent wearable device is the current problem to be solved of those skilled in the art.
Invention content
The object of the present invention is to provide a kind of image rendering methods, can carry out stacking element in not additional designs program On the basis of parsing combination, a large amount of stacking members are directly realized by using the limited figure accelerating engine of function in current embedded system The image rendering operations of element, expand the application range of figure accelerating engine;It is a further object of the present invention to provide one kind to be based on The image rendering device and intelligent wearable device of the above method.
In order to solve the above technical problems, the present invention provides a kind of image rendering methods, including:
Step s1:Figure accelerating engine is called for the first time, and corresponding stacking element point is selected out of stacking element to be shown It is not added in each figure layer of the figure accelerating engine, enters step s2;
Step s2:Start the figure accelerating engine and image rendering behaviour is carried out to the stacking element in each figure layer Make, obtains the rendering output of this operation, enter step s3;
Step s3:Judge whether stacking element to be shown, and if it exists, enter step s4, if being not present, will work as The rendering output of preceding operation is as the image after the completion of rendering;
Step s4:The figure accelerating engine is called again, and the rendering output of last time operation, which is added to the figure, to be added In one figure layer of fast engine, and several stacking elements are selected to be added separately to institute out of remaining stacking element to be shown It states in the remaining figure layer of figure accelerating engine, enters step s2.
Preferably, further include before step s1:
Stacking element all to be shown is ranked up;
Correspondingly, in the step s1 and the step s4, according to the ranking results of the stacking element to be shown, Element is laminated in sequential selection accordingly successively out of remaining stacking element to be shown, and the stacking element of selection is added To corresponding figure layer.
Preferably, in the step s1 and the step s4, the stacking element of selection is added to corresponding figure layer It is interior, further include later:
According to the sequence of the stacking element to be shown, to each figure layer progress sequence in the figure accelerating engine Number;
Correspondingly, the process of the step s2 is specially:
According to the number of the figure layer, two figure layers not rendered of sequential selection successively, to it includes stacking element Image rendering operations are carried out, this rendering result is obtained;
The number order for continuing the figure layer selects next figure layer not rendered, by it includes stacking element with it is upper Secondary rendering result carries out image rendering operations, obtains this rendering result;This step operation is repeated, until in whole figure layers Stacking element, which renders, to be finished.
Preferably, described image Rendering operations are specially Alpha hybrid operations.
Preferably, in step s4, the rendering output of last time operation is added to a figure layer of the figure accelerating engine Before interior, further include:
By the picture format of the rendering output of last time operation, is converted to the figure accelerating engine input side and receives the wash with watercolours The picture format that the figure layer of dye output is supported.
Preferably, two stacking elements carry out Alpha hybrid operations, and the process for obtaining mixing resultant is specially:
By mixed relationship formula, by each channel components of each pixel to be mixed in two stacking elements to be mixed It is mixed successively with Alpha values, obtains the mixing resultant of each pixel to be mixed;The channel components include red point Magnitude, blue color component value and green component values;
The mixed relationship formula is specially:
Output α=Dst α+Src α-Dst α Src α
OutputP:The value of P channel component in the mixing resultant of the pixel to be mixed;P is red blue or green Color;
Outputα:Alpha channel values in the mixing resultant of the pixel to be mixed;
DstP:The P channel component value of the pixel to be mixed in purpose figure layer;
SrcP:The P channel component value of the pixel to be mixed in the figure layer of source;
Dstα:The Alpha values of the pixel to be mixed in the purpose figure layer;
Srcα:The Alpha values of the pixel to be mixed in the source figure layer.
Preferably, the stacking element includes font or geometric figure.
Preferably, the figure accelerating engine is 2D figure accelerating engines.
In order to solve the above technical problems, the present invention also provides a kind of image rendering devices, including:
First figure layer add module selects phase for calling figure accelerating engine for the first time out of stacking element to be shown It answers a stacking element to be added separately in each figure layer of the figure accelerating engine, triggers engine calling module;
The engine calling module, for start the figure accelerating engine to the stacking element in each figure layer into Row image rendering operations obtain the rendering output of this operation;Trigger judgment module;
The judgment module, for judging whether stacking element to be shown, and if it exists, triggering the second figure layer addition Module, if being not present, by the rendering output of current operation as the image after the completion of rendering;
The second figure layer add module, for calling the figure accelerating engine again, the rendering that last time is operated is defeated Go out in a figure layer for being added to the figure accelerating engine, and several layers are selected out of remaining stacking element to be shown Folded element is added separately in the remaining figure layer of the figure accelerating engine, triggers the engine calling module.
In order to solve the above technical problems, the present invention also provides a kind of intelligent wearable devices, including:
Memory, for storing computer program;
Processor realizes the step of the image rendering method as described in any of the above item when for executing the computer program Suddenly.
The present invention provides a kind of image rendering methods, call figure accelerating engine several times, call figure to accelerate every time When engine, input addition when running the output after preceding calling figure shape accelerating engine as this figure accelerating engine To a figure layer, and the stacking element of corresponding number is selected to be added to remaining figure layer out of remaining stacking element to be shown It is interior, image rendering operations then are carried out to the content of each figure layer, repeat aforesaid operations, until all stacking elements to be shown It renders until finishing.As it can be seen that the present invention by the way of it will export and feed back to input, can utilize in current embedded system The limited figure accelerating engine of function is directly realized by the image rendering operations of a large amount of stacking elements, to complete the figure of various complexity As render scenes, the parsing combination of stacking element is carried out without additional designs program, is simplified in image rendering process Programming, and reduce limited degree of the figure accelerating engine when carrying out image rendering application, expand figure acceleration The application range of engine.The present invention also provides a kind of image rendering device and intelligent wearable device based on the above method, also has There is above-mentioned advantage.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to institute in the prior art and embodiment Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the present invention Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings Obtain other attached drawings.
Fig. 1 is a kind of flow chart of the process of image rendering method provided by the invention;
Fig. 2 is a kind of schematic diagram of the specific embodiment of image rendering method provided by the invention;
Fig. 3 is a kind of schematic diagram of another specific embodiment of image rendering method provided by the invention;
Fig. 4 is a kind of structural schematic diagram of image rendering device provided by the invention.
Specific implementation mode
Core of the invention is to provide a kind of image rendering method, can carry out stacking element in not additional designs program On the basis of parsing combination, a large amount of stacking members are directly realized by using the limited figure accelerating engine of function in current embedded system The image rendering operations of element, expand the application range of figure accelerating engine;Another core of the present invention is to provide one kind and is based on The image rendering device and intelligent wearable device of the above method.
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art The every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Shown in Figure 1 the present invention provides a kind of image rendering method, Fig. 1 is a kind of image wash with watercolours provided by the invention The flow chart of the process of dyeing method;This method includes:
Step s1:Figure accelerating engine is called for the first time, and corresponding stacking element point is selected out of stacking element to be shown It is not added in each figure layer of figure accelerating engine, enters step s2;
Wherein, it is provided with multiple figure layers in figure accelerating engine, a stacking element can be added in each figure layer;Figure layer The type for the stacking element that can be added in several and each figure layer is related with the type of figure accelerating engine, some figure layers may The stacking element of fixed type can be only added, and therefore the type that some figure layers may not limit stacking element is selecting When stacking element to be shown is added in each figure layer of figure accelerating engine, not only need corresponding according to the selection of figure layer number The stacking element of number will also select the stacking element of suitable type being added in corresponding figure layer.Certainly, figure layer number with And the type of stacking element that can add of each figure layer is of the invention and is not specially limited.
Step s2:Start figure accelerating engine and image rendering operations are carried out to the stacking element in each figure layer, obtains this The rendering of secondary operation exports, and enters step s3;
It, can be to the stacking element in itself each figure layer according to preset image rendering algorithm after figure accelerating engine starts Operation is carried out, a stacking element, the rendering as this operation can be exported after the completion of the operation carried out to multiple stacking elements Output.
Step s3:Judge whether stacking element to be shown, and if it exists, enter step s4, if being not present, will work as The rendering output of preceding operation is as the image after the completion of rendering;
It should be noted that after part stacking element to be shown is added in the figure layer of figure accelerating engine, wait showing Then no longer there is the stacking element after aforementioned addition in the stacking element list shown, or even if present in stacking element list, Also had been marked as it is processed, for being distinguished with stacking element to be shown.
Step s4:Figure accelerating engine is called again, and the rendering output of last time operation is added to figure accelerating engine In one figure layer, and selects several stacking elements to be added separately to figure acceleration out of remaining stacking element to be shown and draw In the remaining figure layer held up, s2 is entered step.
It is understood that it is a stacking member to carry out the output after image rendering operations due to each figure accelerating engine Element, therefore the input when output can call figure accelerating engine as next time, and it is defeated to add it to figure accelerating engine Enter in a figure layer of side.
In addition, accelerating selecting several stacking elements to be added separately to figure out of remaining stacking element to be shown When in the remaining figure layer of engine, it is possible that the case where remaining stacking element to be shown is less than remaining figure layer, at this time will All remaining stacking element to be shown selects suitable figure layer to add respectively.
It is understood that the present invention calls again using the output result of figure accelerating engine as a part for its input The engine carries out operation, if it is desired, repeatedly recursive call figure accelerating engine.It by this method, theoretically can be real Image rendering operations between now unlimited figure layer.In this way, can with the limited figure accelerating engine of function come realize function compared with For the effect of powerful figure accelerating engine, for example, can with only support the figure accelerating engine of less figure layer (such as 4 layers) come Realize the function of supporting the figure accelerating engine compared with multi-layer image (such as 8 layers).This programme makes the function of figure accelerating engine obtain Play to the greatest extent, especially in the complicated display effect of processing, it is no longer necessary to write will stacking element according to type and Position carries out the program of parsing combination, since this subprogram is needed by MCU processing originally, therefore this portion of the bright simplification of this application for issue After branch, the participation of MCU can be reduced, the load of MCU is greatly reduced, improves the performance of image rendering device, reduces power consumption.
Preferably, further include before step s1:
Stacking element all to be shown is ranked up;
Correspondingly, in step s1 and step s4, according to the ranking results of stacking element to be shown, wait showing from remaining Element is laminated in sequential selection accordingly successively in the stacking element shown, and the stacking element of selection is added to corresponding figure layer It is interior.
It is understood that due to during carrying out image rendering to stacking element, need each figure layer by suitable Sequence is overlapped, and therefore, each stacking element sequence residing in figure layer is different, and the rendering result finally exported is also different. Therefore in the present embodiment, stacking element is ranked up in advance, subsequently in the process that stacking element to be shown is added to figure layer In, then select stacking element successively according to clooating sequence;Under this mode, the mistake of each figure layer selection stacking element is simplified Journey avoids the case where stacking collated unrest of element makes user need additionally to manually select stacking element.
It should be noted that when carrying out stacking element sequence, user needs according to the rendering result wanted to layer Folded element is ranked up successively, still, since some figure layers can limit the type of itself addible stacking element, During being ranked up, it is also desirable to consider stacking element type and figure layer feature, avoid in subsequently selected stacking element When, the situation that element is added in type mismatch figure layer will be laminated and occur.
Certainly, in another embodiment, stacking element to be shown can not be also ranked up, but pre-sets sieve Choosing rule, the screening rule allow the stacking element type of addition to carry out according to the rendering result and each figure layer wanted Design, in step s1 and step s4 when selection stacking element, according to the screening rule out of remaining stacking element to be shown, The suitable stacking element of selection is added in corresponding figure layer.
It is further known that in step s1 and step s4, the stacking element of selection is added in corresponding figure layer, later also Including:
According to the sequence of stacking element to be shown, serial number is carried out to each figure layer in figure accelerating engine;
Correspondingly, the process of step s2 is specially:
According to the number of figure layer, two figure layers not rendered of sequential selection successively, to it includes the progress of stacking element Image rendering operations obtain this rendering result;
The number order for continuing figure layer selects next figure layer not rendered, by it includes stacking element and last time Rendering result carries out image rendering operations, obtains this rendering result;This step operation is repeated, until the stacking in whole figure layers Element is rendered and is finished.
For example, if including 4 figure layers (0~3), carry out image rendering operations, rendering knot to figure layer 0 and figure layer 1 first Fruit is denoted as figure layer 1 ', then figure layer 1 ' and figure layer 2 are carried out image rendering operations, and rendering result is denoted as figure layer 2 ', finally by figure layer 2 ' carry out image rendering operations with figure layer 3 obtains final output.
It is understood that figure accelerating engine includes multiple figure layers, each figure layer there may be original numbers may also It is not present, if there are original number, each stacking element is added to according to the overlay order of itself meets itself format After in figure layer, the overlay order of the original number of figure layer and self-contained stacking element may be not consistent, for example, it is assumed that having Four figure layers 0~3, the stacking element that overlay order is 1 is since format issues may be only capable of being added to figure layer 3, in this way follow-up During being rendered, cannot successively it be rendered according to figure layer number order, but firstly the need of according to stacking element Overlay order goes to search corresponding figure layer, then carries out Rendering operations again, and image rendering speed is slow.If original volume is not present in figure layer If number, can also there be problem above, need to carry out figure layer lookup and screening before rendering.And in the present embodiment, member will be laminated After element is added to suitable figure layer according to sequence, sequence is carried out to each figure layer according to the overlay order of stacking element again and has been compiled Number so that figure layer variation with it includes the stacking superposition order of element it is identical, for example, overlay order for 1 stacking element In figure layer 0, so that when follow-up rendering, can Rendering operations be directly carried out successively according to the number order of figure layer, without It needs that figure layer is searched or screened again, improves image rendering speed.
If in addition, there are original numbers for the figure layer for including in figure accelerating engine, and each figure layer can support and itself If the stacking element of the corresponding overlay order of number (such as figure layer can support all kinds of stacking elements), then preferentially according to will be laminated Element is added in itself corresponding figure layer of sequence.Shown in Fig. 2, Fig. 2 is a kind of image rendering provided by the invention The schematic diagram of the specific embodiment of method is comprising multiple stacking elements 1,2,3,4,5,6,7, figure accelerating engine include 4 A figure layer 0~3;In this case, since the overlay order of stacking element has equalized to the figure layer itself added number, therefore not It is needed again to each figure layer into line renumbering.
Certainly, several preferred embodiments be these are only, specifically whether to each figure layer into line renumbering, the present invention does not make It is particularly limited to.
In a preferred embodiment, image rendering operations are specially Alpha hybrid operations.
Alpha mixing is applied to ARGB (Alpha, Red, Green, Blue) color format, and ARGB is a kind of color mode, Namely RGB (RGB color model, primaries pattern) color mode affix Alpha (transparency) channel, is common in The storage organization of 8,16,18,32 bitmaps.
So-called Alpha mixing is exactly to mix source pixel and object pixel according to Alpha values in fact, and briefly this is A technique for realizing translucent display effect;Wherein, Alpha values are the transparence value of pixel, and range is 0~1.Alpha In mixed process, source pixel and object pixel can be mixed, in mixed process can to the Alpha values of the two pixels and A certain channel components value (red color component value, green component values, blue color component value) carries out certain operation, obtains output pixel and exists The numerical value of the channel components.
Certainly, the image rendering operations in the present invention can also be other kinds of Rendering operations, such as according to image The center of circle and radius carry out round Rendering operations etc., and specific image rendering operations type can be depending on actual demand, the present invention It is not construed as limiting.
It is further known that two stacking elements carry out Alpha hybrid operations, the process for obtaining mixing resultant is specially:
By mixed relationship formula, by each channel components of each pixel to be mixed in two stacking elements to be mixed It is mixed successively with Alpha values, obtains the mixing resultant of each pixel to be mixed;Channel components include red color component value, indigo plant Colouring component value and green component values;
Mixed relationship formula is specially:
Output α=Dst α+Src α-Dst α Src α
OutputP:The value of P channel component in the mixing resultant of pixel to be mixed;P is red blue or green;
Outputα:Alpha channel values in the mixing resultant of pixel to be mixed;
DstP:The P channel component value of pixel to be mixed in purpose figure layer;
SrcP:The P channel component value of pixel to be mixed in the figure layer of source;
Dstα:The Alpha values of pixel to be mixed in purpose figure layer;
Srcα:The Alpha values of pixel to be mixed in the figure layer of source.
Wherein, since during carrying out Alpha hybrid operations, the sequence of to be mixed two figure layers is to require , for example, figure layer 1 is superimposed upon in figure layer 0, and figure layer 0 is superimposed upon in figure layer 1, obtained mixing resultant is difference, therefore Which clear figure layer is needed to be in upper layer (being used as source figure layer), which figure layer is in lower layer's (i.e. figure layer as a purpose).
I.e. during carrying out Alpha hybrid operations, need to be mixed three times respectively to obtain final mixed pixel Three channel components (red component, blue component and green component).
In a preferred embodiment, in step s4, the rendering output of last time operation is added to figure accelerating engine Before in one figure layer, further include:
By the picture format of the rendering output of last time operation, it is defeated to be converted to the figure accelerating engine input side reception rendering The picture format that the figure layer gone out is supported.
Shown in Figure 3, Fig. 3 is a kind of signal of another specific embodiment of image rendering method provided by the invention Figure.
It is understood that the input due to the present invention by the rendering output of last time as Rendering operations next time, and scheme The element format that shape accelerating engine output end and input terminal are supported may it is identical may also be different, therefore, in order to ensure to input In the case of supporting that format is different with output, the present invention also can be realized normally, it is therefore desirable to export rendering into row format tune It is whole, so that the image after adjustment is obtained the support of input side.
Wherein, the specific can be that carrying out Format adjusting to image by the channels Alpha or other Color Channels, such as The conversion of RGB888, RGB565, BGR888 etc. format.Here the mode for carrying out format conversion, inputs with figure accelerating engine End is related with the Format Type that output end is supported, the present invention is not particularly limited this.
For example, each figure layer of figure accelerating engine supports following color format and operation:RGB565, RGB888, BGR888, ARGB8888, PARGB8888, ARGB6666, ARGB8565, PARGB6666, PARGB8565, YUYV422 and anti-saw Tooth font, Rectangle filling.The output format that figure accelerating engine is supported has:RGB565, RGB888, BGR888, ARGB8888 are (defeated Except when entering to have PARGB formats), PARGB8888.As it can be seen that all output format of figure accelerating engine all can serve as to input, It adjusts to output data so being not required here, it is only necessary to the specified format and output format for receiving the figure layer for rendering output It is identical.But if there is no its output format supported in the input format that figure accelerating engine is supported, it is necessary to do phase The processing answered.It is exemplified below:If figure accelerating engine only supports the input of ARGB formats and the output of RBG formats, it is necessary to The channels Alpha are added in the core buffer of output can make by oneself by RBG format conversions at ARGB formats during conversion The Alpha values of adopted each pixel, i.e., the transparency of each pixel can be used as inputting after conversion.
In addition, it should be noted that since the input terminal of figure accelerating engine receives the only figure layer for rendering and exporting, Be assumed to be figure layer 0, figure layer 0 may only support the division format in the data format that figure accelerating engine input terminal is supported, then this Even if when figure accelerating engine output end it is identical as the data format that input terminal is supported, it is also desirable to the data format energy of specified output Access the support of figure layer 0.For example, figure layer 0 supports tri- kinds of formats of BGR888, ARGB8888 and PARGB8888, input terminal to support Five kinds of formats of RGB565, RGB888, BGR888, ARGB8888 and PARGB8888, therefore the data lattice for needing appointed output terminal to export Formula is necessary for any one of three kinds of formats that figure layer 0 is supported.Certainly, if output end does not support the data that figure layer 0 is supported Format then needs to carry out format conversion.
Specifically, stacking element of the present invention includes font or geometric figure.Font can be grayscale font, such as 4 Position color depth, 8 color depths etc.;Geometric figure can be rectangle, circle etc.;And stacking element can also limit the lattice of image Formula, such as can be RGB three primary colors format-pattern, yuv format image etc..Certainly, stacking element can also be extended formatting or The image of other patterns, this is not limited by the present invention.
Specifically, above-mentioned figure accelerating engine is 2D figure accelerating engines.It is, of course, also possible to add for other kinds of image Fast engine, this is not limited by the present invention.
The present invention provides a kind of image rendering methods, call figure accelerating engine several times, call figure to accelerate every time When engine, input addition when running the output after preceding calling figure shape accelerating engine as this figure accelerating engine To a figure layer, and the stacking element of corresponding number is selected to be added to remaining figure layer out of remaining stacking element to be shown It is interior, image rendering operations then are carried out to the content of each figure layer, repeat aforesaid operations, until all stacking elements to be shown It renders until finishing.As it can be seen that the present invention by the way of it will export and feed back to input, can utilize in current embedded system The limited figure accelerating engine of function is directly realized by the image rendering operations of a large amount of stacking elements, to complete the figure of various complexity As render scenes, the parsing combination of stacking element is carried out without additional designs degree, is simplified in image rendering process Programming, and reduce limited degree of the figure accelerating engine when carrying out image rendering application.
Shown in Figure 4 the present invention also provides a kind of image rendering device, Fig. 4 is a kind of image provided by the invention The structural schematic diagram of rendering device.The system includes:
First figure layer add module selects phase for calling figure accelerating engine for the first time out of stacking element to be shown It answers a stacking element to be added separately in each figure layer of figure accelerating engine, triggers engine calling module;
Engine calling module carries out image rendering behaviour for starting figure accelerating engine to the stacking element in each figure layer Make, obtains the rendering output of this operation;Trigger judgment module;
Judgment module, for judging whether stacking element to be shown, and if it exists, the second figure layer of triggering adds mould Block, if being not present, by the rendering output of current operation as the image after the completion of rendering;
The rendering output of last time operation is added to by the second figure layer add module for calling figure accelerating engine again In one figure layer of figure accelerating engine, and several stacking elements are selected to add respectively out of remaining stacking element to be shown It adds in the remaining figure layer of figure accelerating engine, triggers engine calling module.
The present invention provides a kind of image rendering devices, call figure accelerating engine several times, call figure to accelerate every time When engine, input addition when running the output after preceding calling figure shape accelerating engine as this figure accelerating engine To a figure layer, and the stacking element of corresponding number is selected to be added to remaining figure layer out of remaining stacking element to be shown It is interior, image rendering operations then are carried out to the content of each figure layer, repeat aforesaid operations, until all stacking elements to be shown It renders until finishing.As it can be seen that the present invention by the way of it will export and feed back to input, can utilize in current embedded system The limited figure accelerating engine of function is directly realized by the image rendering operations of a large amount of stacking elements, to complete the figure of various complexity As render scenes, the parsing combination of stacking element is carried out without additional designs degree, is simplified in image rendering process Programming, and reduce limited degree of the figure accelerating engine when carrying out image rendering application.
The present invention also provides a kind of intelligent wearable devices, including:
Memory, for storing computer program;
Processor, when for executing computer program the step of the realization such as image rendering method of any of the above item.
Wherein, intelligent wearable device here can be Intelligent bracelet or wrist-watch etc., and certainly, the present invention does not limit intelligence The concrete type of wearable device.
Present invention is preferably used in the systems in small intelligent wearable device, due to the MCU processing of small intelligent wearable device Ability is not high enough, uses the present invention that can reduce the load of MCU to reduce power consumption, extends the cruise duration of intelligent wearable device. Certainly, other kinds of intelligent wearable device can also apply the solution of the present invention, and this is not limited by the present invention.
Above several specific implementation modes are only the preferred embodiment of the present invention, and above several specific embodiments can be with Arbitrary combination, the embodiment obtained after combination is also within protection scope of the present invention.It should be pointed out that for the art For those of ordinary skill, relevant speciality technical staff deduced out in the case where not departing from spirit of that invention and concept thereof other change Into and variation, should all be included in the protection scope of the present invention.
Each embodiment is described by the way of progressive in this specification, the highlights of each of the examples are with other The difference of embodiment, just to refer each other for identical similar portion between each embodiment.For device disclosed in embodiment For, since it is corresponded to the methods disclosed in the examples, so description is fairly simple, related place is said referring to method part It is bright.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only that A little elements, but also include other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest range caused.

Claims (10)

1. a kind of image rendering method, which is characterized in that including:
Step s1:Figure accelerating engine is called for the first time, and corresponding stacking element is selected to add respectively out of stacking element to be shown It adds in each figure layer of the figure accelerating engine, enters step s2;
Step s2:Start the figure accelerating engine and image rendering operations are carried out to the stacking element in each figure layer, obtains To the rendering output of this operation, s3 is entered step;
Step s3:Judge whether stacking element to be shown, and if it exists, enter step s4, if being not present, will currently grasp The rendering output of work is as the image after the completion of rendering;
Step s4:The figure accelerating engine is called again, and the rendering output of last time operation, which is added to the figure acceleration, draws In the figure layer held up, and several stacking elements are selected to be added separately to the figure out of remaining stacking element to be shown In the remaining figure layer of shape accelerating engine, s2 is entered step.
2. according to the method described in claim 1, it is characterized in that, further including before step s1:
Stacking element all to be shown is ranked up;
Correspondingly, in the step s1 and the step s4, according to the ranking results of the stacking element to be shown, from surplus Element is laminated in sequential selection accordingly successively in remaining stacking element to be shown, and the stacking element of selection is added to phase In the figure layer answered.
3. according to the method described in claim 2, it is characterized in that, in the step s1 and the step s4, by the institute of selection It states stacking element to be added in corresponding figure layer, further includes later:
According to the sequence of the stacking element to be shown, to each figure layer carry out sequence volume in the figure accelerating engine Number;
Correspondingly, the process of the step s2 is specially:
According to the number of the figure layer, two figure layers not rendered of sequential selection successively, to it includes the progress of stacking element Image rendering operations obtain this rendering result;
The number order for continuing the figure layer selects next figure layer not rendered, by it includes stacking element and last time Rendering result carries out image rendering operations, obtains this rendering result;This step operation is repeated, until the stacking in whole figure layers Element is rendered and is finished.
4. according to claim 1-3 any one of them methods, which is characterized in that described image Rendering operations are specially Alpha Hybrid operation.
5. according to the method described in claim 4, it is characterized in that, in step s4, the rendering output of last time operation is added to Before in one figure layer of the figure accelerating engine, further include:
By the picture format of the rendering output of last time operation, it is defeated to be converted to the figure accelerating engine input side reception rendering The picture format that the figure layer gone out is supported.
6. according to the method described in claim 4, it is characterized in that, two stacking elements progress Alpha hybrid operations, obtain Process to mixing resultant is specially:
By mixed relationship formula, successively by each channel components of each pixel to be mixed in two stacking elements to be mixed It is mixed with Alpha values, obtains the mixing resultant of each pixel to be mixed;The channel components include red component Value, blue color component value and green component values;
The mixed relationship formula is specially:
Output α=Dst α+Src α-Dst α Src α
OutputP:The value of P channel component in the mixing resultant of the pixel to be mixed;P is red blue or green;
Outputα:Alpha channel values in the mixing resultant of the pixel to be mixed;
DstP:The P channel component value of the pixel to be mixed in purpose figure layer;
SrcP:The P channel component value of the pixel to be mixed in the figure layer of source;
Dstα:The Alpha values of the pixel to be mixed in the purpose figure layer;
Srcα:The Alpha values of the pixel to be mixed in the source figure layer.
7. according to claim 1-3 any one of them methods, which is characterized in that the stacking element includes font or geometric graph Shape.
8. according to claim 1-3 any one of them methods, which is characterized in that the figure accelerating engine accelerates for 2D figures Engine.
9. a kind of image rendering device, which is characterized in that including:
First figure layer add module selects corresponding for calling figure accelerating engine for the first time out of stacking element to be shown Stacking element is added separately in each figure layer of the figure accelerating engine, triggers engine calling module;
The engine calling module carries out figure for starting the figure accelerating engine to the stacking element in each figure layer As Rendering operations, the rendering output of this operation is obtained;Trigger judgment module;
The judgment module, for judging whether stacking element to be shown, and if it exists, the second figure layer of triggering adds mould Block, if being not present, by the rendering output of current operation as the image after the completion of rendering;
The second figure layer add module adds the rendering output of last time operation for calling the figure accelerating engine again It adds in a figure layer of the figure accelerating engine, and selects several stacking members out of remaining stacking element to be shown Element is added separately in the remaining figure layer of the figure accelerating engine, triggers the engine calling module.
10. a kind of intelligent wearable device, which is characterized in that including:
Memory, for storing computer program;
Processor realizes such as claim 1 to 8 any one of them image rendering method when for executing the computer program The step of.
CN201810437065.0A 2018-05-09 2018-05-09 Image rendering method and device and intelligent wearable device Active CN108648249B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810437065.0A CN108648249B (en) 2018-05-09 2018-05-09 Image rendering method and device and intelligent wearable device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810437065.0A CN108648249B (en) 2018-05-09 2018-05-09 Image rendering method and device and intelligent wearable device

Publications (2)

Publication Number Publication Date
CN108648249A true CN108648249A (en) 2018-10-12
CN108648249B CN108648249B (en) 2022-03-29

Family

ID=63753821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810437065.0A Active CN108648249B (en) 2018-05-09 2018-05-09 Image rendering method and device and intelligent wearable device

Country Status (1)

Country Link
CN (1) CN108648249B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009550A (en) * 2019-03-28 2019-07-12 深圳市创联时代科技有限公司 A kind of implementation method of figure special efficacy
CN110288670A (en) * 2019-06-19 2019-09-27 杭州绝地科技股份有限公司 A kind of UI retouches the high-performance rendering method of side special efficacy
CN110377257A (en) * 2019-07-17 2019-10-25 Oppo广东移动通信有限公司 Layer composition, device, electronic equipment and storage medium
CN111462292A (en) * 2020-03-20 2020-07-28 稿定(厦门)科技有限公司 Layering rendering method, medium, equipment and device
CN111526425A (en) * 2020-04-26 2020-08-11 北京字节跳动网络技术有限公司 Video playing method and device, readable medium and electronic equipment
CN112346811A (en) * 2021-01-08 2021-02-09 北京小米移动软件有限公司 Rendering method and device
CN112783584A (en) * 2019-11-07 2021-05-11 合肥杰发科技有限公司 Layer display method and device of terminal system, vehicle equipment and storage device
WO2023010851A1 (en) * 2021-08-05 2023-02-09 稿定(厦门)科技有限公司 Webgl-based graphics rendering method, apparatus and system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050110804A1 (en) * 2003-11-20 2005-05-26 Honeywell International Inc. Background rendering of images
US20050212806A1 (en) * 2002-05-10 2005-09-29 Metod Koselj Graphics engine converting individual commands to spatial image information, and electrical device and memory incorporating the graphics engine
CN101295408A (en) * 2007-04-27 2008-10-29 新奥特硅谷视频技术有限责任公司 3D videotext rendering method and system
CN102637303A (en) * 2012-04-26 2012-08-15 珠海医凯电子科技有限公司 Ultrasonic three-dimensional mixed and superposed volumetric rendering processing method based on GPU (Graphic Processing Unit)
CN103049924A (en) * 2012-12-11 2013-04-17 广东威创视讯科技股份有限公司 Multi-image-layer distribution type rendering method and system
CN104077792A (en) * 2014-07-04 2014-10-01 厦门美图网科技有限公司 Image processing method with cartoon effect
CN104508711A (en) * 2013-03-14 2015-04-08 梦工厂动画公司 Conservative partitioning for rendering a computer-generated animation
CN104731544A (en) * 2015-03-27 2015-06-24 华为技术有限公司 Superimposition system and superimposition method
CN106897976A (en) * 2015-12-23 2017-06-27 中国人民解放军海军航空工程学院 Single video card triple channel solid what comes into a driver's projection software correction fusion method based on GPU

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050212806A1 (en) * 2002-05-10 2005-09-29 Metod Koselj Graphics engine converting individual commands to spatial image information, and electrical device and memory incorporating the graphics engine
US20050110804A1 (en) * 2003-11-20 2005-05-26 Honeywell International Inc. Background rendering of images
CN101295408A (en) * 2007-04-27 2008-10-29 新奥特硅谷视频技术有限责任公司 3D videotext rendering method and system
CN102637303A (en) * 2012-04-26 2012-08-15 珠海医凯电子科技有限公司 Ultrasonic three-dimensional mixed and superposed volumetric rendering processing method based on GPU (Graphic Processing Unit)
CN103049924A (en) * 2012-12-11 2013-04-17 广东威创视讯科技股份有限公司 Multi-image-layer distribution type rendering method and system
CN104508711A (en) * 2013-03-14 2015-04-08 梦工厂动画公司 Conservative partitioning for rendering a computer-generated animation
CN104077792A (en) * 2014-07-04 2014-10-01 厦门美图网科技有限公司 Image processing method with cartoon effect
CN104731544A (en) * 2015-03-27 2015-06-24 华为技术有限公司 Superimposition system and superimposition method
CN106897976A (en) * 2015-12-23 2017-06-27 中国人民解放军海军航空工程学院 Single video card triple channel solid what comes into a driver's projection software correction fusion method based on GPU

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张浩然: ""基于FPGA的视频采集及图像处理算法实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009550A (en) * 2019-03-28 2019-07-12 深圳市创联时代科技有限公司 A kind of implementation method of figure special efficacy
CN110009550B (en) * 2019-03-28 2024-01-02 深圳市创联时代科技有限公司 Method for realizing graphic special effect
CN110288670A (en) * 2019-06-19 2019-09-27 杭州绝地科技股份有限公司 A kind of UI retouches the high-performance rendering method of side special efficacy
CN110288670B (en) * 2019-06-19 2023-06-23 杭州绝地科技股份有限公司 High-performance rendering method for UI (user interface) tracing special effect
CN110377257A (en) * 2019-07-17 2019-10-25 Oppo广东移动通信有限公司 Layer composition, device, electronic equipment and storage medium
CN110377257B (en) * 2019-07-17 2022-04-19 Oppo广东移动通信有限公司 Layer composition method and device, electronic equipment and storage medium
CN112783584B (en) * 2019-11-07 2023-04-14 合肥杰发科技有限公司 Layer display method and device of terminal system, vehicle equipment and storage device
CN112783584A (en) * 2019-11-07 2021-05-11 合肥杰发科技有限公司 Layer display method and device of terminal system, vehicle equipment and storage device
CN111462292A (en) * 2020-03-20 2020-07-28 稿定(厦门)科技有限公司 Layering rendering method, medium, equipment and device
CN111526425B (en) * 2020-04-26 2022-08-09 北京字节跳动网络技术有限公司 Video playing method and device, readable medium and electronic equipment
CN111526425A (en) * 2020-04-26 2020-08-11 北京字节跳动网络技术有限公司 Video playing method and device, readable medium and electronic equipment
CN112346811A (en) * 2021-01-08 2021-02-09 北京小米移动软件有限公司 Rendering method and device
WO2023010851A1 (en) * 2021-08-05 2023-02-09 稿定(厦门)科技有限公司 Webgl-based graphics rendering method, apparatus and system

Also Published As

Publication number Publication date
CN108648249B (en) 2022-03-29

Similar Documents

Publication Publication Date Title
CN108648249A (en) A kind of image rendering method, device and intelligent wearable device
CN101065784B (en) Processing of computer graphics
EP2174509B1 (en) A multi-primary conversion
US5889499A (en) System and method for the mixing of graphics and video signals
US4694286A (en) Apparatus and method for modifying displayed color images
US6181353B1 (en) On-screen display device using horizontal scan line memories
CN104811677B (en) The display control method of mobile terminal and device
US5521615A (en) Display system for instruments
JPH09149334A (en) Video magnifying device
CN104182175B (en) Touch screen terminal interface display method and device
CN106547530A (en) A kind of interface processing method and device
CN105430393A (en) Picture processing method, picture processing device and picture processing platform
WO2003038801A1 (en) Method and device providing enhanced characters
CN104144332A (en) Image color adjusting method and electronic device using the same
CN114489608B (en) Display screen icon control method and device, terminal equipment and storage medium
CN113434199B (en) MCU capable of driving multiple groups of RGB lamps and driving method thereof
CN101193231B (en) OSD control module and its OSD menu color setting method
CN100512373C (en) Interlacing display anti-flickering method and apparatus
JP3080087B2 (en) Image processing method and apparatus
CN110473490A (en) Driving method, driving device, display device and computer readable storage medium
CN2494089Y (en) Television set with TV station menu function
JPS6213674B2 (en)
JPH06233882A (en) Embroidery design reader
JP3304381B2 (en) Image processing device having contour extraction function
CN106325665A (en) Display control method and electronic equipment

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