CN106657560B - Image processing method and mobile terminal - Google Patents

Image processing method and mobile terminal Download PDF

Info

Publication number
CN106657560B
CN106657560B CN201510737701.8A CN201510737701A CN106657560B CN 106657560 B CN106657560 B CN 106657560B CN 201510737701 A CN201510737701 A CN 201510737701A CN 106657560 B CN106657560 B CN 106657560B
Authority
CN
China
Prior art keywords
target trajectory
point
target
image
texture 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.)
Active
Application number
CN201510737701.8A
Other languages
Chinese (zh)
Other versions
CN106657560A (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 a kind of image processing method and mobile terminals;Method includes:Obtain texture image;The target effect of granularity and target trajectory based on preset point divides the corresponding line segment of the target trajectory, obtains the point set for corresponding to the target trajectory;The point set that the corresponding target trajectory is drawn using the texture image, obtains the corresponding image of the target trajectory.Using the present invention, mobile terminal track drafting in such a way that efficient, low-resource occupies can be supported.

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 methods and mobile terminal.
Background technique
Mobile terminal (such as smart phone, tablet computer) is widely used;Although the computing capability of current mobile terminal Significant progress has been obtained with image-capable, but has been still had with the computing capability at the end PC and image-capable larger Gap.
There are a typical application scenarios for mobile terminal:Track is presented.Such as it is in real time according to the touch control operation of user Current family graphical interfaces operation trace, or in map application present route track etc..
When needing that track is presented, the track that the application processor in mobile terminal is in memory presented needs is built Mould, and the rendering by image processor based on modeling result progress track, to show track;Wherein including application processor The operation for depositing middle modeling is fairly time consuming, and needs application processor to carry out modeling processing respectively different tracks, frequently The modeling processing for being carried out track based on memory using application processor, will lead to and make to the computing resource and memory of application processor At a large amount of occupancy, and then the performance of mobile terminal is influenced, such as the resource (packet of mobile terminal may be caused because of track drafting Include the computing resource and memory for processor) insufficient, the problem of appearance can not timely respond to user's operation, influence user's use Experience.
Summary of the invention
The embodiment of the present invention provides a kind of image processing method and mobile terminal, and mobile terminal can be supported with efficient, low The mode track drafting of resource occupation.
What the technical solution of the embodiment of the present invention was realized in:
The embodiment of the present invention provides a kind of image processing method, the method includes:
Obtain texture image;
The target effect of granularity and target trajectory based on preset point carries out the corresponding line segment of the target trajectory It divides, obtains the point set for corresponding to the target trajectory;
The point set that the corresponding target trajectory is drawn using the texture image, obtains the corresponding figure of the target trajectory Picture.
The embodiment of the present invention provides a kind of mobile terminal, and the mobile terminal includes:
Application processor uploads the texture image of acquisition to graphics processor for obtaining texture image;
The application processor is also used to the target effect of granularity and target trajectory based on preset point to described The corresponding line segment of target trajectory is divided, and the point set for corresponding to the target trajectory is obtained;
The graphics processor is obtained for using the texture image to draw the point set of the corresponding target trajectory The corresponding image of the target trajectory.
It is square correspondingly using the point in the point set of texture image and composition target trajectory in the embodiment of the present invention Formula replaces the point in point set to draw target trajectory (namely using texture image using pre-set texture image Render target trajectory), the modeling for target trajectory without the consuming mobile terminal computing resource of the relevant technologies is handled, When different effects (target effect) is presented for the same target trajectory, it is only necessary to control composition target by the density of point The density at the point set midpoint of track, it is convenient to carry out, the computing resource of mobile terminal has been saved, ensure that mobile terminal exists Real-time response performance when track is presented.
Detailed description of the invention
Fig. 1 is the implementation process schematic diagram of track drafting in the related technology;
Fig. 2 is the schematic diagram for the corresponding line segment in track for needing to draw in the related technology;
Fig. 3 is in the related technology based on the schematic diagram for needing the corresponding line segment in track drawn to be modeled;
Fig. 4 is the schematic diagram of track drafting in the related technology;
Fig. 5 is the schematic diagram for the track drawn out in the related technology;
Fig. 6 is the implementation process schematic diagram one of image processing method in the embodiment of the present invention;
Fig. 7 is the implementation process schematic diagram two of image processing method in the embodiment of the present invention;
Fig. 8 is the implementation process schematic diagram three of image processing method in the embodiment of the present invention;
Fig. 9 is the schematic diagram of the corresponding line segment of target trajectory determining in the target image in the embodiment of the present invention;
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 routine schematic diagram drawn out in the embodiment of the present invention;
Figure 13 is the schematic diagram that target trajectory is presented in mobile terminal in the embodiment of the present invention;
Figure 14 is the structural schematic diagram of mobile terminal in the embodiment of the present invention.
Specific embodiment
The present invention is further described in detail below with reference to the accompanying drawings and embodiments.It should be appreciated that described herein Specific embodiment is only used to explain the present invention, is not intended to limit the present invention.
Divide below with reference to the embodiment that track is presented to the relevant technologies in the example that navigation routine is presented on map Analysis.
When map and navigation routine is presented in mobile terminal, the navigation routine presented on map is usually constructed with certain width It spends (such as 20 pixels);To avoid the setting-out interface renderings navigation routine using OpenGL from will lead to the obvious problem of pixel sawtooth, The mode that the relevant technologies generally use triangular texture textures draws navigation routine, as shown in Figure 1, specifically including following step Suddenly:
Step 101, starting point, terminal and the position passed through of original navigation routine are obtained.
Original navigation routine as shown in Figure 2 is a line segment.
Step 102, it is modeled for navigation routine.
As shown in figure 3, expanding a fixed width to both sides to the starting point of original navigation routine, terminal and the position passed through Degree (possessed width when navigation routine is presented as needed and determines for the width specifically extended), determines there is one fixed width For showing the region of navigation routine, then the region is divided with multiple triangles, it is total to form 1,2,3,4,5,6,7,8 8 vertex and 012,123,234,345,456,678 totally 6 triangles.
Step 103, texture coordinate is calculated based on modeling result.
The texture coordinate for constituting the triangle of above-mentioned zone (region of display navigation routine) is namely calculated, triangle Texture coordinate include each point in triangle two-dimensional coordinate indicate and corresponding color value.
Step 104, it calls the setting-out interface of OpenGL to be based on texture coordinate and draws navigation routine.
Step 101 is executed to step 103 by application processor, and triangular apex data are transmitted at image by application processor Device is managed, as shown in figure 4, image processor carries out texture padding in texture image to each triangular basis, to draw out Fig. 5 institute The navigation routine shown (navigation routine is for filling black shown in Fig. 5).
The texture coordinate of each triangle is different, and 012,123,456,567 4 triangle on both sides, is used in Fig. 4 The cup head at drawn path both ends can be connected between different navigation route by cup head.
The mode of above-mentioned drafting navigation routine can cause frequently to occupy to processor and memory, and processing is time-consuming, influence The response performance of mobile terminal;For example, mobile terminal needs the shape of the track presented constantly to convert in practical application, it is right It requires to carry out above-mentioned modeling processing in each track, needs different display effects (such as real even for same track Line display effect and dotted line display effect) it is also required to carry out modeling processing respectively, cause to make application processor and memory source At excessive consumption, especially when track is continuously presented, (such as user continuously draws rail by touch control operation in application of drawing When mark).
For the above problem that track is presented in the terminal, referring to Fig. 6, in the embodiment of the present invention, texture maps are obtained Picture, and the target effect of the granularity based on preset point and target trajectory divides the corresponding line segment of target trajectory, obtains To the point set for constituting target trajectory;The point set that the corresponding target trajectory is drawn using the texture image is obtained described The corresponding image of target trajectory.
Obtain constituting the point set of target trajectory by the division to target trajectory, and by drawing using texture image The point set for constituting target trajectory, realizes the drafting to target trajectory, and the shape library taken full advantage of in mobile terminal is supported With texture image replace point come drawn characteristic (shape library be usually support with texture image come drawing image such as personage, Scenery etc.) carry out track drafting, without carrying out modeling processing for target trajectory, the computing resource of mobile terminal is saved, has been guaranteed The response performance of mobile terminal.
It should be pointed out that subsequent in the embodiment of the present invention is to run the mobile terminal of OpenGL ES 2.0 and (such as transport The mobile terminal of row android system, the mobile terminal for running iOS system) for be illustrated, in simple terms, OpenGL ES 2.0 be to carry out the OpenGL version after function is cut out for embedded equipment, wherein 2.0 versions and 1.x incompatible version, difference With compatibility referring to android official document, OpenGL ES 2.0 allows that point is replaced to carry out drafting operation with texture image, Certainly, the technical solution that the embodiment of the present invention is recorded is equally applicable to the mobile end of the shape library different from OpenGL ES 2.0 End, as long as the shape library allows that point is replaced to carry out drafting operation with texture image.
In addition, the mobile terminal recorded in the embodiment of the present invention can be embodied in various forms, for example, above-mentioned shifting Dynamic terminal can be smart phone, tablet computer, laptop or wearable device (such as smart glasses, smart watches), The operating system of mobile terminal can be can transporting for Android operation system, IOS operating system or any other third party exploitation Row is in operating system (such as the mobile edition linux system, blackberry, blueberry QNX of micro-computer architecture (including at least processor and memory) Operating system etc.), it is illustrated by smart phone of mobile terminal in the attached drawing in the embodiment of the present invention, this is not constituted to this hair The restriction for the mobile terminal style that the technical solution that bright embodiment is recorded is applicable in.
The following embodiment of the present invention is proposed based on the image processing method recorded above and mobile terminal.
Embodiment one
The present embodiment records a kind of image processing method, as shown in fig. 6, including the following steps:
Step 201, preset texture image is obtained.
The shape and color value information of texture image can be preset, based on there are a variety of presentation tracks in mobile terminal Scene, can be for the corresponding texture image of scene setting of different presentation tracks, for example, can be set in map application Set the red color for texture image;It is arranged when operation trace (track of the contact lock state of such as mobile terminal) is presented red Color is the color of texture image.
It is for replacing constituting target trajectory (track for namely needing to draw) by texture image in this present embodiment Point, the difference of the shape of texture image, which will not generate the visual effect of target trajectory, to be significantly affected, therefore the shape of texture image Shape is without limitation.
Step 202, based on the target trajectory target effect instruction the target trajectory sparse degree, determine with The density of the corresponding point of the sparse degree.
Target effect indicates the sparse degree of target trajectory, for indicating sparse degree using hundred-mark system, 100% table Show that target trajectory shows as solid line in visual effect, 0 expression target trajectory shows as dotted line in visual effect, and constitutes mesh It marks the sparse degree between the phantom line segments of track and reaches maximum;In map application, often only need solid line target trajectory and The target trajectory (and not requiring the sparse degree of the phantom line segments of target trajectory) of dotted line, correspondingly, can use binary system Indicate the sparse degree of target trajectory, wherein binary one indicates that target trajectory is solid line, and Binary Zero indicates that target trajectory is Phantom line segments.
Constitute target trajectory basic element be a little, the sparse degree of the distribution density of point and target trajectory is negatively correlated, point Density it is bigger, then the sparse degree of target trajectory is smaller, solid line is shown as in visual effect, conversely, point density it is smaller, Then the sparse degree of target trajectory is bigger, and dotted line is shown as in visual effect;Establish the sparse degree and point of target trajectory The incidence relation of density can be with when the sparse degree of the target trajectory of the target effect instruction based on the target trajectory Pass through the density of the determining point corresponding with the sparse degree of the above-mentioned incidence relation that pre-establishes.
Step 203, the density of granularity and the point based on preset point, line segment corresponding to the target trajectory It is divided, obtains the point set for corresponding to the target trajectory.
Above-mentioned step 203 and step 204 for granularity and target trajectory based on preset point target effect to institute The line segment for stating target trajectory is divided, and the point set for corresponding to the target trajectory is obtained;The line segment of target trajectory characterizes mesh Starting point, terminal and the inflection point of track are marked, the corresponding line segment of target trajectory can be straight line or the curve of arbitrary shape.
Step 204, using the one-to-one mode of point in texture image and composition target trajectory, the texture maps are used The point in point set as drawing the corresponding target trajectory, obtains the corresponding image of target trajectory.
The granularity of point refers to the basic square measure for dividing target trajectory, and the granularity of point can be consistent with texture image, from And directly point can be replaced to be drawn to obtain target trajectory using texture image.
Using the one-to-one mode of point in the point set of texture image and composition target trajectory, use is pre-set Texture image replaces the point in point set to draw target trajectory (namely rendering target trajectory using texture image), right In target trajectory without the modeling processing of the consuming mobile terminal computing resource of the relevant technologies, for the same target trajectory When different effects (target effect) is presented, it is only necessary to control the point set midpoint for constituting target trajectory by the density of point Density, it is convenient to carry out, the computing resource of mobile terminal has been saved, ensure that real-time sound of the mobile terminal when track is presented Answer performance.
When actual implementation, above-mentioned steps 201 to step 203 can be executed in memory by application processor in mobile terminal The instruction stored in storage medium (such as flash memory) is completed, such as can be realized by application processor by executing coloration program, Above-mentioned step 204 is the operation of color applying drawing track, can be completed by the graphics processor of mobile terminal.
Embodiment two
The present embodiment records a kind of image processing method, as shown in fig. 7, comprises following steps:
Step 301, 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 to generate according to the target color information of the target trajectory, It, can be according to the color tune for the navigation routine that user sets in map application such as when navigation routine being presented in map application Corresponding texture image is generated with figure bank interface, (the desktop including being responsible for mobile terminal in the unlock interface arbitrarily applied The launcher application of display) according to the corresponding texture maps of color calling figure bank interface generation of unlock track set by user Picture.
By the point that texture image in this present embodiment is for replacing constituting target trajectory, the difference of the shape of texture image The visual effect of target trajectory will not be generated and be significantly affected, therefore the shape of texture image is without limitation.
Step 302, based on the target trajectory target effect instruction the target trajectory sparse degree, determine with The density of the corresponding point of the sparse degree.
Target effect indicates the sparse degree of target trajectory, for indicating sparse degree using hundred-mark system, 100% table Show that target trajectory shows as solid line in visual effect, 0 expression target trajectory shows as dotted line in visual effect, and constitutes mesh It marks the sparse degree between the phantom line segments of track and reaches maximum;In map application, often only need solid line target trajectory and The target trajectory (and not requiring the sparse degree of the phantom line segments of target trajectory) of dotted line, correspondingly, can use binary system Indicate the sparse degree of target trajectory, wherein binary one indicates that target trajectory is solid line, and Binary Zero indicates that target trajectory is Phantom line segments.
Constitute target trajectory basic element be a little, the sparse degree of the distribution density of point and target trajectory is negatively correlated, point Density it is bigger, then the sparse degree of target trajectory is smaller, solid line is shown as in visual effect, conversely, point density it is smaller, Then the sparse degree of target trajectory is bigger, and dotted line is shown as in visual effect;Establish the sparse degree and point of target trajectory The incidence relation of density can be with when the sparse degree of the target trajectory of the target effect instruction based on the target trajectory Pass through the density of the determining point corresponding with the sparse degree of the above-mentioned incidence relation that pre-establishes.
Step 303, the density of granularity and the point based on preset point, divides the target trajectory, obtains To the point set of the correspondence target trajectory.
Above-mentioned step 303 and step 304 for granularity and target trajectory based on preset point target effect to institute The line segment for stating target trajectory is divided, and the point set for corresponding to the target trajectory is obtained.
Step 304, using the one-to-one mode of point in texture image and composition target trajectory, the texture maps are used The point in point set as drawing the corresponding target trajectory, obtains the corresponding image of target trajectory.
The granularity of point refers to the basic square measure for dividing target trajectory, and the granularity of point can be consistent with texture image, from And directly point can be replaced to be drawn to obtain target trajectory using texture image.
Using the one-to-one mode of point in the point set of texture image and composition target trajectory, using according to target track The target color information of mark calls figure bank interface to generate corresponding texture image instead of the point in point set to draw target track Mark, the modeling for target trajectory without the consuming mobile terminal computing resource of the relevant technologies is handled, for the same mesh When different effects (target effect) is presented in mark track, it is only necessary to control the point set for constituting target trajectory by the density of point The density at midpoint, it is convenient to carry out, the computing resource of mobile terminal has been saved, ensure that mobile terminal when track is presented Real-time response performance.
When actual implementation, above-mentioned steps 301 to step 303 can be executed in memory by application processor in mobile terminal The instruction stored in storage medium (such as flash memory) is completed, and above-mentioned step 304 is the operation of color applying drawing track, can be by moving The graphics processor of terminal is completed.
Embodiment three
Previous embodiment is so that the granularity of texture image is consistent with the granularity of point in the point set for being constituted target trajectory Example is illustrated, and when actual implementation can have the granularity of texture image and constitute the granularity of the point in the point set of target trajectory not Unanimous circumstances, the present embodiment are explained.
The present embodiment records a kind of image processing method, as shown in figure 8, including the following steps:
Step 401, texture image is obtained.
Referring to previous embodiment one and embodiment two, available preset texture image, alternatively, according to target track The target color information of mark calls figure bank interface to generate corresponding texture image.
The color value of texture image can call figure bank interface to generate according to the target color information of the target trajectory, It, can be according to the color tune for the navigation routine that user sets in map application such as when navigation routine being presented in map application Corresponding texture image is generated with figure bank interface, (the desktop including being responsible for mobile terminal in the unlock interface arbitrarily applied The launcher application of display) according to the corresponding texture maps of color calling figure bank interface generation of unlock track set by user Picture;In another example when navigation routine being presented in map application, it can be according to the navigation routine that user sets in map application Color calls figure bank interface to generate corresponding texture image, in the unlock interface arbitrarily applied (including it is responsible for mobile terminal The launcher application that shows of desktop) to call figure bank interface to generate according to the color of unlock track set by user corresponding Texture image.
By the point that texture image in this present embodiment is for replacing constituting target trajectory, the difference of the shape of texture image The visual effect of target trajectory will not be generated and be significantly affected, therefore the shape of texture image is without limitation.
Step 402, based on the target trajectory target effect instruction the target trajectory sparse degree, determine with The density of the corresponding point of the sparse degree.
Target effect indicates the sparse degree of target trajectory, for indicating sparse degree using hundred-mark system, 100% table Show that target trajectory shows as solid line in visual effect, 0 expression target trajectory shows as dotted line in visual effect, and constitutes mesh It marks the sparse degree between the phantom line segments of track and reaches maximum;In map application, often only need solid line target trajectory and The target trajectory (and not requiring the sparse degree of the phantom line segments of target trajectory) of dotted line, correspondingly, can use binary system Indicate the sparse degree of target trajectory, wherein binary one indicates that target trajectory is solid line, and Binary Zero indicates that target trajectory is Phantom line segments.
Constitute target trajectory basic element be a little, the sparse degree of the distribution density of point and target trajectory is negatively correlated, point Density it is bigger, then the sparse degree of target trajectory is smaller, solid line is shown as in visual effect, conversely, point density it is smaller, Then the sparse degree of target trajectory is bigger, and dotted line is shown as in visual effect;Establish the sparse degree and point of target trajectory The incidence relation of density can be with when the sparse degree of the target trajectory of the target effect instruction based on the target trajectory Pass through the density of the determining point corresponding with the sparse degree of the above-mentioned incidence relation that pre-establishes.
Step 403, the density of granularity and the point based on preset point, divides the target trajectory, obtains To the point set of the correspondence target trajectory.
Above-mentioned step 403 and step 404 for granularity and target trajectory based on preset point target effect to institute The line segment for stating target trajectory is divided, and the point set for corresponding to the target trajectory is obtained.
Step 404, whether the granularity for judging the point is consistent with the granularity of the texture image;If it is inconsistent, holding Row step 405;Otherwise, step 406 is executed.
Step 405, the granularity that the texture image is adjusted using filtering algorithm is consistent with the granularity of the point.
For example, when the granularity of texture image is greater than the granularity of point, using filtering algorithm (such as based on the filtering of edge detection Algorithm) reduce texture image granularity it is consistent with the granularity of point;When the granularity of texture image is less than the granularity of point, calculated using filtering The granularity that method (such as based on the filtering algorithm of edge detection) expands texture image is consistent with the granularity of point, so as to make texture maps As the point in the point set for constituting target trajectory can be substituted.
Step 406, using the one-to-one mode of point in texture image and composition target trajectory, the texture maps are used The point in point set as drawing the corresponding target trajectory, obtains the corresponding image of target trajectory.
When actual implementation, above-mentioned steps 401 to step 405 can be executed in memory by application processor in mobile terminal The instruction stored in storage medium (such as flash memory) is completed, and above-mentioned step 406 is the operation of color applying drawing track, can be by moving The graphics processor of terminal is completed.
Example IV
Previous embodiment is so that the granularity of texture image is consistent with the granularity of point in the point set for being constituted target trajectory Example is illustrated, and when actual implementation can have the granularity of texture image and constitute the granularity of the point in the point set of target trajectory not Unanimous circumstances, the present embodiment are explained.
The present embodiment records a kind of image processing method, as shown in figure 9, including the following steps:
Step 501, texture image is obtained.
Referring to previous embodiment one and embodiment two, available preset texture image, alternatively, according to target track The target color information of mark calls figure bank interface to generate corresponding texture image.
The color value of texture image can call figure bank interface to generate according to the target color information of the target trajectory, It, can be according to the color tune for the navigation routine that user sets in map application such as when navigation routine being presented in map application Corresponding texture image is generated with figure bank interface, (the desktop including being responsible for mobile terminal in the unlock interface arbitrarily applied The launcher application of display) according to the corresponding texture maps of color calling figure bank interface generation of unlock track set by user Picture;In another example when navigation routine being presented in map application, it can be according to the navigation routine that user sets in map application Color calls figure bank interface to generate corresponding texture image, in the unlock interface arbitrarily applied (including it is responsible for mobile terminal The launcher application that shows of desktop) to call figure bank interface to generate according to the color of unlock track set by user corresponding Texture image.
By the point that texture image in this present embodiment is for replacing constituting target trajectory, the difference of the shape of texture image The visual effect of target trajectory will not be generated and be significantly affected, therefore the shape of texture image is without limitation.
Step 502, based on the target trajectory target effect instruction the target trajectory sparse degree, determine with The density of the corresponding point of the sparse degree.
Target effect indicates the sparse degree of target trajectory, for indicating sparse degree using hundred-mark system, 100% table Show that target trajectory shows as solid line in visual effect, 0 expression target trajectory shows as dotted line in visual effect, and constitutes mesh It marks the sparse degree between the phantom line segments of track and reaches maximum;In map application, often only need solid line target trajectory and The target trajectory (and not requiring the sparse degree of the phantom line segments of target trajectory) of dotted line, correspondingly, can use binary system Indicate the sparse degree of target trajectory, wherein binary one indicates that target trajectory is solid line, and Binary Zero indicates that target trajectory is Phantom line segments.
Constitute target trajectory basic element be a little, the sparse degree of the distribution density of point and target trajectory is negatively correlated, point Density it is bigger, then the sparse degree of target trajectory is smaller, solid line is shown as in visual effect, conversely, point density it is smaller, Then the sparse degree of target trajectory is bigger, and dotted line is shown as in visual effect;Establish the sparse degree and point of target trajectory The incidence relation of density can be with when the sparse degree of the target trajectory of the target effect instruction based on the target trajectory Pass through the density of the determining point corresponding with the sparse degree of the above-mentioned incidence relation that pre-establishes.
Step 503, the density of granularity and the point based on preset point, divides the target trajectory, obtains To the point set of the correspondence target trajectory.
Above-mentioned step 503 and step 504 for granularity and target trajectory based on preset point target effect to institute The line segment for stating target trajectory is divided, and the point set for corresponding to the target trajectory is obtained.
Step 504, whether the granularity for judging the point is consistent with the granularity of the texture image;If it is inconsistent, holding Row step 505;Otherwise, step 506 is executed.
Step 505, the granularity that the texture image is adjusted using filtering algorithm is consistent with the granularity of the point.
For example, when the granularity of texture image is greater than the granularity of point, using filtering algorithm (such as based on the filtering of edge detection Algorithm) reduce texture image granularity it is consistent with the granularity of point;When the granularity of texture image is less than the granularity of point, calculated using filtering The granularity that method (such as based on the filtering algorithm of edge detection) expands texture image is consistent with the granularity of point, so as to make texture maps As the point in the point set for constituting target trajectory can be substituted.
Step 506, using the one-to-one mode of point in texture image and composition target trajectory, the texture maps are used The point in point set as drawing the corresponding target trajectory.
Step 507, target image is obtained.
In general, track is that Overlapping display (namely uses the form of textures on certain background image (target image) Display), for example, the navigation routine in the map application of mobile terminal is the Overlapping display on the map of navigation area, it is mobile whole Unlock track (by taking nine grids unlock as an example) in end is to carry out Overlapping display on the image for the nine grids that mobile terminal is presented.
Step 508, the target trajectory is mapped to the target image, obtains carrying the described of the target trajectory Target image.
Below to show that the specific example of navigation routine is illustrated in the map application of mobile terminal.
Referring to Fig. 9, the map application in mobile terminal (such as indicates two from position A to position B according to the instruction of user Navigation routine, user's solid line navigation routine and dotted line navigation routine are shown respectively), it should be pointed out that line segment shown in Fig. 9 Although 1 and line segment 2 it is corresponding with navigation routine, be not the actual navigation routine that mobile terminal is finally presented, but mobile The line segment for the correspondence navigation routine that the application processor of terminal is determined, the corresponding navigation routine 2 of middle conductor 2 need to have real Existing display effect, the display effect that the corresponding navigation routine 1 of line segment 1 needs to have dotted line;
For line segment 2, due to being linear type, beginning and end shown in Fig. 10 is determined based on line segment 2, and be based on and void The corresponding density of line effect filling point between beginning and end, when graphics processor replaces point to be drawn using texture image When processed, the navigation routine 2 drawn out is phantom line segments;
For line segment 1, due to being broken line type, starting point, terminal shown in Figure 11 and inflection point, and base are determined based on line segment 1 In density filling point between starting point and inflection point, inflection point and terminal corresponding with effect is realized, when graphics processor uses texture The navigation routine 1 that image replaces point when being drawn, to be drawn out is real segment;
It should be pointed out that as shown in Figure 10 and Figure 11, when dividing to target trajectory, the granularity of the point used is usual It will use when being that human eye can not be differentiated, therefore being divided to target trajectory and a little the width of target trajectory expanded to obtain target The point set of track, to the navigation routine that can be drawn out can be made to have when replacing point to be drawn using texture graphics The discernmible width of human eye, rather than show as one can not resolution width filament, to have the effect of eye-catching.
The navigation routine drawn out is as shown in figure 12, and navigation routine is mapped to map (after target image) finally in movement The schematic diagram that the screen of terminal is shown is as shown in figure 13.
Embodiment five
The present embodiment records a kind of computer-readable medium, can for ROM (for example, read-only memory, FLASH memory, Transfer device etc.), magnetic storage medium (for example, tape, disc driver etc.), optical storage medium is (for example, CD-ROM, DVD- ROM, paper card, paper tape etc.) and other well-known types program storage;Computer is stored in the computer-readable medium Executable instruction, when executed, causing at least one application processor to execute includes operation below:Obtain texture Image;The target effect of granularity and target trajectory based on preset point draws the corresponding line segment of the target trajectory Point, obtain the point set for corresponding to the target trajectory;The point set of the corresponding target trajectory is drawn using the texture image, Obtain the corresponding image of the target trajectory.
As an example, when executed, also causing at least one application processor to execute includes operation below: Obtain preset texture image;Alternatively, calling figure bank interface to generate according to the target color information of the target trajectory Corresponding texture image.
As an example, when executed, also causing at least one application processor to execute includes operation below: The sparse degree of the target trajectory of target effect instruction based on the target trajectory, determination are corresponding with the sparse degree Point density;
The density of granularity and the point based on preset point, divides the corresponding line segment of the target trajectory, Obtain corresponding to the point set of the target trajectory.
As an example, when executed, also causing at least one application processor to execute includes operation below: Based on texture image and the one-to-one mode of point in target trajectory is constituted, draws the corresponding mesh using the texture image Mark the point in the point set of track.
As an example, when executed, also causing at least one application processor to execute includes operation below: Before the point set for drawing the corresponding target trajectory using the texture image, the granularity and the texture maps of the point are judged Whether the granularity of picture is consistent;When inconsistent, the granularity of the texture image and the granularity one of the point are adjusted using filtering algorithm It causes.
As an example, when executed, also causing at least one application processor to execute includes operation below: Obtain target image;The corresponding image of the target trajectory is mapped to the target image, obtains carrying the target track The target image of the corresponding image of mark.
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 also used to the target effect of granularity and target trajectory based on preset point to institute It states the corresponding line segment of target trajectory to be divided, obtains the point set for corresponding to the target trajectory;
Graphics processor 200 obtains institute for using the texture image to draw the point set of the corresponding target trajectory State the corresponding image of target trajectory.
As an example, the application processor 100 is also used to obtain preset texture image;Alternatively,
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 also used to described in the instruction of the target effect based on the target trajectory The sparse degree of target trajectory, the density of determining point corresponding with the sparse degree;
The density of granularity and the point based on preset point, divides the corresponding line segment of the target trajectory, Obtain corresponding to the point set of the target trajectory.
As an example, the graphics processor 200 is also used to based on the point in texture image and composition target trajectory one by one Corresponding mode draws the point in the point set of the corresponding target trajectory using the texture image.
As an example, the graphics processor 200, which is also used for the texture image, draws the corresponding target trajectory Point set before, whether the granularity for judging the point 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 graphics processor 200 is also used to obtain target image;By the corresponding image of the target trajectory It is mapped to the target image, obtains the target image for carrying the corresponding image of the target trajectory.
When actual implementation, mobile terminal is additionally provided with display 300 (connecting with graphics processor 200), is shown at figure Manage the track that device is drawn;It is also provided with buffer 400 (such as i.e. dynamic random access memory DRAM) in mobile terminal, uses The data generated when above-mentioned processing are carried out in caching application processor 100.
In conclusion the embodiment of the present invention has the advantages that:
Using the one-to-one mode of point in the point set of texture image and composition target trajectory, use is pre-set Texture image replaces the point in point set to draw target trajectory (namely rendering target trajectory using texture image), right In target trajectory without the modeling processing of the consuming mobile terminal computing resource of the relevant technologies, for the same target trajectory When different effects (target effect) is presented, it is only necessary to control the point set midpoint for constituting target trajectory by the density of point Density, it is convenient to carry out, the computing resource of mobile terminal has been saved, ensure that real-time sound of the mobile terminal when track is presented Answer performance.
Those of ordinary skill in the art will appreciate that:Realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can be stored in a computer readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes:It is movable storage device, random Access memory (RAM, Random Access Memory), read-only memory (ROM, Read-Only Memory), magnetic disk or The various media that can store program code such as person's CD.
If alternatively, the above-mentioned integrated unit of the present invention is realized in the form of software function module and as independent product When selling or using, it also can store in a computer readable storage medium.Based on this understanding, the present invention is implemented The technical solution of example substantially in other words can be embodied in the form of software products the part that the relevant technologies contribute, The computer software product is stored in a storage medium, including some instructions are used so that computer equipment (can be with It is personal computer, server or network equipment etc.) execute all or part of each embodiment the method for the present invention. And storage medium above-mentioned includes:Movable storage device, RAM, ROM, magnetic or disk etc. are various to can store program code Medium.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.

Claims (12)

1. a kind of image processing method, which is characterized in that the method includes:
Obtain texture image;
The target effect of granularity and target trajectory based on preset point draws the corresponding line segment of the target trajectory Point, obtain the point set for corresponding to the target trajectory;
The point set that the corresponding target trajectory is drawn using the texture image, obtains the corresponding image of the target trajectory;
The target effect is used to characterize the sparse degree of the target trajectory.
2. the method as described in claim 1, which is characterized in that the acquisition texture image, including:
Obtain preset texture image;Alternatively,
Figure bank interface is called to generate corresponding texture image according to the target color information of the target trajectory.
3. the method as described in claim 1, which is characterized in that the granularity based on preset point and the target track The target effect of mark divides the corresponding line segment of the target trajectory, obtains the point set for corresponding to the target trajectory, packet It includes:
The sparse degree of the target trajectory of target effect instruction based on the target trajectory, the determining and sparse degree The density of corresponding point;
The density of granularity and the point based on preset point, divides the corresponding line segment of the target trajectory, obtains The point set of the corresponding target trajectory.
4. the method as described in claim 1, which is characterized in that described to draw the corresponding target trajectory using texture image Point set, including:
Based on texture image and the one-to-one mode of point in target trajectory is constituted, draws corresponding institute using the texture image State the point in the point set of target trajectory.
5. method as claimed in claim 4, which is characterized in that the method also includes:
Before the point set for drawing the corresponding target trajectory using the texture image, judge the point granularity and the line Whether the granularity for managing image is consistent;
When inconsistent, the granularity for adjusting the texture image using filtering algorithm is consistent with the granularity of the point.
6. such as method described in any one of claim 1 to 5, which is characterized in that the method also includes:
Obtain target image;
The corresponding image of the target trajectory is mapped to the target image, obtains carrying the corresponding figure of the target trajectory The target image of picture.
7. a kind of mobile terminal, which is characterized in that the mobile terminal includes:
Application processor uploads the texture image of acquisition to graphics processor for obtaining texture image;
The application processor is also used to the target effect of granularity and target trajectory based on preset point to the target The corresponding line segment in track is divided, and the point set for corresponding to the target trajectory is obtained;
The graphics processor obtains described for using the texture image to draw the point set of the corresponding target trajectory The corresponding image of target trajectory;
The target effect is used to characterize the sparse degree of the target trajectory.
8. mobile terminal as claimed in claim 7, which is characterized in that
The application processor is also used to obtain preset texture image;Alternatively,
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, which is characterized in that
The application processor is also used to the sparse journey of the target trajectory of the instruction of the target effect based on the target trajectory Degree, the density of determining point corresponding with the sparse degree;
The density of granularity and the point based on preset point, divides the corresponding line segment of the target trajectory, obtains The point set of the corresponding target trajectory.
10. mobile terminal as claimed in claim 7, which is characterized in that
The graphics processor is also used to based on texture image and constitutes the one-to-one mode of point in target trajectory, uses institute State the point in the point set of the corresponding target trajectory of texture image drafting.
11. mobile terminal as claimed in claim 10, which is characterized in that the graphics processor is also used for the texture Before Image Rendering corresponds to the point set of the target trajectory, judge the point granularity and the texture image granularity whether Unanimously;
When inconsistent, the granularity for adjusting the texture image using filtering algorithm is consistent with the granularity of the point.
12. such as the described in any item mobile terminals of claim 7 to 11, which is characterized in that
The graphics processor is also used to obtain target image;The corresponding image of the target trajectory is mapped to the target figure Picture obtains the target image for carrying 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 CN106657560A (en) 2017-05-10
CN106657560B true 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 (4)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Patent Citations (4)

* 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
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
CN106657560A (en) 2017-05-10

Similar Documents

Publication Publication Date Title
CN108010112B (en) Animation processing method, device and storage medium
US9865085B1 (en) Systems and methods for 3D modeling using skipping heuristics and fusing
CN109816762B (en) Image rendering method and device, electronic equipment and storage medium
CN107015788B (en) Method and device for displaying images on mobile device in animation mode
CN110990516B (en) Map data processing method, device and server
US9355464B2 (en) Dynamic generation of texture atlases
US10242492B2 (en) 3D rendering and shadow information storing method and apparatus
US10789770B1 (en) Displaying rich text on 3D models
KR20180056316A (en) Method and apparatus for performing tile-based rendering
CN105335445A (en) Layout display method and device
CN109978977A (en) The device and method for executing the rendering based on segment using the graph data prefetched
CN114669047B (en) Image processing method, electronic equipment and storage medium
US10839590B2 (en) Gutter space padding for texture atlases
CN108846791A (en) Rendering method, device and the electronic equipment of physical model
KR102657587B1 (en) Method and apparatus for rendering a curve
CN113504964B (en) Page component height determination method, page component height determination device, computer equipment and storage medium
CN107621951B (en) View level optimization method and device
CN109388306A (en) Information display method and device
CN106657560B (en) Image processing method and mobile terminal
CN111402369A (en) Interactive advertisement processing method and device, terminal equipment and storage medium
KR20160068204A (en) Data processing method for mesh geometry and computer readable storage medium of recording the same
KR102147357B1 (en) Apparatus and Method for managing commands
US10417327B2 (en) Interactive and dynamically animated 3D fonts
CN106327419B (en) Method and device for distributing display blocks in GPU display list
KR102608863B1 (en) Animating method for expressing cartoon characteristics

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