Summary of the invention
The method for drafting and device for being designed to provide a kind of image outline of the embodiment of the present invention, can be more accurately
Drawing image profile.
In order to achieve the above object, the invention discloses a kind of method for drafting of image outline, it is applied to that there is display screen
Electronic equipment, which comprises
A. true using edge detection algorithm in the picture of profile to be drawn when detecting that image outline draws instruction
Determine the coordinate of pixel in image outline;
B. the position inputted according to the coordinate of pixel in described image profile and active user, determines in image outline
The starting point that profile is drawn;
C. the direction that operation is drawn according to active user, determines that is drawn in the corresponding image outline of the starting point draws
Direction processed, and setting quantity pixel is determined in image outline according to the drafting direction;
D. judge whether the last one corresponding pixel of the drafting direction is described in the setting quantity pixel
The terminating point of image outline, if it is, being risen according in the pixel and described image profile in the target image profile of preservation
The pixel in image outline between initial point and terminating point, determines target image profile, otherwise, by the setting quantity picture
Vegetarian refreshments executes step C as starting point as the pixel in target image profile and preservation, by the last one described pixel.
Preferably, the position inputted according to the coordinate of pixel in described image profile and active user, in image
The starting point of determining profile drafting includes: in profile
According to the position that active user inputs, the coordinate of the position is obtained;
According to the coordinate of pixel in the coordinate of the position and described image profile, the position and described image are determined
The distance between each pixel in profile;
By the pixel in the corresponding image outline of minimum range, it is determined as the starting point of profile drafting.
Preferably, the pixel by the corresponding image outline of minimum range, is determined as the starting point of profile drafting
Include:
Judge whether the minimum range is less than default first distance threshold value, if so, by the corresponding image of minimum range
Pixel in profile is determined as the starting point of profile drafting.
Preferably, the method also includes:
When the minimum range is not less than default first distance threshold value, prompt information is exported.
Preferably, it is described according to active user draw operation direction, determine in the corresponding image outline of the starting point into
The drafting direction that row is drawn, comprising:
The direction that operation is drawn according to active user determines that active user draws the corresponding angle in direction of operation;
According to the corresponding each angular range in each drafting direction saved for the starting point, where determining the angle
Angular range is drawn what the corresponding drafting direction of the angular range was determined as drawing in the corresponding image outline of the starting point
Direction processed.
Preferably, the last one corresponding pixel of the drafting direction is in the judgement setting quantity pixel
The no terminating point for described image profile, comprising:
Determine the coordinate of the last one corresponding pixel of drafting direction in the setting quantity pixel;
Judge the coordinate of the last one pixel is with the distance between the coordinate of starting point that the profile is drawn
It is no to be less than default second distance threshold value;
If so, determining that the last one described pixel is terminating point, otherwise, it determines the last one pixel non-end
Stop.
Preferably, the position inputted according to the coordinate of pixel in described image profile and active user, in image
Before determining the starting point that profile is drawn in profile, the method also includes:
According to the coordinate of pixel in determining image outline, the contour wide two-value of picture with profile to be drawn is generated
The black and white picture of change, the image outline of the picture comprising the profile to be drawn in the black and white picture of the binaryzation.
Preferably, described using the setting quantity pixel as the pixel in target image profile and preservation, packet
It includes:
Judge the setting quantity pixel whether is preserved in target image profile, if it is not, then by the setting
Quantity pixel is as the pixel in target image profile and preservation.
Preferably, the method also includes:
If being saved the setting quantity pixel in target image profile, the setting number of preservation is deleted
Measure a pixel.
Preferably, the edge detection algorithm includes triumphant Buddhist nun Canny edge detection algorithm.
In order to achieve the above object, the invention also discloses a kind of drawing apparatus of image outline, it is applied to that there is display
The electronic equipment of screen, described device include:
Image outline detection module, for when detect image outline draw instruction when, in the picture of profile to be drawn,
The coordinate of pixel in image outline is determined using edge detection algorithm;
Starting point determining module, for the position according to the coordinate of pixel in described image profile and active user's input
It sets, the starting point that profile is drawn is determined in image outline;
Direction determining mould is drawn, for drawing the direction of operation according to active user, determines the corresponding figure of the starting point
As the drafting direction drawn in profile, and setting quantity pixel is determined in image outline according to the drafting direction
Point;
Terminating point judgment module, for judge in the setting quantity pixel drafting direction it is corresponding the last one
Pixel whether be described image profile terminating point;
Target image profile determining module, if corresponding most for the drafting direction in the setting quantity pixel
The latter pixel is the terminating point of described image profile, then according to pixel in the target image profile of preservation and described
The pixel in image outline in image outline between starting point and ending point, determines target image profile;
Pixel preserving module, if for the drafting direction in the setting quantity pixel it is corresponding the last one
Pixel is not the terminating point of described image profile, then using the setting quantity pixel as the picture in target image profile
Vegetarian refreshments simultaneously saves, and by the last one described pixel as starting point, direction determining mould is drawn in triggering.
Preferably, the starting point determining module includes:
Coordinate obtains submodule, and the position for being inputted according to active user obtains the coordinate of the position;
Distance determines submodule, for the coordinate of pixel in the coordinate and described image profile according to the position, really
The distance between each pixel in the fixed position and described image profile;
Starting point determines submodule, for being determined as the pixel in the corresponding image outline of minimum range profile and drawing
The starting point of system.
Preferably, the starting point determines that submodule is specifically used for:
Judge whether the minimum range is less than default first distance threshold value, if so, by the corresponding image of minimum range
Pixel in profile is determined as the starting point of profile drafting.
Preferably, described device further include:
Prompt information output module, for when the minimum range is not less than default first distance threshold value, output to be prompted
Information.
Preferably, the drafting direction determining mould includes:
Angle determines submodule, for drawing the direction of operation according to active user, determines that active user draws operation
The corresponding angle in direction;
It draws direction and determines submodule, for according to the corresponding each angle in each drafting direction saved for the starting point
Range is spent, determines the angular range where the angle, it is corresponding that the corresponding drafting direction of the angular range is determined as the starting point
Image outline in the drafting direction drawn.
Preferably, the terminating point judgment module includes:
Pixel coordinate determines submodule, and for determining, the drafting direction is corresponding most in the setting quantity pixel
The coordinate of the latter pixel;
Coordinate distance judging submodule, what coordinate and the profile for judging the last one pixel were drawn rises
Whether the distance between coordinate of initial point is less than default second distance threshold value;
Terminating point determines submodule, if for profile in the coordinate and described image profile of the last one pixel
The distance between starting point coordinate of drafting is less than default second distance threshold value, it is determined that the last one described pixel is to terminate
Point, otherwise, it determines the last one described pixel nonterminal point.
Preferably, before the starting point determining module, described device further include:
Binaryzation picture determining module, for the coordinate according to pixel in determining image outline, generate with wait draw
The black and white picture of the contour wide binaryzation of the picture of profile includes the profile to be drawn in the black and white picture of the binaryzation
Picture image outline.
Preferably, the pixel preserving module is specifically used for:
Judge the setting quantity pixel whether is preserved in target image profile, if it is not, then by the setting
Quantity pixel is as the pixel in target image profile and preservation.
Preferably, described device further include:
Pixel removing module, if for being saved the setting quantity pixel in target image profile,
Delete the setting quantity pixel saved.
As seen from the above technical solution, the embodiment of the present invention first uses edge detection algorithm to determine pixel in image outline
The coordinate of point, the direction of position and drafting operation further according to user's input, determines target image profile from image outline
Pixel coordinate, therefore can more accurately drawing image profile, improve user experience.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Whole description.Obviously, described embodiment is only a part of the embodiments of the present invention, instead of all the embodiments.Base
Embodiment in the present invention, those of ordinary skill in the art are obtained all without making creative work
Other embodiments shall fall within the protection scope of the present invention.
It, being capable of more accurately drawing image wheel the embodiment of the invention provides a kind of method for drafting of image outline and device
Exterior feature improves user experience.Method and device provided in this embodiment is applied in the electronic equipment with display screen, including desk-top
The electronic equipments such as computer, laptop, tablet computer pad, mobile phone, the mode of the user's operation captured can be mouse
The sliding action of movement and/or finger.
Below by specific embodiment, the present invention is described in detail.
Fig. 1 is a kind of flow diagram of the method for drafting of image outline provided in an embodiment of the present invention comprising as follows
Step:
Step S101: when detecting that image outline draws instruction, in the picture of profile to be drawn, using edge detection
Algorithm determines the coordinate of pixel in image outline.
It is understood that the edge of image refers to the significant part of image local area brightness change, the edge of image
Composed shape is the profile of image.In one picture, the profile of image may be to intersect intricately,
It is also likely to be mutually independent several profiles.
In practical applications, the coordinate of pixel in image outline can be determined using edge detection algorithm.Using edge
Detection algorithm determines that the coordinate of image outline pixel belongs to the prior art, in embodiments of the present invention to the process without superfluous
It states.
In order to effectively determine the coordinate of pixel in image outline, triumphant Buddhist nun can be used in embodiments of the present invention
Canny edge detection algorithm.Canny edge detection is actually a kind of first order differential operator detection algorithm, it is in first differential
On the basis of operator, also adds non-maximum value and inhibit and dual threshold two improvement.Can not only have using non-maxima suppression
Effect ground inhibits multiple response edge, but also the positioning accuracy at edge can be improved;Using dual threshold, i.e. high threshold and Low threshold,
The omission factor at edge can be effectively reduced.By adjusting corresponding parameter, Canny edge detection algorithm can identify different essences
The image outline of thin degree.Due to determining that the pixel in image outline belongs to the prior art using Canny edge detection algorithm,
Therefore details are not described herein again.
Step S102: the position inputted according to the coordinate of pixel in the image outline and active user, in image outline
The starting point that middle determining profile is drawn.
In order to obtain the location information of active user's input, corresponding prompt information can be provided, prompts user in screen
Position when middle input initial drawing, such as " please clicking in screen, to input initial position ", or provides input frame, prompts to use
Family inputs the coordinate (x, y) of initial position, and used coordinate system can be to sit with the upper left corner of currently profile picture to be drawn
Origin is marked, is horizontally to the right positive direction of the x-axis, is straight down positive direction of the y-axis, corresponding unit length is provided in reference axis, when
It is so also possible using other coordinate systems.
It, can be using various ways image obtained in the step S101 after position of active user's input has been determined
In profile determine profile draw starting point, for example, according to active user input position abscissa, by image outline with
The pixel that the abscissa is identical, position apart from active user's input is nearest is determined as the starting point of profile drafting, or
According to active user input position ordinate, by it is identical with the ordinate in image outline, apart from active user input
The nearest pixel in position be determined as the starting point of profile drafting.
Step S103: the direction of operation is drawn according to active user, determines and carries out in the corresponding image outline of the starting point
The drafting direction of drafting, and setting quantity pixel is determined in image outline according to the drafting direction.
After the starting point that profile is drawn has been determined, in order to determine target image profile, the present invention from image outline
Need to obtain the direction that active user draws operation in embodiment during drafting.Operation is drawn in order to obtain active user
Direction, can prompt user input draw operation direction.Specifically, user inputs the mode for drawing operation direction, can be with
It is to pin right mouse button to be slided on the screen, is also possible to be slided on the screen with finger, therefore corresponding prompt information
It can be " left mouse button please be pin to slide on the screen " or " please sliding on the screen ", input frame can also be provided, prompt to use
Family inputs at least two coordinate points according to the coordinate shown on screen, and the direction for drawing operation is obtained using these coordinate points.
The drafting operation of user may be along any one direction, and the direction that user draws operation determines the image wheel
The drafting direction drawn in exterior feature.In the image outline, there may be images in multiple directions corresponding with the starting point
The pixel of profile.The direction that operation is drawn according to active user, determines and is drawn in the corresponding image outline of the starting point
Drafting direction, can have different modes, for example, it may be determined that active user draw operation direction and with the starting point pair
The angle between each direction for including in the image outline answered, the direction in the corresponding image outline of minimum angle is determined as
Draw direction.
The setting quantity pixel can be 4~10 pixels, and certain other quantity pixel is also possible.
The value of the setting quantity is different, and the speed and effect that corresponding profile is drawn also can be different.
Step S104: judge in the setting quantity pixel whether is the last one corresponding pixel of the drafting direction
For the terminating point of described image profile.
In the present embodiment, which may include different embodiments.Such as, it can be determined that the last one pixel
Point on abscissa direction or in ordinate direction at a distance from starting point whether less than one threshold value, when horizontal, ordinate direction
One of direction on the distance between the last one pixel and starting point be less than given threshold when, so that it may determine should
The last one pixel is terminating point.In order to avoid maloperation, which, which is generally less than, is set between quantity pixel
Distance.
Step S105: if the last one corresponding pixel of the drafting direction is institute in the setting quantity pixel
The terminating point of image outline is stated, then according to starting point in the pixel and described image profile in the target image profile of preservation
The pixel in image outline between terminating point, determines target image profile.
Step S106: if the last one corresponding pixel of the drafting direction is not in the setting quantity pixel
The terminating point of described image profile, then using the setting quantity pixel as the pixel in target image profile and guarantor
It deposits, by the last one described pixel as starting point, executes step S103.
The direction that operation is drawn according to active user determines a drafting side corresponding with starting point in image outline
To, and setting quantity pixel is determined in image outline according to the drafting direction.If in the setting quantity pixel
The last one corresponding pixel of the drafting direction is not the terminating point of described image profile, then makees the last one pixel
For starting point, then carry out the drafting of target image profile.Therefore such operation can regard a drafting period as each time,
If the last one pixel corresponding with the drafting direction is not the terminating point of image outline in the drafting period, by this
A little pixels are saved, and using the last one pixel as starting point, start next drafting period.Every determination one
Draw the period, all in the drafting period with draw corresponding the last one pixel in direction whether be image outline terminating point
Judged.
As shown in the above, the embodiment of the present invention first uses edge detection algorithm to determine pixel in image outline
Coordinate, the direction of position and drafting operation further according to user's input, determines the picture of target image profile from image outline
Vegetarian refreshments coordinate, therefore it is capable of the profile of more accurately drawing image, improve user experience.
In another embodiment of the present invention, the step S102 in embodiment of the method shown in FIG. 1, according to the image wheel
The position of the coordinate of pixel and active user's input in exterior feature, it is described before determining the starting point that profile is drawn in image outline
Method can also include:
According to the coordinate of pixel in determining image outline, the contour wide two-value of picture with profile to be drawn is generated
The black and white picture of change, the image outline of the picture comprising the profile to be drawn in the black and white picture of the binaryzation.
Assuming that the picture of profile to be drawn is as shown in Fig. 2, target image is the region in the upper left corner in Fig. 2.It is examined using edge
Method of determining and calculating determines the coordinate of pixel in the image outline in Fig. 2, and according to the Coordinate generation one of pixel in the image outline
A black and white picture with the contour wide binaryzation of Fig. 2 includes the image outline in Fig. 2 in i.e. Fig. 3, Fig. 3.
Obtain include the binaryzation of image outline information black and white picture after, according to active user input position exist
When determining the starting point that profile is drawn in image outline, it can determine that profile is drawn directly from the image outline of the binaryzation picture
The starting point of system improves the efficiency of drawing process to simplify the process that image outline is drawn.
In another embodiment of the present invention, the step S102 in embodiment of the method shown in FIG. 1, according to the image wheel
The position of the coordinate of pixel and active user's input in exterior feature determines the starting point that profile is drawn in image outline, can wrap
Include following steps:
Step 1: the position inputted according to active user obtains the coordinate of the position;
Step 2: according to the coordinate of pixel in the coordinate of the position and described image profile, determining the position and institute
State the distance between each pixel in image outline;
Step 3: by the pixel in the corresponding image outline of minimum range, being determined as the starting point of profile drafting.
It in the present embodiment, will be with the smallest described image of the coordinate distance by determining the coordinate of user's input position
The coordinate of pixel is determined as the starting point of profile drafting in profile, and the drawing process of image outline can be made more acurrate.
Further, by the pixel in the corresponding image outline of minimum range, it is determined as profile in image outline and draws
Starting point, may include: to judge whether the minimum range is less than default first distance threshold value, if it is, will most narrow spacing
From the pixel in corresponding image outline, be determined as the starting point that profile in image outline is drawn, when the minimum range not
When less than default first distance threshold value, prompt information is exported, the input position for prompting user current is in described image profile
Pixel it is too far, it should adjust input position, make pixel of the input position in described image profile, can make in this way
Drawing process is more acurrate.
In another embodiment of the present invention, the step S103 in embodiment of the method shown in FIG. 1, according to active user
The direction for drawing operation, determines the drafting direction drawn in the corresponding image outline of the starting point, may include walking as follows
It is rapid:
Step 1: drawing the direction of operation according to active user, determine that active user draws the corresponding angle in direction of operation
Degree;
Step 2: according to the corresponding each angular range in each drafting direction saved for the starting point, determining the angle
The corresponding drafting direction of the angular range is determined as drawing in the corresponding image outline of the starting point by the angular range at place
The drafting direction of system.
It is assumed that current starting point is the A point in Fig. 3, coordinate system is established in Fig. 3.Image is determined in step s101
Two drafting directions, the respectively direction A1 and A2, the corresponding angle in the two directions are saved in profile when the coordinate of pixel
Range is respectively 0~180 degree, -180~0 degree.Assuming that the direction that active user draws operation is U1, and determine the direction pair U1
The angle answered is -130 degree, it is thus determined that the angle is in -180~0 degree of angular range, the direction A2 is determined as and starting point
The drafting direction drawn in the corresponding image outline of A.
In the present embodiment, determine that user draws the angular range where the angle in the direction of operation, by the angle model
It encloses corresponding drafting direction and is determined as the drafting direction drawn in the corresponding image outline of the starting point, drafting can be simplified
The determination process in direction reduces calculation amount.
In another embodiment of the present invention, the step S104 in embodiment of the method shown in FIG. 1, judges the setting
In quantity pixel the last one corresponding pixel of the drafting direction whether be described image profile terminating point, can wrap
Include following steps:
Step 1: determining the coordinate of the last one corresponding pixel of drafting direction in the setting quantity pixel;
Step 2: between the coordinate for judging the starting point that the coordinate of the last one pixel and the profile are drawn
Whether distance is less than default second distance threshold value;
Step 3: if so, determining that the last one described pixel is terminating point, otherwise, it determines the last one described pixel
Point nonterminal point.
In the present embodiment, the distance between the coordinate of the last one pixel and starting point coordinate are less than default second
Distance threshold can more accurately determine terminating point when profile is drawn as the standard for determining terminating point.
After saving the setting quantity pixel as the pixel in target image profile, if detecting use
The pixel of preservation can also be deleted, can specifically include step by the delete operation at family:
Judge the setting quantity pixel whether is preserved in target image profile, if it is not, then by the setting
Quantity pixel is as the pixel in target image profile and preservation;If being saved described set in target image profile
Fixed number amount pixel then deletes the setting quantity pixel of preservation.
In the present embodiment, if being saved the setting quantity pixel in target image profile, it may be said that bright
Drafting operation belongs to a kind of delete operation.Specifically, user may wish to replace drawn profile, or due to user's
Maloperation depicts the profile of mistake.If drafting operation belongs to delete operation, the setting number being saved is deleted
Measure a pixel.As it can be seen that this delete operation that the embodiment provides can be improved user experience.
Fig. 4 is the flow diagram of the method for drafting of another image outline provided in an embodiment of the present invention comprising such as
Lower step:
Step S401: when detecting that image outline draws instruction, in the picture of profile to be drawn, using edge detection
Algorithm determines the coordinate of pixel in image outline.
Step S402: it according to the coordinate of pixel in determining image outline, generates contour with the picture of profile to be drawn
The black and white picture of wide binaryzation, the image wheel of the picture comprising the profile to be drawn in the black and white picture of the binaryzation
It is wide.
Step S403: the position inputted according to active user obtains the coordinate of the position;According to the coordinate of the position
With the coordinate of pixel in described image profile, determine in the position and described image profile between each pixel away from
From, and determine the minimum range in the distance.
Step S404: judging whether the minimum range is less than default first distance threshold value, if so, thening follow the steps
Otherwise S405 executes S406.
Step S405: when the minimum range is not less than default first distance threshold value, prompt information is exported.
Step S406: when the minimum range is less than default first distance threshold value, by the corresponding image wheel of minimum range
Pixel in exterior feature is determined as the starting point of profile drafting.
Step S407: the direction of operation is drawn according to active user, determines and carries out in the corresponding image outline of the starting point
The drafting direction of drafting, and setting quantity pixel is determined in image outline according to the drafting direction.
Step S408: the seat of the last one corresponding pixel of drafting direction in the setting quantity pixel is determined
Mark.
Step S409: between the coordinate for judging the starting point that the coordinate of the last one pixel and the profile are drawn
Distance whether be less than default second distance threshold value, if so, then follow the steps S410, otherwise, execute step S412.
Step S410: when between the coordinate for the starting point that the coordinate of the last one pixel and the profile are drawn
When distance is less than default second distance threshold value, determine that the last one described pixel is terminating point.
Step S411: according to starting point and end in the pixel and described image profile in the target image profile of preservation
The pixel in image outline between stop, determines target image profile.
Step S412: when between the coordinate for the starting point that the coordinate of the last one pixel and the profile are drawn
When distance is not less than default second distance threshold value, the last one described pixel nonterminal point is determined.
Step S413: judge the setting quantity pixel whether is preserved in target image profile, if it is, holding
Otherwise row step S414 executes step S415.
Step S414: when having preserved the setting quantity pixel in target image profile, preservation is deleted
The setting quantity pixel, and using first pixel corresponding with the drafting direction of preservation as starting point, it executes
Step S407.
Step S415: when in target image profile without saving the setting quantity pixel, by the setting number
Measure pixel and be used as the pixel in target image profile and preservation, and will described in the last one pixel as starting point,
Execute step S407.
As shown in the above, the embodiment of the present invention first uses edge detection algorithm to determine pixel in image outline
Coordinate, the direction of position and drafting operation further according to user's input, determines the picture of target image profile from image outline
Vegetarian refreshments coordinate.When the input position range image profile of user farther out when, can also provide prompt information, prompt user's adjustment defeated
Enter position, therefore being capable of more accurately drawing image profile.Meanwhile user can also delete drawn wheel in drawing process
Pixel in exterior feature improves user experience.
Fig. 5 is a kind of structural schematic diagram of the drawing apparatus of image outline provided in an embodiment of the present invention, with side shown in Fig. 1
Method embodiment is corresponding, and described device includes:
Image outline detection module 501, for when detect image outline draw instruction when, in the picture of profile to be drawn
In, the coordinate of pixel in image outline is determined using edge detection algorithm;
Starting point determining module 502, for what is inputted according to the coordinate of pixel in described image profile and active user
Position determines the starting point that profile is drawn in image outline;
Direction determining mould 503 is drawn, for drawing the direction of operation according to active user, determines that the starting point is corresponding
The drafting direction drawn in image outline, and setting quantity pixel is determined in image outline according to the drafting direction
Point;
Terminating point judgment module 504, for judging that the drafting direction is corresponding last in the setting quantity pixel
One pixel whether be described image profile terminating point;
Target image profile determining module 505, if corresponding for the drafting direction in the setting quantity pixel
The last one pixel be described image profile terminating point, then according to the pixel in the target image profile of preservation, and
The pixel in image outline in described image profile between starting point and ending point, determines target image profile;
Pixel preserving module 506, if corresponding last for the drafting direction in the setting quantity pixel
One pixel is not the terminating point of described image profile, then using the setting quantity pixel as in target image profile
Pixel and preservation, and regard the last one described pixel as starting point, triggering drafting direction determining mould 503.
Specifically, the edge detection algorithm that image outline detection module 501 uses may include triumphant Buddhist nun Canny edge detection
Algorithm.
In another embodiment of the present invention, the starting point determining module 502 in Installation practice shown in fig. 5 is specific
May include:
Coordinate obtains submodule (not shown), and the position for being inputted according to active user obtains the position
Coordinate;
Distance determines submodule (not shown), for pixel in the coordinate and described image profile according to the position
The coordinate of point determines the distance between each pixel in the position and described image profile;
Starting point determines submodule (not shown), for by the pixel in the corresponding image outline of minimum range,
It is determined as the starting point of profile drafting.
Further, which, which determines submodule specifically, can be used for judging whether the minimum range is less than default
One distance threshold, if so, the pixel in the corresponding image outline of minimum range is determined as the starting point of profile drafting.
In another embodiment of the present invention, device shown in fig. 5 can also include:
Prompt information output module (not shown), for being not less than default first distance threshold value when the minimum range
When, export prompt information.
In another embodiment of the present invention, the drafting direction determining mould 503 in Installation practice shown in fig. 5 has
Body may include:
Angle determines submodule (not shown), for drawing the direction of operation according to active user, determines current use
Draw the corresponding angle in direction of operation in family;
It draws direction and determines submodule (not shown), for according to each drafting direction saved for the starting point
Corresponding each angular range, determines the angular range where the angle, and the corresponding drafting direction of the angular range is determined as
The drafting direction drawn in the corresponding image outline of the starting point.
In another embodiment of the present invention, the terminating point judgment module 504 in Installation practice shown in fig. 5 is specific
May include:
Pixel coordinate determines submodule (not shown), for determining the drafting in the setting quantity pixel
The coordinate of the last one corresponding pixel of direction;
Coordinate distance judging submodule (not shown), for judge the coordinate of the last one pixel with it is described
Whether the distance between coordinate of starting point that profile is drawn is less than default second distance threshold value;
Terminating point determines submodule (not shown), if coordinate and the figure for the last one pixel
As the distance between starting point coordinate that profile is drawn in profile is less than default second distance threshold value, it is determined that it is described the last one
Pixel is terminating point, otherwise, it determines the last one described pixel nonterminal point.
In another embodiment of the present invention, the starting point determining module 502 in Installation practice shown in Fig. 5 it
Before, described device can also include:
Binaryzation picture determining module (not shown), for the coordinate according to pixel in determining image outline,
The black and white picture with the contour wide binaryzation of picture of profile to be drawn is generated, includes institute in the black and white picture of the binaryzation
State the image outline of the picture of profile to be drawn.
In another embodiment of the present invention, the pixel preserving module 506 in Installation practice shown in fig. 5 is specific
It can be used for:
Judge the setting quantity pixel whether is preserved in target image profile, if it is not, then by the setting
Quantity pixel is as the pixel in target image profile and preservation.
In another embodiment of the present invention, device shown in fig. 5 can also include:
Pixel removing module (not shown), if for being saved the setting quantity in target image profile
A pixel then deletes the setting quantity pixel of preservation.
Since above-mentioned apparatus embodiment is that the method for drafting embodiment based on image outline obtains, there is phase with this method
Same technical effect, therefore details are not described herein for the technical effect of Installation practice.
For device embodiment, since it is substantially similar to the method embodiment, related so describing fairly simple
Place illustrates referring to the part of embodiment of the method.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or any other variant be intended to it is non-
It is exclusive to include, so that the process, method, article or equipment for including a series of elements not only includes those elements,
It but also including other elements that are not explicitly listed, or further include solid by this process, method, article or equipment
Some elements.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including
There is also other identical elements in the process, method, article or equipment of the element.
It will appreciated by the skilled person that all or part of the steps in above embodiment is can to pass through journey
What sequence instructed relevant hardware to complete, the program can store in computer-readable storage medium.It is designated herein
Storage medium refers to ROM/RAM, magnetic disk, CD etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent substitution, improvement and etc. done within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.