CN106657560A - Image processing method and mobile terminal - Google Patents

Image processing method and mobile terminal Download PDF

Info

Publication number
CN106657560A
CN106657560A CN201510737701.8A CN201510737701A CN106657560A CN 106657560 A CN106657560 A CN 106657560A CN 201510737701 A CN201510737701 A CN 201510737701A CN 106657560 A CN106657560 A CN 106657560A
Authority
CN
China
Prior art keywords
target trajectory
point
target
texture image
image
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
CN201510737701.8A
Other languages
Chinese (zh)
Other versions
CN106657560B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510737701.8A priority Critical patent/CN106657560B/en
Publication of CN106657560A publication Critical patent/CN106657560A/en
Application granted granted Critical
Publication of CN106657560B publication Critical patent/CN106657560B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining

Abstract

The invention discloses an image processing method and a mobile terminal. The method comprises the following steps: a texture image is obtained; line segments corresponding to a target track are partitioned based on a preset point granularity and target effects of the target track; a point set corresponding to the target track is obtained, the point set corresponding to the target track is drawn via use of the texture image, and a picture corresponding to the target track is obtained. Via adoption of the image processing method and the mobile terminal, the mobile terminal can be supported to draw the track in a high efficiency and low resource occupation manner.

Description

Image processing method and mobile terminal
Technical field
The present invention relates to graphical display technics, more particularly to a kind of image processing method and mobile terminal.
Background technology
Mobile terminal (such as smart mobile phone, panel computer) is widely used;Although current mobile terminal Computing capability and image-capable have obtained significant progress, but with the computing capability and image at PC ends Disposal ability yet suffers from larger gap.
There are a typical application scenarios in mobile terminal:Track is presented.For example according to the touch control operation of user In real time presentation user or is presented track of circuit etc. in the operation trace of graphical interfaces in map application.
When needing to present track, track of the application processor in mobile terminal to needing to present in internal memory is entered Row modeling, and rendering for track is carried out based on modeling result by image processor, so as to present track;Its The operation that middle application processor is modeled in internal memory is fairly time consuming, and for different tracks is needed at application Reason device is modeled respectively process, is frequently processed based on the modeling that internal memory carries out track using application processor, The computing resource to application processor and internal memory can be caused to cause substantial amounts of occupancy, and then affect mobile terminal Performance, for example may because track drafting cause mobile terminal resource (including for processor calculating provide Source and internal memory) not enough, the problem for occurring that user operation cannot be timely responded to, affect user experience.
The content of the invention
The embodiment of the present invention provides a kind of image processing method and mobile terminal, it would be preferable to support mobile terminal is with height The mode track drafting that effect, low-resource take.
What the technical scheme of the embodiment of the present invention was realized in:
The embodiment of the present invention provides a kind of image processing method, and methods described includes:
Obtain texture image;
Based on the default granularity of point and the target effect of target trajectory to the corresponding line of the target trajectory Duan Jinhang is divided, and obtains the point set of the correspondence target trajectory;
The point set of the correspondence target trajectory is drawn using the texture image, the target trajectory pair is obtained The image answered.
The embodiment of the present invention provides a kind of mobile terminal, and the mobile terminal includes:
Application processor, for obtaining texture image, uploads the texture image for obtaining to graphic process unit;
The application processor, is additionally operable to be based on the granularity of default point and the target effect of target trajectory The corresponding line segment of the target trajectory is divided, the point set of the correspondence target trajectory is obtained;
The graphic process unit, for drawing the point set of the correspondence target trajectory using the texture image, Obtain the corresponding image of the target trajectory.
In the embodiment of the present invention, corresponded with the point in the point set for constituting target trajectory using texture image Mode, replace the point in point set to draw target trajectory (namely using the texture image that pre-sets Target trajectory is rendered using texture image), for target trajectory need not adopt the consuming of correlation technique to move The modeling of terminal computing resource is processed, for same target trajectory is presented different effects (target effect) When, it is only necessary to the density at the point set midpoint of composition target trajectory is controlled by the density put, is easy to Implement, saved the computing resource of mobile terminal, it is ensured that real-time response of the mobile terminal when track is presented Performance.
Description of the drawings
Fig. 1 is that track drafting realizes schematic flow sheet in correlation technique;
Fig. 2 is the schematic diagram of the corresponding line segment in track for needing to draw in correlation technique;
Fig. 3 is the schematic diagram being modeled based on the corresponding line segment in track for needing to draw in correlation technique;
Fig. 4 is the schematic diagram of track drafting in correlation technique;
Fig. 5 is the schematic diagram of the track drawn out in correlation technique;
Fig. 6 is that image processing method realizes schematic flow sheet one in the embodiment of the present invention;
Fig. 7 is that image processing method realizes schematic flow sheet two in the embodiment of the present invention;
Fig. 8 is that image processing method realizes schematic flow sheet three in the embodiment of the present invention;
Fig. 9 is the signal of the corresponding line segment of the target trajectory determined in the target image in the embodiment of the present invention Figure;
Figure 10 is the schematic diagram one that the corresponding point set of target trajectory is determined in the embodiment of the present invention;
Figure 11 is the schematic diagram two that the corresponding point set of target trajectory is determined in the embodiment of the present invention;
Figure 12 is the navigation way schematic diagram drawn out in the embodiment of the present invention;
Figure 13 is the schematic diagram that mobile terminal is presented target trajectory in the embodiment of the present invention;
Figure 14 is the structural representation of mobile terminal in the embodiment of the present invention.
Specific embodiment
Below in conjunction with drawings and Examples, the present invention will be described in further detail.It should be appreciated that herein Described specific embodiment only to explain the present invention, is not intended to limit the present invention.
The embodiment that correlation technique is presented track is entered with reference to the example that navigation way is presented on map Row analysis.
When mobile terminal is presented map and navigation way, the navigation way presented on map is usually constructed with one Fixed width (such as 20 pixels);To avoid the setting-out interface renderings navigation way using OpenGL from causing The obvious problem of pixel sawtooth, correlation technique generally draws navigation way by the way of triangular texture pinup picture, As shown in figure 1, specifically including following step:
Step 101, obtains the starting point of original navigation way, terminal and the position passed through.
Original navigation way as shown in Figure 2 is a line segment.
Step 102, is modeled for navigation way.
As shown in figure 3, starting point, terminal to original navigation way and the position passed through are expanded to both sides One fixed width (width of concrete extension is presented as needed the width having during navigation way and determines) is filled, really The region for showing navigation way with one fixed width is made, then enters the region with multiple triangles Row is divided, and forms 1,2,3,4,5,6,7,8 totally 8 summits, and 012,123,234,345, 456th, 678 totally 6 triangles.
Step 103, based on modeling result texture coordinate is calculated.
The texture coordinate of the triangle for constituting above-mentioned zone (showing the region of navigation way) is namely calculated, The texture coordinate of triangle includes that the two-dimensional coordinate of each point in triangle is represented and corresponding color value.
Step 104, the setting-out interface for calling OpenGL draws navigation way based on texture coordinate.
Step 101 to step 103 is performed by application processor, and application processor passes triangular apex data To image processor, as shown in figure 4, image processor carries out texture to each triangular basis in texture image Filling, so as to draw out navigation way shown in Fig. 5, (navigation way illustrated in Fig. 5 is to fill black Example).
The texture coordinate of each triangle is different, 012,123,456,567 4 three of both sides in Fig. 4 It is angular, for the cup head at drawn path two ends, can be connected by cup head between different navigation route.
The mode of above-mentioned drafting navigation way can to processor and internal memory cause frequently take, process time-consuming, Affect the response performance of mobile terminal;For example, mobile terminal needs the shape of the track for presenting in practical application It is constantly conversion, for each track is required for carrying out above-mentioned modeling process, even for same track Different display effects (such as solid line display effect and dotted line display effect) are needed to be also required to be built respectively Mould process, causes to cause application processor and memory source excessive consumption, especially track is presented continuous When (such as user in application of drawing by touch control operation continuous track drafting when).
The problems referred to above for track is presented in the terminal, referring to Fig. 6, in the embodiment of the present invention, obtain Texture image, and the target effect of the granularity based on default point and target trajectory are taken to target trajectory pair The line segment answered is divided, and obtains constituting the point set of target trajectory;Correspondence is drawn using the texture image The point set of the target trajectory, obtains the corresponding image of the target trajectory.
Obtain constituting the point set of target trajectory by the division to target trajectory, and by using texture image To draw the point set for constituting target trajectory, the drafting to target trajectory is realized, taken full advantage of mobile whole Characteristic that shape library in end is supported to replace point to be drawn with texture image (shape library typically support with Texture image comes drawing image such as personage, scenery etc.) carry out track drafting, without the need for being built for target trajectory Mould process, has saved the computing resource of mobile terminal, it is ensured that the response performance of mobile terminal.
It is pointed out that being subsequently to run the mobile terminal of OpenGL ES 2.0 in the embodiment of the present invention Said as a example by (such as running mobile terminal, the mobile terminal of operation iOS system of android system) Bright, in simple terms, OpenGL ES 2.0 are in order to embedded equipment carries out the OpenGL versions after function is cut out This, wherein 2.0 versions and 1.x incompatible versions, difference and compatibility are referring to android official documents, OpenGL ES 2.0 allow to replace point to carry out drafting operation with texture image, certainly, the embodiment of the present invention The technical scheme of record is equally applicable to the mobile terminal of the shape library for being different from OpenGL ES 2.0, as long as The shape library allows to replace point to carry out drawing operation with texture image.
In addition, the mobile terminal described in the embodiment of the present invention can be embodied in various forms, for example, Above-mentioned mobile terminal can be smart mobile phone, panel computer, notebook computer or Wearable (such as intelligence Energy glasses, intelligent watch etc.), the operating system of mobile terminal can be Android operation system, IOS operations system System or other any third parties exploitations can run on micro-computer architecture (at least including processor and interior Deposit) operating system (such as mobile edition linux system, blackberry, blueberry QNX operating system), the present invention implement Illustrate by smart mobile phone of mobile terminal in accompanying drawing in example, this is not constituted records to the embodiment of the present invention The restriction of mobile terminal style that is suitable for of technical scheme.
The image processing method recorded based on more than and mobile terminal propose following embodiment of the invention.
Embodiment one
The present embodiment records a kind of image processing method, as shown in fig. 6, comprising the following steps:
Step 201, obtains texture image set in advance.
The shape and color value information of texture image can preset, and various be in based on existing in mobile terminal The scene of existing track, can be directed to the corresponding texture image of scene setting of different presentation tracks, for example, The red color for texture image can be set in map application;Operation trace is being presented (such as mobile terminal Contact lock-out state track) when the red color for texture image is set.
Because texture image is for replacing composition target trajectory (namely to need the rail drawn in the present embodiment Mark) point, the difference of the shape of texture image will not produce to the visual effect of target trajectory and significantly affect, Therefore the shape of texture image is not limited.
Step 202, the sparse degree of the target trajectory that the target effect based on the target trajectory is indicated, It is determined that the density of point corresponding with the sparse degree.
Target effect indicates the sparse degree of target trajectory, to represent sparse degree using hundred-mark system as a example by, 100% expression target trajectory shows as solid line in visual effect, and 0 represents target trajectory in visual effect upper table It is now dotted line, and the sparse degree constituted between the phantom line segments of target trajectory reaches maximum;In map application, The target trajectory of solid line and the target trajectory of dotted line are often only needed to (and to the sparse of the phantom line segments of target trajectory Degree is not required), correspondingly, the sparse degree of target trajectory can be represented using binary system, wherein two System 1 represents that target trajectory is solid line, and Binary Zero represents that target trajectory is phantom line segments.
The basic element for constituting target trajectory is a little distribution density of point and the sparse degree negative of target trajectory Close, the density of point is bigger, then the sparse degree of target trajectory is less, and solid line is shown as in visual effect, Conversely, the density of point is less, then the sparse degree of target trajectory is bigger, and dotted line is shown as in visual effect; The sparse degree of target trajectory and the incidence relation of the density of point are set up, the target based on the target trajectory is imitated During the sparse degree of the target trajectory that fruit indicates, the above-mentioned incidence relation that can pass through to pre-build determines The density of point corresponding with the sparse degree.
Step 203, the density of granularity and the point based on default point, to the target trajectory pair The line segment answered is divided, and obtains the point set of the correspondence target trajectory.
Above-mentioned step 203 and step 204 is the target of the granularity based on default point and target trajectory Effect is divided to the line segment of the target trajectory, obtains the point set of the correspondence target trajectory;Target The line segment of track characterizes starting point, terminal and the flex point of target trajectory, and the corresponding line segment of target trajectory can be The curve of straight line or arbitrary shape.
Step 204, using the one-to-one mode of point in texture image and composition target trajectory, using institute The point that texture image is drawn in the point set of the correspondence target trajectory is stated, the corresponding image of target trajectory is obtained.
The granularity of point refers to the basic square measure for dividing target trajectory, and the granularity of point can be with texture image one Cause, such that it is able to directly carry out drafting using texture image replacement point target trajectory is obtained.
Using the one-to-one mode of point in point set of the texture image with composition target trajectory, using advance The texture image of setting replaces the point in point set and (namely carrys out wash with watercolours using texture image drawing target trajectory Dye target trajectory), for building for the consuming mobile terminal computing resource that target trajectory need not adopt correlation technique Mould process, when different effect (target effects) are presented for same target trajectory, it is only necessary to by point Density come control constitute target trajectory point set midpoint density, it is convenient to carry out, saved movement The computing resource of terminal, it is ensured that real-time response performance of the mobile terminal when track is presented.
During actual enforcement, above-mentioned steps 201 to step 203 can be by including application processor in mobile terminal The instruction for depositing storage in middle execution storage medium (such as flash memory) is completed, for example, can be passed through by application processor Perform coloration program to realize, above-mentioned step 204 is the operation of color applying drawing track, can be by mobile whole The graphic process unit at end is completed.
Embodiment two
The present embodiment records a kind of image processing method, as shown in fig. 7, comprises following steps:
Step 301, calls figure bank interface to generate corresponding texture according to the target color information of target trajectory Image.
The color value of texture image can call figure bank interface according to the target color information of the target trajectory Generate, such as when navigation way is presented in map application, can be set in map application according to user The color of navigation way calls figure bank interface to generate corresponding texture image, in the unlock interface of any application In (including the launcher applications that the desktop of responsible mobile terminal shows) unblock track for being set according to user Color call figure bank interface to generate corresponding texture image.
Because texture image is for replacing constituting the point of target trajectory, the shape of texture image in the present embodiment Difference the visual effect of target trajectory will not be produced and significantly affect, therefore the shape of texture image is not limited It is fixed.
Step 302, the sparse degree of the target trajectory that the target effect based on the target trajectory is indicated, It is determined that the density of point corresponding with the sparse degree.
Target effect indicates the sparse degree of target trajectory, to represent sparse degree using hundred-mark system as a example by, 100% expression target trajectory shows as solid line in visual effect, and 0 represents target trajectory in visual effect upper table It is now dotted line, and the sparse degree constituted between the phantom line segments of target trajectory reaches maximum;In map application, The target trajectory of solid line and the target trajectory of dotted line are often only needed to (and to the sparse of the phantom line segments of target trajectory Degree is not required), correspondingly, the sparse degree of target trajectory can be represented using binary system, wherein two System 1 represents that target trajectory is solid line, and Binary Zero represents that target trajectory is phantom line segments.
The basic element for constituting target trajectory is a little distribution density of point and the sparse degree negative of target trajectory Close, the density of point is bigger, then the sparse degree of target trajectory is less, and solid line is shown as in visual effect, Conversely, the density of point is less, then the sparse degree of target trajectory is bigger, and dotted line is shown as in visual effect; The sparse degree of target trajectory and the incidence relation of the density of point are set up, the target based on the target trajectory is imitated During the sparse degree of the target trajectory that fruit indicates, the above-mentioned incidence relation that can pass through to pre-build determines The density of point corresponding with the sparse degree.
Step 303, the density of granularity and the point based on default point, enters to the target trajectory Row is divided, and obtains the point set of the correspondence target trajectory.
Above-mentioned step 303 and step 304 is the target of the granularity based on default point and target trajectory Effect is divided to the line segment of the target trajectory, obtains the point set of the correspondence target trajectory.
Step 304, using the one-to-one mode of point in texture image and composition target trajectory, using institute The point that texture image is drawn in the point set of the correspondence target trajectory is stated, the corresponding image of target trajectory is obtained.
The granularity of point refers to the basic square measure for dividing target trajectory, and the granularity of point can be with texture image one Cause, such that it is able to directly carry out drafting using texture image replacement point target trajectory is obtained.
Using the one-to-one mode of point in point set of the texture image with composition target trajectory, using basis The target color information of target trajectory calls figure bank interface to generate in corresponding texture image replacement point set Put to draw target trajectory, for the consuming mobile terminal computing resource that target trajectory need not adopt correlation technique Modeling process, when different effect (target effects) are presented for same target trajectory, it is only necessary to logical The density at point set midpoint of the density a little to control to constitute target trajectory is crossed, it is convenient to carry out, save The computing resource of mobile terminal, it is ensured that real-time response performance of the mobile terminal when track is presented.
During actual enforcement, above-mentioned steps 301 to step 303 can be by including application processor in mobile terminal The instruction for depositing storage in middle execution storage medium (such as flash memory) is completed, and above-mentioned step 304 is color applying drawing The operation of track, can be completed by the graphic process unit of mobile terminal.
Embodiment three
Previous embodiment is with the granularity of texture image and the granularity one for being constituted the point in the point set of target trajectory Illustrate as a example by cause, can there is the granularity and the point set for constituting target trajectory of texture image during actual enforcement In point the inconsistent situation of granularity, the present embodiment is explained.
The present embodiment records a kind of image processing method, as shown in figure 8, comprising the following steps:
Step 401, obtains texture image.
Referring to previous embodiment one and embodiment two, texture image set in advance can be obtained, or, root Figure bank interface is called to generate corresponding texture image according to the target color information of target trajectory.
The color value of texture image can call figure bank interface according to the target color information of the target trajectory Generate, such as when navigation way is presented in map application, can be set in map application according to user The color of navigation way calls figure bank interface to generate corresponding texture image, in the unlock interface of any application In (including the launcher applications that the desktop of responsible mobile terminal shows) unblock track for being set according to user Color call figure bank interface to generate corresponding texture image;Again for example, navigation is presented in map application During route, the color of the navigation way that can be set in map application according to user calls figure bank interface to give birth to Into corresponding texture image, (show including the desktop of responsible mobile terminal in the unlock interface of any application Launcher applications) according to user setting unblock track color call figure bank interface generate it is corresponding Texture image.
Because texture image is for replacing constituting the point of target trajectory, the shape of texture image in the present embodiment Difference the visual effect of target trajectory will not be produced and significantly affect, therefore the shape of texture image is not limited It is fixed.
Step 402, the sparse degree of the target trajectory that the target effect based on the target trajectory is indicated, It is determined that the density of point corresponding with the sparse degree.
Target effect indicates the sparse degree of target trajectory, to represent sparse degree using hundred-mark system as a example by, 100% expression target trajectory shows as solid line in visual effect, and 0 represents target trajectory in visual effect upper table It is now dotted line, and the sparse degree constituted between the phantom line segments of target trajectory reaches maximum;In map application, The target trajectory of solid line and the target trajectory of dotted line are often only needed to (and to the sparse of the phantom line segments of target trajectory Degree is not required), correspondingly, the sparse degree of target trajectory can be represented using binary system, wherein two System 1 represents that target trajectory is solid line, and Binary Zero represents that target trajectory is phantom line segments.
The basic element for constituting target trajectory is a little distribution density of point and the sparse degree negative of target trajectory Close, the density of point is bigger, then the sparse degree of target trajectory is less, and solid line is shown as in visual effect, Conversely, the density of point is less, then the sparse degree of target trajectory is bigger, and dotted line is shown as in visual effect; The sparse degree of target trajectory and the incidence relation of the density of point are set up, the target based on the target trajectory is imitated During the sparse degree of the target trajectory that fruit indicates, the above-mentioned incidence relation that can pass through to pre-build determines The density of point corresponding with the sparse degree.
Step 403, the density of granularity and the point based on default point, enters to the target trajectory Row is divided, and obtains the point set of the correspondence target trajectory.
Above-mentioned step 403 and step 404 is the target of the granularity based on default point and target trajectory Effect is divided to the line segment of the target trajectory, obtains the point set of the correspondence target trajectory.
Step 404, judges whether the granularity of the point is consistent with the granularity of the texture image;If differed Cause, then execution step 405;Otherwise, execution step 406.
Step 405, the granularity for adjusting the texture image using filtering algorithm is consistent with the granularity of the point.
For example, when the granularity of texture image is more than the granularity of point, (such as examined based on edge using filtering algorithm The filtering algorithm of survey) reduce texture image granularity with put granularity it is consistent;The granularity of texture image is less than point Granularity when, using filtering algorithm (as based on rim detection filtering algorithm) expand texture image granularity It is consistent with the granularity of point such that it is able to allow texture image to substitute the point in the point set for constituting target trajectory.
Step 406, using the one-to-one mode of point in texture image and composition target trajectory, using institute The point that texture image is drawn in the point set of the correspondence target trajectory is stated, the corresponding image of target trajectory is obtained.
During actual enforcement, above-mentioned steps 401 to step 405 can be by including application processor in mobile terminal The instruction for depositing storage in middle execution storage medium (such as flash memory) is completed, and above-mentioned step 406 is color applying drawing The operation of track, can be completed by the graphic process unit of mobile terminal.
Example IV
Previous embodiment is with the granularity of texture image and the granularity one for being constituted the point in the point set of target trajectory Illustrate as a example by cause, can there is the granularity and the point set for constituting target trajectory of texture image during actual enforcement In point the inconsistent situation of granularity, the present embodiment is explained.
The present embodiment records a kind of image processing method, as shown in figure 9, comprising the following steps:
Step 501, obtains texture image.
Referring to previous embodiment one and embodiment two, texture image set in advance can be obtained, or, root Figure bank interface is called to generate corresponding texture image according to the target color information of target trajectory.
The color value of texture image can call figure bank interface according to the target color information of the target trajectory Generate, such as when navigation way is presented in map application, can be set in map application according to user The color of navigation way calls figure bank interface to generate corresponding texture image, in the unlock interface of any application In (including the launcher applications that the desktop of responsible mobile terminal shows) unblock track for being set according to user Color call figure bank interface to generate corresponding texture image;Again for example, navigation is presented in map application During route, the color of the navigation way that can be set in map application according to user calls figure bank interface to give birth to Into corresponding texture image, (show including the desktop of responsible mobile terminal in the unlock interface of any application Launcher applications) according to user setting unblock track color call figure bank interface generate it is corresponding Texture image.
Because texture image is for replacing constituting the point of target trajectory, the shape of texture image in the present embodiment Difference the visual effect of target trajectory will not be produced and significantly affect, therefore the shape of texture image is not limited It is fixed.
Step 502, the sparse degree of the target trajectory that the target effect based on the target trajectory is indicated, It is determined that the density of point corresponding with the sparse degree.
Target effect indicates the sparse degree of target trajectory, to represent sparse degree using hundred-mark system as a example by, 100% expression target trajectory shows as solid line in visual effect, and 0 represents target trajectory in visual effect upper table It is now dotted line, and the sparse degree constituted between the phantom line segments of target trajectory reaches maximum;In map application, The target trajectory of solid line and the target trajectory of dotted line are often only needed to (and to the sparse of the phantom line segments of target trajectory Degree is not required), correspondingly, the sparse degree of target trajectory can be represented using binary system, wherein two System 1 represents that target trajectory is solid line, and Binary Zero represents that target trajectory is phantom line segments.
The basic element for constituting target trajectory is a little distribution density of point and the sparse degree negative of target trajectory Close, the density of point is bigger, then the sparse degree of target trajectory is less, and solid line is shown as in visual effect, Conversely, the density of point is less, then the sparse degree of target trajectory is bigger, and dotted line is shown as in visual effect; The sparse degree of target trajectory and the incidence relation of the density of point are set up, the target based on the target trajectory is imitated During the sparse degree of the target trajectory that fruit indicates, the above-mentioned incidence relation that can pass through to pre-build determines The density of point corresponding with the sparse degree.
Step 503, the density of granularity and the point based on default point, enters to the target trajectory Row is divided, and obtains the point set of the correspondence target trajectory.
Above-mentioned step 503 and step 504 is the target of the granularity based on default point and target trajectory Effect is divided to the line segment of the target trajectory, obtains the point set of the correspondence target trajectory.
Step 504, judges whether the granularity of the point is consistent with the granularity of the texture image;If differed Cause, then execution step 505;Otherwise, execution step 506.
Step 505, the granularity for adjusting the texture image using filtering algorithm is consistent with the granularity of the point.
For example, when the granularity of texture image is more than the granularity of point, (such as examined based on edge using filtering algorithm The filtering algorithm of survey) reduce texture image granularity with put granularity it is consistent;The granularity of texture image is less than point Granularity when, using filtering algorithm (as based on rim detection filtering algorithm) expand texture image granularity It is consistent with the granularity of point such that it is able to allow texture image to substitute the point in the point set for constituting target trajectory.
Step 506, using the one-to-one mode of point in texture image and composition target trajectory, using institute State the point that texture image is drawn in the point set of the correspondence target trajectory.
Step 507, obtains target image.
Generally, track is that Overlapping display (namely adopts patch on certain background image (target image) The form of figure shows), for example, the navigation way in the map application of mobile terminal is the map in navigation area Upper Overlapping display, the unblock track (by taking nine grids unblock as an example) in mobile terminal is presented in mobile terminal Nine grids image on carry out Overlapping display.
Step 508, by the target trajectory target image is mapped to, and obtains carrying the target track The target image of mark.
Below showing that the specific example of navigation way is illustrated in the map application of mobile terminal.
Referring to Fig. 9, the map application in mobile terminal (is such as indicated from position A to position according to the instruction of user The two bar navigation routes of B are put, respectively user's solid line navigation way and dotted line navigation way show), need to refer to Go out, be not mobile whole although the line segment 1 illustrated in Fig. 9 and line segment 2 are corresponding with navigation way The final actual navigation way for presenting in end, but the correspondence navigation that the application processor of mobile terminal is determined The line segment of route, the corresponding navigation way 2 of its middle conductor 2 needs have the display effect realized, line segment 1 Corresponding navigation way 1 needs the display effect with dotted line;
For line segment 2, due to being linear pattern, the beginning and end shown in Figure 10 is determined based on line segment 2, And based on density filling point between beginning and end corresponding with dotted line effect, when graphic process unit uses line When reason image replaces point to be drawn, the navigation way 2 drawn out is phantom line segments;
For line segment 1, due to being broken line type, based on line segment 1 determine starting point shown in Figure 11, terminal and Flex point, and based on density filling point between starting point and flex point, flex point and terminal corresponding with effect is realized, When graphic process unit replaces point using texture image to be drawn, the navigation way 1 drawn out is real Line segment;
It is pointed out that as shown in Figure 10 and Figure 11, when dividing to target trajectory, the point for using Granularity be typically what human eye cannot be differentiated, therefore when dividing to target trajectory can point of use to target trajectory Width carries out expanding the point set for obtaining target trajectory, so as to using texture graphics replace point drawn when, Can make the navigation way that can be drawn out that there is the discernmible width of human eye, rather than show as one cannot The fine rule of resolution width, so as to eye-catching effect.
Navigation way as shown in figure 12, is mapped to map (after target image) most by the navigation way drawn out It is as shown in figure 13 in the schematic diagram of the screen display of mobile terminal eventually.
Embodiment five
The present embodiment records a kind of computer-readable medium, can for ROM (for example, read-only storage, FLASH memory, transfer device etc.), magnetic storage medium (for example, tape, disc driver etc.), light Learn storage medium (for example, CD-ROM, DVD-ROM, paper card, paper tape etc.) and other know class The program storage of type;Be stored with computer executable instructions in the computer-readable medium, when execution institute When stating instruction, causing at least one application processor to perform includes following operation:Obtain texture image;Base The corresponding line segment of the target trajectory is carried out in the default granularity of point and the target effect of target trajectory Divide, obtain the point set of the correspondence target trajectory;The correspondence target is drawn using the texture image The point set of track, obtains the corresponding image of the target trajectory.
As an example, when executed, the execution of at least one application processor is also caused to include following Operation:Obtain texture image set in advance;Or, according to the target color information of the target trajectory Figure bank interface is called to generate corresponding texture image.
As an example, when executed, the execution of at least one application processor is also caused to include following Operation:The sparse degree of the target trajectory that the target effect based on the target trajectory is indicated, it is determined that The density of point corresponding with the sparse degree;
The density of granularity and the point based on default point, enters to the corresponding line segment of the target trajectory Row is divided, and obtains the point set of the correspondence target trajectory.
As an example, when executed, the execution of at least one application processor is also caused to include following Operation:Based on the one-to-one mode of point in texture image and composition target trajectory, using the texture Point in the point set of the Image Rendering correspondence target trajectory.
As an example, when executed, the execution of at least one application processor is also caused to include following Operation:Drawn before the point set of the correspondence target trajectory using the texture image, judge the point Granularity it is whether consistent with the granularity of the texture image;When inconsistent, using filtering algorithm the line is adjusted The granularity of reason image is consistent with the granularity of the point.
As an example, when executed, the execution of at least one application processor is also caused to include following Operation:Obtain target image;The corresponding image of the target trajectory is mapped into the target image, is obtained To the target image for carrying the corresponding image of the target trajectory.
Embodiment six
The present embodiment records a kind of mobile terminal, and as shown in figure 14, the mobile terminal includes:
Application processor 100, for obtaining texture image;
The application processor 100, is additionally operable to be based on the granularity of default point and the target of target trajectory Effect is divided to the corresponding line segment of the target trajectory, obtains the point set of the correspondence target trajectory;
Graphic process unit 200, for drawing the point set of the correspondence target trajectory using the texture image, Obtain the corresponding image of the target trajectory.
As an example, the application processor 100 is additionally operable to obtain texture image set in advance;Or,
Figure bank interface is called to generate corresponding texture image according to the target color information of the target trajectory.
As an example, the application processor 100 is additionally operable to the instruction of the target effect based on the target trajectory The target trajectory sparse degree, it is determined that the density of point corresponding with the sparse degree;
The density of granularity and the point based on default point, enters to the corresponding line segment of the target trajectory Row is divided, and obtains the point set of the correspondence target trajectory.
As an example, the graphic process unit 200 is additionally operable to based on texture image and constitutes in target trajectory The one-to-one mode of point, using the texture image point in the point set of the correspondence target trajectory is drawn.
As an example, the graphic process unit 200 is also used for the texture image and draws the correspondence mesh Before the point set of mark track, judge whether the granularity of the point is consistent with the granularity of the texture image;
When inconsistent, the granularity for adjusting the texture image using filtering algorithm is consistent with the granularity of the point.
As an example, the graphic process unit 200 is additionally operable to obtain target image;By the target trajectory pair The image answered is mapped to the target image, obtains carrying the mesh of the corresponding image of the target trajectory Logo image.
During actual enforcement, mobile terminal is additionally provided with display 300 (being connected with graphic process unit 200), shows Show the track that graphic process unit is drawn;Be also provided with mobile terminal buffer 400 (as it is i.e. dynamic with Machine accesses DRAM memory), for caching the data produced when application processor 100 carries out above-mentioned process.
In sum, the embodiment of the present invention has the advantages that:
Using the one-to-one mode of point in point set of the texture image with composition target trajectory, using advance The texture image of setting replaces the point in point set and (namely carrys out wash with watercolours using texture image drawing target trajectory Dye target trajectory), for building for the consuming mobile terminal computing resource that target trajectory need not adopt correlation technique Mould process, when different effect (target effects) are presented for same target trajectory, it is only necessary to by point Density come control constitute target trajectory point set midpoint density, it is convenient to carry out, saved movement The computing resource of terminal, it is ensured that real-time response performance of the mobile terminal when track is presented.
One of ordinary skill in the art will appreciate that:Realize that all or part of step of said method embodiment can To be completed by the related hardware of programmed instruction, aforesaid program can be stored in an embodied on computer readable and deposit In storage media, the program upon execution, performs the step of including said method embodiment;And aforesaid storage Medium includes:Movable storage device, random access memory (RAM, Random Access Memory), Read-only storage (ROM, Read-Only Memory), magnetic disc or CD etc. are various can be with storage program The medium of code.
Or, if the above-mentioned integrated unit of the present invention is realized and as independently using in the form of software function module Production marketing or when using, it is also possible in being stored in a computer read/write memory medium.Based on so Understanding, the part that the technical scheme of the embodiment of the present invention substantially contributes in other words to correlation technique can To be embodied in the form of software product, the computer software product is stored in a storage medium, bag Include some instructions to use so that a computer equipment (can be personal computer, server or network Equipment etc.) perform all or part of each embodiment methods described of the invention.And aforesaid storage medium bag Include:Movable storage device, RAM, ROM, magnetic disc or CD etc. are various can be with Jie of store program codes Matter.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited to This, any those familiar with the art the invention discloses technical scope in, can readily occur in Change or replacement, all should be included within the scope of the present invention.Therefore, protection scope of the present invention should It is defined by the scope of the claims.

Claims (12)

1. a kind of image processing method, it is characterised in that methods described includes:
Obtain texture image;
Based on the default granularity of point and the target effect of target trajectory to the corresponding line of the target trajectory Duan Jinhang is divided, and obtains the point set of the correspondence target trajectory;
The point set of the correspondence target trajectory is drawn using the texture image, the target trajectory pair is obtained The image answered.
2. the method for claim 1, it is characterised in that the acquisition texture image, including:
Obtain texture image set in advance;Or,
Figure bank interface is called to generate corresponding texture image according to the target color information of the target trajectory.
3. the method for claim 1, it is characterised in that it is described based on the granularity of default point, with And the target effect of the target trajectory is divided to the corresponding line segment of the target trajectory, correspondence institute is obtained The point set of target trajectory is stated, including:
The sparse degree of the target trajectory that the target effect based on the target trajectory is indicated, it is determined that and institute State the density of the corresponding point of sparse degree;
The density of granularity and the point based on default point, enters to the corresponding line segment of the target trajectory Row is divided, and obtains the point set of the correspondence target trajectory.
4. the method for claim 1, it is characterised in that the use texture image draws correspondence institute The point set of target trajectory is stated, including:
Based on the one-to-one mode of point in texture image and composition target trajectory, using the texture image Draw the point in the point set of the correspondence target trajectory.
5. method as claimed in claim 4, it is characterised in that methods described also includes:
Drawn before the point set of the correspondence target trajectory using the texture image, judge the grain of the point Whether degree is consistent with the granularity of the texture image;
When inconsistent, the granularity for adjusting the texture image using filtering algorithm is consistent with the granularity of the point.
6. the method as described in any one of claim 1 to 5, it is characterised in that methods described also includes:
Obtain target image;
The corresponding image of the target trajectory is mapped into the target image, obtains carrying the target track The target image of the corresponding image of mark.
7. a kind of mobile terminal, it is characterised in that the mobile terminal includes:
Application processor, for obtaining texture image, uploads the texture image for obtaining to graphic process unit;
The application processor, is additionally operable to be based on the granularity of default point and the target effect of target trajectory The corresponding line segment of the target trajectory is divided, the point set of the correspondence target trajectory is obtained;
The graphic process unit, for drawing the point set of the correspondence target trajectory using the texture image, Obtain the corresponding image of the target trajectory.
8. mobile terminal as claimed in claim 7, it is characterised in that
The application processor is additionally operable to obtain texture image set in advance;Or,
Figure bank interface is called to generate corresponding texture image according to the target color information of the target trajectory.
9. mobile terminal as claimed in claim 7, it is characterised in that
The application processor is additionally operable to the target trajectory that the target effect based on the target trajectory is indicated Sparse degree, it is determined that the density of point corresponding with the sparse degree;
The density of granularity and the point based on default point, enters to the corresponding line segment of the target trajectory Row is divided, and obtains the point set of the correspondence target trajectory.
10. mobile terminal as claimed in claim 7, it is characterised in that
The graphic process unit is additionally operable to square correspondingly with the point constituted in target trajectory based on texture image Formula, using the texture image point in the point set of the correspondence target trajectory is drawn.
11. mobile terminals as claimed in claim 10, it is characterised in that the graphic process unit is additionally operable to Drawn before the point set of the correspondence target trajectory using the texture image, judge the point granularity and Whether the granularity of the texture image is consistent;
When inconsistent, the granularity for adjusting the texture image using filtering algorithm is consistent with the granularity of the point.
12. mobile terminals as described in any one of claim 7 to 11, it is characterised in that
The graphic process unit is additionally operable to obtain target image;The corresponding image of the target trajectory is mapped to The target image, obtains carrying the target image of the corresponding image of the target trajectory.
CN201510737701.8A 2015-11-03 2015-11-03 Image processing method and mobile terminal Active CN106657560B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510737701.8A CN106657560B (en) 2015-11-03 2015-11-03 Image processing method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510737701.8A CN106657560B (en) 2015-11-03 2015-11-03 Image processing method and mobile terminal

Publications (2)

Publication Number Publication Date
CN106657560A true CN106657560A (en) 2017-05-10
CN106657560B CN106657560B (en) 2018-11-23

Family

ID=58810303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510737701.8A Active CN106657560B (en) 2015-11-03 2015-11-03 Image processing method and mobile terminal

Country Status (1)

Country Link
CN (1) CN106657560B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040038860A (en) * 2002-10-30 2004-05-08 후지 샤신 필름 가부시기가이샤 Method, apparatus, and program for image processing
JP2004242213A (en) * 2003-02-07 2004-08-26 Ricoh Co Ltd Image processing apparatus, image processing method, color conversion processing apparatus, color conversion processing method, and storage medium
CN101236657A (en) * 2008-03-03 2008-08-06 吉林大学 Single movement target track tracking and recording method
CN102663343A (en) * 2012-04-26 2012-09-12 长春理工大学 Single-observer automatic identification method of multi-target tracks
CN104935787A (en) * 2015-05-29 2015-09-23 努比亚技术有限公司 Image processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040038860A (en) * 2002-10-30 2004-05-08 후지 샤신 필름 가부시기가이샤 Method, apparatus, and program for image processing
JP2004242213A (en) * 2003-02-07 2004-08-26 Ricoh Co Ltd Image processing apparatus, image processing method, color conversion processing apparatus, color conversion processing method, and storage medium
CN101236657A (en) * 2008-03-03 2008-08-06 吉林大学 Single movement target track tracking and recording method
CN102663343A (en) * 2012-04-26 2012-09-12 长春理工大学 Single-observer automatic identification method of multi-target tracks
CN104935787A (en) * 2015-05-29 2015-09-23 努比亚技术有限公司 Image processing method and device

Also Published As

Publication number Publication date
CN106657560B (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN107423445B (en) A kind of map data processing method, device and storage medium
US20180225397A1 (en) Systems and methods for fast simulation and visualization of sparse fluids
CN110956673A (en) Map drawing method and device
CN105528207A (en) Virtual reality system, and method and apparatus for displaying Android application images therein
CN105335445A (en) Layout display method and device
CN110503718B (en) Three-dimensional engineering model lightweight display method
US10242264B1 (en) System and method for training a machine-learning model to identify real-world elements
CN101414383A (en) Image processing apparatus and image processing method
US11561637B2 (en) Method and device of drawing handwriting track, electronic apparatus, medium, and program product
CN106548500A (en) A kind of two-dimension situation image processing method and device based on GPU
Rudomín et al. Fragment shaders for agent animation using finite state machines
US20160307294A1 (en) Systems and Methods for Displaying Patterns of Recurring Graphics on Digital Maps
CA2987245A1 (en) Layout engine
CN112258610A (en) Image labeling method and device, storage medium and electronic equipment
CN103955957A (en) 3D graphics rending method and system
CN104346046B (en) Three-dimensional artificial page turning method and system
CN112907451A (en) Image processing method, image processing device, computer equipment and storage medium
CN113709389A (en) Video rendering method and device, electronic equipment and storage medium
CN111414104B (en) Electronic map local display method and device
CN106657560A (en) Image processing method and mobile terminal
CN106716500A (en) Program, information processing device, depth definition method, and recording medium
CN115880127A (en) Rendering format selection method and related equipment thereof
CN110738719A (en) Web3D model rendering method based on visual range hierarchical optimization
EP2958078B1 (en) Timeline tool for producing computer-generated animations
CN105513122B (en) The method for building up and device of umbra volume

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