CN106204588A - A kind of image processing method and device - Google Patents

A kind of image processing method and device Download PDF

Info

Publication number
CN106204588A
CN106204588A CN201610539785.9A CN201610539785A CN106204588A CN 106204588 A CN106204588 A CN 106204588A CN 201610539785 A CN201610539785 A CN 201610539785A CN 106204588 A CN106204588 A CN 106204588A
Authority
CN
China
Prior art keywords
icon
pixel
border
pixel point
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610539785.9A
Other languages
Chinese (zh)
Other versions
CN106204588B (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 CN201610539785.9A priority Critical patent/CN106204588B/en
Publication of CN106204588A publication Critical patent/CN106204588A/en
Application granted granted Critical
Publication of CN106204588B publication Critical patent/CN106204588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a kind of image processing method and device;The embodiment of the present invention is when receiving image processing requests, the pixel of this image can be obtained according to this image processing requests, obtain pixel set, then, original icon boundary pixel point is searched in this pixel set, and according to presetted pixel interval and this original icon boundary pixel point, the original icon border of icon is extended, result according to this extension updates this pixel set, pixel set in the updated is searched icon boundary pixel point, and according to this icon boundary pixel point positional information in the images, corresponding icon is cut out from this image;The program can improve the efficiency cutting figure.

Description

A kind of image processing method and device
Technical field
The present invention relates to communication technical field, be specifically related to a kind of image processing method and device.
Background technology
Cut figure to refer to design drawing is cut into the picture being easy to be fabricated to the page.From the point of view of popular, it is to utilize slice tool one Open icon in design drawing to cut out, to obtain being cut into a sheet by a sheet icon picture.
In the prior art, the general figure mode of cutting using fixed dimension, the most in advance Icon (icon) is placed in grid In region, then, Icon (icon) is cut out;Such as, with reference to Fig. 1 a, put Icon in a certain order at design drawing timestamp, Obtain the design drawing of figure to be cut, then, the continuous adjusted design figure position in a network when cutting figure, so that in design drawing Icon is in corresponding net region, finally, carries out cutting figure based on net region and processes, obtain a sheet by a sheet Icon, wherein, every The size of Icon is all consistent (pixel of such as Icon is 50*50).
To in the research of prior art and practice process, it was found by the inventors of the present invention that existing figure mode of cutting cuts figure behaviour Make comparisons complexity, therefore, cause cutting figure efficiency comparison low.
Summary of the invention
The embodiment of the present invention provides a kind of image processing method and device, can improve and cut figure efficiency.
The embodiment of the present invention provides a kind of image processing method, including:
Receiving image processing requests, the instruction of described image processing requests needs image to be processed, and described image comprises multiple Icon;
Obtain the pixel of described image according to described image processing requests, obtain pixel set;
Original icon boundary pixel point is searched in described pixel set, and according to presetted pixel interval with described original The original icon border of icon is extended by icon boundary pixel point;
Result according to described extension updates described pixel set;
Pixel set in the updated is searched icon boundary pixel point, and according to described icon boundary pixel point in institute State the positional information in image, from described image, cut out corresponding icon.
Accordingly, the embodiment of the present invention also provides for a kind of image processing apparatus, including:
Receiving unit, be used for receiving image processing requests, the instruction of described image processing requests needs image to be processed, described Image comprises multiple icon;
Acquiring unit, for obtaining the pixel of described image according to described image processing requests, obtains pixel set;
Expanding element, for searching original icon boundary pixel point, and according to presetted pixel in described pixel set The original icon border of icon is extended by interval and described original icon boundary pixel point;
Updating block, for updating described pixel set according to described extension;
Cutter unit, searches icon boundary pixel point in pixel set in the updated, and according to described icon Boundary pixel point positional information in described image, cuts out corresponding icon from described image.
The embodiment of the present invention, when receiving image processing requests, can obtain this image according to this image processing requests Pixel, obtains pixel set, then, searches original icon boundary pixel point in this pixel set, and according to presetting The original icon border of icon is extended by pixel separation and this original icon boundary pixel point, according to the result of this extension more This pixel set new, searches icon boundary pixel point in pixel set in the updated, and according to this icon boundary pixel Point positional information in the images, cuts out corresponding icon from this image;The program can be based on icon boundary pixel Positional information at image carries out cutting figure, i.e. can carry out cutting figure according to the actual size of icon, it is not necessary to user enters when cutting figure Row sum-equal matrix picture positions etc. operate, and in terms of existing technologies, simplify and cut graphic operation, can improve the efficiency cutting figure.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, in embodiment being described below required for make Accompanying drawing be briefly described, it should be apparent that, below describe in accompanying drawing be only some embodiments of the present invention, for From the point of view of those skilled in the art, on the premise of not paying creative work, it is also possible to obtain the attached of other according to these accompanying drawings Figure.
Fig. 1 a is the existing schematic diagram cutting figure mode;
Fig. 1 b is the flow chart of the image processing method that the embodiment of the present invention provides;
Fig. 1 c is the schematic diagram of the icon that the embodiment of the present invention provides;
Fig. 1 d is the schematic diagram of the icon border extension that the embodiment of the present invention provides;
Fig. 1 e is that the one that the embodiment of the present invention provides cuts figure schematic diagram;
Fig. 2 a is another flow chart of the image processing method that the embodiment of the present invention provides;
Fig. 2 b be the embodiment of the present invention provide cut figure interface schematic diagram;
Fig. 2 c is that the figure of cutting that the embodiment of the present invention provides completes schematic diagram;
Fig. 2 d is the schematic diagram adjusting dimension of picture that the embodiment of the present invention provides;
Fig. 3 a is the structural representation of the image processing apparatus that the embodiment of the present invention provides;
Fig. 3 b is the another kind of structural representation of the image processing apparatus that the embodiment of the present invention provides.
Fig. 4 is the structural representation of the terminal that this embodiment of the present invention provides.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Describe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.Based on Embodiment in the present invention, the every other enforcement that those skilled in the art are obtained under not making creative work premise Example, broadly falls into the scope of protection of the invention.
The embodiment of the present invention provides a kind of image processing method and device.It is described in detail individually below.Embodiment one,
The present embodiment will be described from the angle of image processing apparatus, and this image processing apparatus specifically can be integrated in end In the equipment such as end, this terminal specifically can this terminal be specifically as follows mobile phone, panel computer or PC (personal compute, PC) etc. equipment.
A kind of image processing method, including: receiving image processing requests, the instruction of this image processing requests needs figure to be processed Picture, this image comprises multiple icon;Obtain the pixel of this image according to this image processing requests, obtain pixel set;? This pixel set is searched original icon boundary pixel point, and according to presetted pixel interval and this original icon boundary pixel point The original icon border of icon is extended, to update this pixel set;Pixel set in the updated is searched figure Mark boundary pixel point, and according to this icon boundary pixel point positional information in the images, cut out corresponding from this image Icon.
As shown in Figure 1 b, a kind of image processing method, idiographic flow can be such that
101, receiving image processing requests, the instruction of this image processing requests needs image to be processed, and this image comprises multiple Icon.
In the present embodiment, image can be static image, i.e. picture, and the form of this icon can have multiple, such as, and PNG (portable network figure) form, BMP (bitmap) form, JPEG (associating photo expert group) form etc..
Wherein, this icon (Icon) can be any type of computer graphical, can be such as to have clearly to refer to contain Justice computer graphical, such as, icon can be desktop icons (i.e. software identification), interface icon (i.e. Function Identification) or Other have the graphical symbol etc. referring to meaning.
Wherein, image processing requests can be carried out by presetting the triggering interface such as triggering key or input frame in triggering terminal Trigger, such as, when user clicks on or streaks certain icon, then trigger and generate this image processing requests, now, this image procossing This image processing requests just can be received by device, such as, and please to this image procossing by default command reception interface Ask and be received, etc..
102, obtain the pixel of this image according to this image processing requests, obtain pixel set.
Wherein, this pixel set includes multiple pixel, and this set can have various ways, such as array form;Tool Body ground, can obtain the pixel of image, obtain one-dimensional pixel array, in this one-dimensional pixel array one according to image processing requests Individual array element can represent a pixel;Now, this one-dimensional pixel array is pixel set;
In order to, it is simple to cutting image, to accelerate to cut figure speed, one-dimensional pixel array can also be converted into by the present embodiment method Two-dimensional pixel array, now, two-dimensional pixel array is pixel set;Such as, can size based on image (wide and high) One-dimensional pixel array is converted into corresponding two-dimensional pixel array.
Alternatively, in order to improve the accuracy cutting figure speed and Qie Tu, the present embodiment method can be based on effective pixel points Cutting figure, now, this pixel set can be effective pixel points set, and this effective pixel points set includes multiple valid pixel Point;Namely step " obtains the pixel of this image, obtain pixel set " and may include that according to this image processing requests
Obtain the pixel of this image according to this image processing requests, obtain original pixels point set;
Effective pixel points and inactive pixels point is determined in this original pixels point set;
Pixel set is determined according to this effective pixel points.
Wherein, this effective pixel points can be that GTG meets pre-conditioned pixel, such as, it may be determined that greyscale level Reaching predetermined level or grey decision-making more than the pixel of predetermined threshold value is effective pixel points, and this inactive pixels point is that GTG is discontented with The most pre-conditioned pixel of foot, such as, determines that grey decision-making is less than the pixel of predetermined threshold value and is defined as inactive pixels, as reality should Transparent pixel (grey decision-making is 0) can be defined as inactive pixels point, by opaque pixel (grey decision-making is 0) in It is defined as effective pixel points;The most pre-conditioned can set with actual demand;Namely step is " in this original pixels point set really Determine effective pixel points and inactive pixels point " may include that
According to the GTG that pixel in original pixels point set is corresponding, in this original pixels point set, determine valid pixel Point and inactive pixels point.
In actual applications, cut figure for convenience, improve and cut figure speed, can be that effective pixel points arranges the first pixel mark Know and the second mark is set for inactive pixels point, to distinguish pixel, such as, effective pixel points marker bit 1, inactive pixels point mark Note 0 etc..
Alternatively, for meeting actual figure demand of cutting, improve and cut the motility of figure, such as, cut out from image comprise to The picture of few two icons, the present embodiment can allow to arrange protection zone between two icons, not cut this when cutting figure Protection zone, that is, " determine effective pixel points and inactive pixels in step in the present embodiment in this original pixels point set Point " after, before step " determines pixel set according to this effective pixel points ", it is also possible to including:
Determine whether this image is provided with protection zone;
The most then will be located in the point of the inactive pixels in this protection zone and be defined as effective pixel points.
In the present embodiment, in the case of effective pixel points and inactive pixels point are arranged mark, can be by changing The mark of inactive pixels point is defined as effective pixel points, namely step " will be located in the inactive pixels in this protection zone Point is defined as effective pixel points " may include that will be located in the second pixel logo of inactive pixels point in protection zone is changed to the One pixel logo, to determine that this inactive pixels point is as effective pixel points.Such as, by the labelling 0 of inactive pixels point in protection zone Become 1.
103, in this pixel set, original icon boundary pixel point is searched, and according to presetted pixel interval with this is original The original icon border of icon is extended by icon boundary pixel point.
Wherein, this original icon boundary pixel point can be the pixel that the original boundaries of icon is corresponding.
Alternatively, in order to distinguish pixel, it is simple to cut figure, the present embodiment can search the former of icon in pixel set After beginning icon boundary pixel point, can be that original graph mark boundary pixel point arranges mark, be in particular it and the 3rd pixel is set Mark, such as, is labeled as 2 etc. by original icon boundary pixel point.
May comprise sub-icon that is multiple separate and that separate in view of an icon, therefore it is likely to be of multiple limit Boundary, cuts figure iff based on original icon boundary pixel point, may result in and an icon is cut into multiple icon, its The accuracy cutting figure is poor, such as, with reference to Fig. 1 c, should have four original icon borders by " footprint " icon, if directly base Figure is cut, then four icons may be cut into by " footprint " icon, it is evident that this cut figure in this original icon border It is wrong;In order to overcome foregoing problems, improving the accuracy cutting figure, original icon border can be expanded by the present embodiment Exhibition, to fill the interval between sub-icon, then, cuts figure based on border after extension;I.e. searching original icon boundary pixel After Dian, the present embodiment can also be according to presetted pixel interval and this original icon boundary pixel point original icon limit to icon Boundary is extended.
Wherein, presetted pixel is spaced apart the border extension distance using pixel to represent, such as 10 pixels, 5 pictures Vegetarian refreshments etc..This presetted pixel interval can set according to the actual requirements.Alternatively, this presetted pixel interval acquiring mode is permissible Have multiple, such as when image processing requests carries presetted pixel interval, can obtain from image processing requests, the most such as, Can be based on acquisition etc. from memory element between image processing requests.
Specifically, step is " according to presetted pixel interval and this original icon boundary pixel point original icon limit to icon Boundary is extended " may include that
Corresponding original icon border is depicted according to this original icon boundary pixel point;
Being stretched out on this original icon border according to this presetted pixel interval, wherein, after extension, icon border is former with this Distance between beginning icon border is spaced equal to this presetted pixel.
Wherein, after after extension, distance between icon border and this original icon border refers to extend icon boundary line with Distance between centers of tracks between original icon boundary line, this distance between centers of tracks can be defined as the short distance referring between two disjoint lines From.
Such as, with reference to Fig. 1 d, based on 10 pixels, the original icon border of " footprint " icon can be extended, its In, after extension, distance d between icon boundary line and original icon boundary line is 10 pixels;As it can be seen, to " footprint " After the original icon border of icon is extended, it is filled with the interval between sub-icon in " footprint " icon.
Alternatively, the present embodiment describes the mode on original icon border can be had multiple, such as, can obtain and belong to identical The original icon boundary pixel point on original icon border, obtains original icon boundary pixel point set, so, based on to original icon Corresponding icon border is depicted in boundary pixel point set.Wherein it is possible to based on the interval between original icon boundary pixel point, Or distance obtains the original icon boundary pixel point belonging to same icon border.
104, this pixel set is updated according to the result of this extension.
Specifically, after extending original icon border, result based on this border extension this pixel can be updated Set, such as, the borderline pixel of original icon after extension can being determined according to the result of extension in this pixel set, Then, change the attribute information of this pixel, to update this pixel set, such as change pixel mark, grey decision-making etc.. 105, pixel set in the updated is searched icon boundary pixel point, and according to this icon boundary pixel point in the images Positional information, from this image, cut out corresponding icon.
Such as, after extending original icon border, pixel set the most in the updated can search icon limit Boundary's pixel, and the 4th pixel logo is set for icon boundary pixel point, in order to cut figure, as by icon boundary pixel point labelling It is 3 etc., then, cuts out the icon picture comprising icon according to icon pixel positional information in the picture.
Wherein, icon boundary pixel point positional information in the picture may include that the two dimension seat of icon boundary pixel point Mark information, such as, abscissa (x) value of icon boundary pixel point, vertical coordinate (y) value, at this point it is possible to according to icon boundary pixel The two-dimensional coordinate value of point cuts out corresponding icon from image.
Specifically, step " according to this icon boundary pixel point positional information in the images, cuts out from this image Corresponding icon " may include that
Determine the icon boundary pixel point belonging to same icon border, obtain the boundary pixel point set that this icon border is corresponding Close;
Obtain icon boundary pixel point positional information in the images in this border picture point set;
From this image, this icon is cut out according to this positional information.
The present embodiment method can determine and belong to identical or same icon border after finding icon boundary pixel point Icon boundary pixel point, obtain the boundary pixel point set that icon border is corresponding, specifically, can be according to icon boundary pixel Interval between point, determines the icon boundary pixel point belonging to identical or same icon border;Such as, can be based on neighbor map Interval between mark boundary pixel point or spacing, determine the icon boundary pixel point belonging to identical or same icon border;By All continuous print between the icon boundary pixel point belonging to same icon border, and between adjacent icon boundary pixel point between Every less than certain predetermined threshold value, therefore, it can with some icon boundary pixel point as starting point, then, between searching between it Every the adjacent icon boundary pixel point less than predetermined threshold value, then, then search and adjacent icon boundary pixel point between be spaced little In the icon boundary pixel point of predetermined threshold value ... by that analogy, the icon border belonging to same icon border can be found out Pixel.
In practical situation, being spaced apart between borderline two the adjacent icon boundary pixel point of general same icon Zero, i.e. the two adjacent icon boundary pixel point is to connect, and therefore, the present embodiment can first find an icon border picture Vegetarian refreshments, is labeled as a, then, searches connected adjacent icon boundary pixel point, is labeled as a, then, then obtains with adjacent Other icon boundary pixel point of icon boundary pixel point, are also labeled as a ... by that analogy, certain icon limit can be obtained All icon boundary pixel point that boundary a is corresponding, namely obtain boundary pixel point set corresponding to icon border a.
Such as, when icon boundary pixel point is all labeled as 3, icon boundary pixel point can be traveled through, run into a figure During mark boundary pixel point (the icon boundary pixel point as run into for the first time), the figure of this icon boundary pixel point 3 correspondence will be belonged to Whole icon boundary pixel point 3 on mark border are labeled as 3+1, and i.e. 4, obtain the boundary pixel point set of icon border 4 correspondence, tool Body ground, can be by the way of searching the icon boundary pixel point that is connected with this icon boundary pixel point, complete by this border Portion's icon boundary pixel point is all labeled as 4, to obtain the boundary pixel point set of icon border 4 correspondence, and this boundary pixel point set Close and include being labeled as the icon boundary pixel point of 4;After labelling completes, when the icon boundary pixel point running into new icon border Time, whole icon boundary pixel point on this new icon border are labeled as 3+1+1, i.e. 5, to obtain new icon border 5 correspondence Boundary pixel point set, the like, icon border 6,7,8 can be obtained ... wait the boundary pixel point set of correspondence.
Wherein, the mode cutting out icon according to the positional information of icon boundary pixel point can have multiple, such as, permissible Positional information according to icon boundary pixel point determines icon cutting zone on image, then, based on this icon cutting zone Cut out corresponding icon.
Cutting the accuracy of figure in order to improve and save system resource, the present embodiment can be based on icon boundary pixel The actual position information of point cuts out icon, i.e. cuts according to the actual size of icon, and now step " is believed according to this position Breath cuts out this icon from this image " may include that
Obtain the position offset information that this presetted pixel interval is corresponding;
According to this position offset information and this positional information, in obtaining this border picture point set, icon boundary pixel point is at this Actual position information in image;
From this image, this icon is cut out according to this actual position information.
In the present embodiment, can be directly according to icon boundary pixel point actual bit in the images in the picture point set of border Confidence ceases and cuts out icon from image, such as, and can according to icon boundary pixel point in the picture point set of border in the images Actual position information determine icon cutting zone or profile, then, cut based on this icon cutting zone or profile Cut, it is also possible to obtain, according to icon boundary pixel point, the dimension information (wide, high) that icon is corresponding, then, based on physical location Information and dimension information cut, namely step " from this image, cut out this icon according to this actual position information " can To include:
According to the actual position information of icon boundary pixel point in this boundary pixel point set, obtain the chi that this icon is corresponding Very little information;
From this image, this icon is cut out according to this dimension information and this actual position information.
Such as, icon can be determined according to the dimension information of icon and the actual position information of icon boundary pixel point Cutting zone, then, cuts out corresponding icon according to this icon cutting zone from image.In actual applications, can adopt With the canvas (painting canvas) of HTML (HTML, Hyper Text Markup Language), the picture of such as HTML5 Cloth, cuts out this icon in conjunction with this dimension information and this actual position information from this image.
Such as, with reference to Fig. 1 e, as a example by the image comprising four icons, application the present embodiment image processing method can be real Now cutting figure according to the actual size of icon, finally cut out four icon pictures, every icon picture comprises an icon, should The size of icon picture is suitable with the size of its comprised icon, i.e. the width of icon picture, high width with its comprised icon, High equal.
From the foregoing, it will be observed that the embodiment of the present invention is when receiving image processing requests, can obtain according to this image processing requests Take the pixel of this image, obtain pixel set, then, this pixel set is searched original icon boundary pixel point, And according to presetted pixel interval and this original icon boundary pixel point, the original icon border of icon is extended, according to this expansion The result of exhibition updates this pixel set, searches icon boundary pixel point in pixel set in the updated, and according to this figure Mark boundary pixel point positional information in the images, cuts out corresponding icon from this image;The program can be based on figure Mark boundary pixel carries out cutting figure at the positional information of image, i.e. can carry out cutting figure according to the actual size of icon, it is not necessary to user It is adjusted the operations such as picture position when cutting figure, in terms of existing technologies, simplifies and cut graphic operation, can improve and cut figure Efficiency;Additionally, due to the program can carry out cutting figure according to the actual size of icon, it is also possible to improve the accuracy cutting figure And saving system resource.
Embodiment two,
According to the method described by embodiment one, below citing is described in further detail.
In the present embodiment, will illustrate as a example by this image processing apparatus is integrated in terminal.
This image processing apparatus can the most integrated in the terminal, such as, end can be integrated in a software form In end browser, etc..
As shown in 2a, a kind of image processing method, idiographic flow can be such that
201, terminal receives image processing requests, and the instruction of this image processing requests needs image to be processed, and this image comprises Multiple icons.
In the present embodiment, this needs image to be processed can be static image, i.e. picture, the form of this icon can have Multiple, such as, PNG (portable network figure) form, BMP (bitmap) form, JPEG (associating photo expert group) form etc..
Wherein, this icon (Icon) can be any type of computer graphical, can be such as to have clearly to refer to contain Justice computer graphical, such as, icon can be desktop icons (i.e. software identification), interface icon (i.e. Function Identification) or Other have the graphical symbol etc. referring to meaning
Wherein, image processing requests can be carried out by presetting the triggering interface such as triggering key or input frame in triggering terminal Trigger, such as, when user clicks on or streaks certain icon, then trigger and generate this image processing requests.
With reference to Fig. 2 b, as a example by comprising the picture 20 of multiple icon, this picture 20 can be that Icon is polymerized figure etc., upper After passing this icon 20 to terminal browser, user can be pre-set between pixel by the slide block 21 on shifting sledge 22 Every, in order to being extended border based on this pixel separation during cutting figure, as shown in Figure 2 b, arranging pixel separation is 20px, i.e. 20 pixels;When user clicks on and cuts " the cutting figure button " 23 in figure interface, figure can be generated by triggering terminal browser Mark processes request, and now, in the present embodiment, this image processing requests just can be received by image processing apparatus.
In order to meet user's Qie Tu demand, improve and cut figure motility, such as, cut out from image and comprise at least two figure Target picture, the present embodiment can arrange protection zone, such as Fig. 2 b, provides protection zone settings button in cutting figure interface 24, if user wants to cut out the icon image comprising " shopping cart " with " business card ", user can click on button 24, use afterwards Family can arrange protection zone (choosing protection zone by the way of being selected by frame) on picture 20, such as, can choose Fig. 2 b The region that middle dotted line frame 25 represents is protection zone;In the present embodiment, protection zone does not cuts off, when choose two adjacent icons it Between region when being protection zone, can cut out and comprise the two neighbor map target icon picture.
202, terminal obtains the pixel of this image according to this image processing requests, obtains original pixels point set, and This original pixels point set determines effective pixel points and inactive pixels point.
Specifically, figure is cut for convenience, it is also possible to effective pixel points and inactive pixels point are arranged mark, such as, effectively Pixel is labeled as 1, and inactive pixels point is labeled as 0.
In the present embodiment, effective pixel points and inactive pixels point can be determined based on the GTG that pixel is corresponding, such as, May determine that greyscale level reaches predetermined level or grey decision-making more than the pixel of predetermined threshold value is effective pixel points, and this is invalid Pixel is that GTG is unsatisfactory for pre-conditioned pixel, etc..
203, terminal determines whether this icon is provided with protection zone, the most then perform step 204, if it is not, then perform 205.
204, the inactive pixels point in terminal will be located in this protection zone is defined as effective pixel points.
Such as, the inactive pixels point in dotted line frame in Fig. 2 b can be defined as effective pixel points.At pixel, mark is set In the case of knowledge, can change with the mark of pixel and determine that inactive pixels point is defined as effective pixel points, such as, by protection zone In territory, the labelling 0 of inactive pixels point becomes 1.
205, terminal determines pixel set according to effective pixel points, and searches original icon limit in this pixel set Boundary's pixel.
Wherein, this original icon boundary pixel point can be the pixel that the original boundaries of icon is corresponding.
Alternatively, in order to distinguish pixel, it is simple to cut figure, the present embodiment can search the former of icon in pixel set After beginning icon boundary pixel point, can be that original graph mark boundary pixel point arranges mark, be in particular it and pixel logo is set, Such as, original icon boundary pixel point is labeled as 2 etc..
206, the original icon border of icon is entered by terminal according to presetted pixel interval and this original icon boundary pixel point Row extension, and update this pixel set according to the result of this extension.
May comprise sub-icon that is multiple separate and that separate in view of an icon, therefore it is likely to be of multiple limit Boundary, cuts figure iff based on original icon boundary pixel point, may result in and an icon is cut into multiple icon, its The accuracy cutting figure is poor, improves the accuracy cutting figure, and original icon border can be extended by the present embodiment, to fill Interval between sub-icon, then, cuts figure based on border after extension.
Specifically, " terminal is according to presetted pixel interval and this original icon boundary pixel point original graph to icon for step Mark border is extended " may include that
Corresponding original icon border is depicted according to this original icon boundary pixel point;
Being stretched out on this original icon border according to this presetted pixel interval, wherein, after extension, icon border is former with this Distance between beginning icon border is spaced equal to this presetted pixel.
Wherein, after after extension, distance between icon border and this original icon border refers to extend icon boundary line with Distance between centers of tracks between original icon boundary line, this distance between centers of tracks can be defined as the short distance referring between two disjoint lines From.
In the present embodiment, presetted pixel interval can be the border extension distance using pixel to represent.This default picture Element interval can set, according to the actual requirements such as 10 pixels, 5 pixels etc.;Such as, with reference to Fig. 2 b, user is permissible Pre-setting pixel separation by the slide block 21 on shifting sledge 22, arranging pixel separation in figure is 20 pixels.
207, terminal pixel set in the updated is searched icon boundary pixel point, and determine and belong to same icon limit The icon boundary pixel point on boundary, obtains the boundary pixel point set that this icon border is corresponding.
Cutting figure for convenience, the present embodiment terminal can also arrange pixel logo for icon boundary pixel point, as by icon Boundary pixel point is labeled as 3 etc..
Specifically, the present embodiment method can determine and belong to identical or same after finding icon boundary pixel point The icon boundary pixel point on icon border, obtains the boundary pixel point set that icon border is corresponding, specifically, and can be according to icon Interval between boundary pixel point, determines the icon boundary pixel point belonging to identical or same icon border;Such as, can be with base Interval between adjacent icon boundary pixel point or spacing, determine the icon border picture belonging to identical or same icon border Vegetarian refreshments.
In actual applications, being spaced apart between borderline two the adjacent icon boundary pixel point of general same icon Zero, i.e. the two adjacent icon boundary pixel point is to connect, and therefore, the present embodiment can first find an icon border picture Vegetarian refreshments, then, obtains all boundary picture belonging to same icon border by the way of the boundary pixel point that lookup is connected Vegetarian refreshments.
Such as, when icon boundary pixel point is all labeled as 3, icon boundary pixel point can be traveled through, run into a figure During mark boundary pixel point (the icon boundary pixel point as run into for the first time), the figure of this icon boundary pixel point 3 correspondence will be belonged to Whole icon boundary pixel point 3 on mark border are labeled as 3+1, and i.e. 4, obtain the boundary pixel point set of icon border 4 correspondence, tool Body ground, can be by the way of searching the icon boundary pixel point that is connected with this icon boundary pixel point, complete by this border Portion's icon boundary pixel point is all labeled as 4, to obtain the boundary pixel point set of icon border 4 correspondence, and this boundary pixel point set Close and include being labeled as the icon boundary pixel point of 4;After labelling completes, when the icon boundary pixel point running into new icon border Time, whole icon boundary pixel point on this new icon border are labeled as 3+1+1, i.e. 5, to obtain new icon border 5 correspondence Boundary pixel point set, the like, icon border 6,7,8 can be obtained ... wait the boundary pixel point set of correspondence.
208, icon boundary pixel point positional information in the images and should in terminal obtains this border picture point set The position offset information that presetted pixel interval is corresponding, and obtain this icon border according to this position offset information and this positional information The actual position information that pixel is corresponding.
Actual position information corresponding to this icon boundary pixel point refers to icon boundary pixel point reality in this icon Border positional information.
Wherein, icon boundary pixel point positional information in the picture or actual position information may include that icon limit The two-dimensional coordinate information of boundary's pixel, such as, abscissa (x) value of icon boundary pixel point, vertical coordinate (y) value;Now, preset Position offset information corresponding to pixel separation may include that the side-play amount of transverse and longitudinal coordinate.This predeterminated position offset information can be with base Arrange in presetted pixel interval.
209, terminal according to this actual position information corresponding to icon boundary pixel point in boundary pixel point set from this figure This icon is cut out in Xiang.
Such as, terminal can cut out from this image according to this actual position information corresponding to icon boundary pixel point Comprise the icon picture of icon.
Specifically, terminal can be directly according to icon boundary pixel point actual bit in the images in the picture point set of border Confidence ceases and cuts out icon from image, such as, and can according to icon boundary pixel point in the picture point set of border in the images Actual position information determine icon cutting zone or profile, then, cut based on this icon cutting zone or profile Cut, it is also possible to obtain, according to icon boundary pixel point, the dimension information (wide, high) that icon is corresponding, then, based on physical location Information and dimension information cut, namely step " terminal is corresponding according to icon boundary pixel point in boundary pixel point set This actual position information from this image, cut out this icon " may include that terminal is according to icon in boundary pixel point set This actual position information that boundary pixel point is corresponding, obtains dimension information people corresponding to icon, then, according to this dimension information with And this actual position information cuts out this icon from this image.
Such as, icon can be determined according to the dimension information of icon and the actual position information of icon boundary pixel point Cutting zone, then, cuts out corresponding icon from image according to this icon cutting zone, the most both can realize according to each The actual size of picture cuts figure;Such as, with reference to Fig. 2 c, can be according to the physical location of the icon boundary pixel point of each icon Information and actual size information, cut out ten icon pictures comprising different icons from image 20, each icon picture Size is suitable with the size of its comprised icon, i.e. icon picture width, high with the width of its comprised icon, height equal.
Alternatively, for the ease of icon use and save use icon time system resource, the present embodiment is all right It is unified size by the size adjusting of icon picture, that is, mark on a map cutting out multiple figure comprising icon from this image Before sheet, the present embodiment method can also include:
According to unified dimension of picture, the size of multiple icon pictures is adjusted.
This is preset unified dimension of picture and can set according to the actual requirements, such as with reference to Fig. 2 d, can arrange unified picture A size of 200 pixel * 200 pixels, now the size adjusting of all icon pictures can be 200 pixel * 200 pixels by terminal. In the present embodiment, the mode obtaining unified dimension of picture can have multiple, such as, can obtain interface by dimension of picture and obtain Taking the dimension information of family input, the form of expression of this interface can be icon, input frame etc..
Alternatively, after adjusting icon dimension of picture, the present embodiment method also includes:
Terminal receives the request of download, and packs icon picture according to this download request, obtains packaging file;
This packaging file is downloaded to this locality by terminal.
From the foregoing, it will be observed that the embodiment of the present invention is when receiving image processing requests, can obtain according to this image processing requests Take the pixel of this image, obtain pixel set, then, this pixel set is searched original icon boundary pixel point, And according to presetted pixel interval and this original icon boundary pixel point, the original icon border of icon is extended, according to this expansion The result of exhibition updates this pixel set, searches icon boundary pixel point in pixel set in the updated, and according to this figure Mark boundary pixel point positional information in the images, cuts out corresponding icon from this image;The program can be based on figure Mark boundary pixel carries out cutting figure at the positional information of image, i.e. can carry out cutting figure according to the actual size of icon, it is not necessary to user It is adjusted the operations such as picture position when cutting figure, in terms of existing technologies, simplifies and cut graphic operation, can improve and cut figure Efficiency;Additionally, due to the program can carry out cutting figure according to the actual size of icon, it is also possible to improve the accuracy cutting figure And saving system resource.
Embodiment three,
In order to preferably implement said method, the embodiment of the present invention also provides for a kind of image processing apparatus, as shown in Figure 3 a, This image processing apparatus can include receiving unit 301, acquiring unit 302, expanding element 303 and cutter unit 304, as follows:
(1) unit 301 is received;
Receiving unit 301, be used for receiving image processing requests, the instruction of this image processing requests needs image to be processed, should Image comprises multiple icon.
Wherein, this icon (Icon) can be any type of computer graphical, can be such as to have clearly to refer to contain Justice computer graphical, such as, icon can be desktop icons (i.e. software identification), interface icon (i.e. Function Identification) or Other have the graphical symbol etc. referring to meaning.
Wherein, image processing requests can be carried out by presetting the triggering interface such as triggering key or input frame in triggering terminal Trigger, such as, when user clicks on or streaks certain icon, then trigger and generate this image processing requests, it may be assumed that
Receive unit 301, specifically for receiving user by triggering the image processing requests that interface triggers.
(2) acquiring unit 302;
Acquiring unit 302, for obtaining the pixel of this image according to this image processing requests, obtains pixel set.
Specifically, this acquiring unit 302 may include that original pixels obtains subelement, pixel determines subelement and collection Conjunction determines subelement;
This original pixels obtains subelement, for obtaining the pixel of this image according to this image processing requests, obtains former Beginning pixel set;
This pixel determines subelement, for determining effective pixel points and inactive pixels point in this original pixels point set;
This set determines subelement, for determining pixel set according to this effective pixel points.
(3) expanding element 303;
Expanding element 303, for searching original icon boundary pixel point, and according to presetted pixel in this pixel set The original icon border of icon is extended, to update this pixel set by interval and this original icon boundary pixel point.
Specifically, expanding element 303 may include that the second lookup subelement and border extension subelement;
This second lookup subelement, for searching original icon boundary pixel point in this pixel set;
This border extension subelement, for according to presetted pixel interval and former to icon of this original icon boundary pixel point Beginning icon border is extended, to update this pixel set.
Such as, border extension subelement can be specifically for: depicts accordingly according to this original icon boundary pixel point Original icon border, according to this presetted pixel interval this original icon border is stretched out, wherein, after extension icon border with Distance between this original icon border is spaced equal to this presetted pixel.
(4) updating block 305;
This updating block 305, updates described pixel set for the result according to described extension.
(5) cutter unit 305;
This cutter unit 305, searches icon boundary pixel point in pixel set in the updated, and according to this figure Mark boundary pixel point positional information in the images, cuts out corresponding icon from this image.For example, it is possible to as follows:
This cutter unit 305 may include that the first lookup subelement, border determine subelement, position acquisition subelement with And cutting subelement;
This first lookup subelement, searches icon boundary pixel point in pixel set in the updated;
This border determines subelement, for determining the icon boundary pixel point belonging to same icon border, obtains this icon The boundary pixel point set that border is corresponding;
This position acquisition subelement, for obtaining icon boundary pixel point position in the images in this border picture point set Confidence ceases;
This cutting subelement, for cutting out this icon according to this positional information from this image.
Such as, cut subelement, specifically may be used for:
Obtain the position offset information that this presetted pixel interval is corresponding;
According to this position offset information and this positional information, in obtaining this border picture point set, icon boundary pixel point is at this Actual position information in image;
From this image, this icon is cut out according to this actual position information.
Specifically, process " cuts out this icon from this image according to this actual position information " and may include that
According to the actual position information of icon boundary pixel point in this boundary pixel point set, obtain the chi that this icon is corresponding Very little information;
From this image, this icon is cut out according to this dimension information and this actual position information.
The most such as, this border determines subelement, specifically for: based on the interval between this icon boundary pixel point, determine Belong to the icon boundary pixel point of same icon.
Alternatively, cutting the motility of figure and the multiformity of function for promoting, with reference to Fig. 3 b, this image processing apparatus is all right Including: area determination unit 306;
This area determination unit 306, for this pixel determine subelement determine effective pixel points and inactive pixels point it After, before this set determines that subelement determines pixel set according to this effective pixel points, determine whether this image is provided with protection Region;The most then will be located in the point of the inactive pixels in this protection zone and be defined as effective pixel points.
When being embodied as, above unit can realize as independent entity, it is also possible to carries out combination in any, makees Realize for same or several entities, the embodiment of the method being embodied as can be found in above of above unit, at this not Repeat again.
This image processing apparatus specifically can be integrated in the equipment such as terminal, and this terminal is specifically as follows mobile phone or flat board electricity The equipment such as brain.
Ask from the foregoing, it will be observed that embodiment of the present invention image processing apparatus can receive image procossing by reception unit 301 Ask, then, acquiring unit 302 obtain the pixel of this image according to this image processing requests, obtain pixel set, by expanding Exhibition unit 303 searches original icon boundary pixel point in this pixel set, and according to presetted pixel interval and this original graph The original icon border of icon is extended, to update this pixel set, by cutter unit 305 more by mark boundary pixel point Pixel set after Xin is searched icon boundary pixel point, and according to this icon boundary pixel point position letter in the images Breath, cuts out corresponding icon from this image;The program can be carried out at the positional information of image based on icon boundary pixel Cut figure, i.e. can carry out cutting figure according to the actual size of icon, it is not necessary to user is adjusted the operations such as picture position when cutting figure, In terms of existing technologies, simplify and cut graphic operation, the efficiency cutting figure can be improved;Additionally, due to the program can basis The actual size of icon carries out cutting figure, it is also possible to improves and cuts the accuracy of figure and save system resource.
Embodiment four,
Additionally, the embodiment of the present invention also provides for a kind of terminal, as shown in Figure 4, this terminal can include radio frequency (RF, Radio Frequency) circuit 401, include the memorizer 402 of one or more computer-readable recording mediums, input block 403, display unit 404, sensor 405, voicefrequency circuit 406, Wireless Fidelity (WiFi, Wireless Fidelity) module 407, one or more than one parts such as the processor 408 processing core and power supply 409 are included.People in the art Member is appreciated that the terminal structure shown in Fig. 4 is not intended that the restriction to terminal, can include more more or less of than diagram Parts, or combine some parts, or different parts are arranged.Wherein:
RF circuit 401 can be used for receiving and sending messages or in communication process, the reception of signal and transmission, especially, by base station After downlink information receives, transfer to one or more than one processor 408 processes;It addition, be sent to relating to up data Base station.Generally, RF circuit 401 includes but not limited to antenna, at least one amplifier, tuner, one or more agitator, use Family identity module (SIM, Subscriber Identity Module) card, transceiver, bonder, low-noise amplifier (LNA, Low Noise Amplifier), duplexer etc..Additionally, RF circuit 401 can also by radio communication and network and its He communicates by equipment.This radio communication can use arbitrary communication standard or agreement, includes but not limited to global system for mobile communications (GSM, Global System of Mobile communication), general packet radio service (GPRS, General Packet Radio Service), CDMA (CDMA, Code Division Multiple Access), wideband code division many Location (WCDMA, Wideband Code Division Multiple Access), Long Term Evolution (LTE, Long Term Evolution), Email, Short Message Service (SMS, Short Messaging Service) etc..
Memorizer 402 can be used for storing software program and module, and processor 408 is stored in memorizer 402 by operation Software program and module, thus perform various function application and data process.Memorizer 402 can mainly include storing journey Sequence district and storage data field, wherein, storage program area can store the application program (ratio needed for operating system, at least one function Such as sound-playing function, image player function etc.) etc.;Storage data field can store the data that the use according to terminal is created (such as voice data, phone directory etc.) etc..Additionally, memorizer 402 can include high-speed random access memory, it is also possible to include Nonvolatile memory, for example, at least one disk memory, flush memory device or other volatile solid-state parts.Phase Ying Di, memorizer 402 can also include Memory Controller, to provide processor 408 and input block 403 to memorizer 402 Access.
Input block 403 can be used for receiving numeral or the character information of input, and produces and user setup and function Control relevant keyboard, mouse, action bars, optics or the input of trace ball signal.Specifically, a specific embodiment In, input block 403 can include Touch sensitive surface and other input equipments.Touch sensitive surface, also referred to as touches display screen or touches Control plate, can collect user thereon or neighbouring touch operation (such as user use any applicable object such as finger, stylus or Adnexa operation on Touch sensitive surface or near Touch sensitive surface), and connect dress accordingly according to formula set in advance driving Put.Optionally, Touch sensitive surface can include touch detecting apparatus and two parts of touch controller.Wherein, touch detecting apparatus inspection Survey the touch orientation of user, and detect the signal that touch operation brings, transmit a signal to touch controller;Touch controller from Receive touch information on touch detecting apparatus, and be converted into contact coordinate, then give processor 408, and can reception process Order that device 408 is sent also is performed.Furthermore, it is possible to use resistance-type, condenser type, infrared ray and surface acoustic wave etc. multiple Type realizes Touch sensitive surface.Except Touch sensitive surface, input block 403 can also include other input equipments.Specifically, other are defeated Enter equipment and can include but not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, Mus One or more in mark, action bars etc..
Display unit 404 can be used for the various of the information that inputted by user of display or the information being supplied to user and terminal Graphical user interface, these graphical user interface can be made up of figure, text, icon, video and its combination in any.Display Unit 404 can include display floater, optionally, can use liquid crystal display (LCD, Liquid Crystal Display), The forms such as Organic Light Emitting Diode (OLED, Organic Light-Emitting Diode) configure display floater.Further , Touch sensitive surface can cover display floater, when Touch sensitive surface detects thereon or after neighbouring touch operation, sends process to Device 408, to determine the type of touch event, provides corresponding with preprocessor 408 according to the type of touch event on a display panel Visual output.Although in the diagram, Touch sensitive surface and display floater are to realize input and input as two independent parts Function, but in some embodiments it is possible to by integrated to Touch sensitive surface and display floater and realize input and output function.
Terminal may also include at least one sensor 405, such as optical sensor, motion sensor and other sensors. Specifically, optical sensor can include ambient light sensor and proximity transducer, and wherein, ambient light sensor can be according to ambient light Light and shade regulate the brightness of display floater, proximity transducer can cut out display floater and/or the back of the body when terminal moves in one's ear Light.As the one of motion sensor, Gravity accelerometer can detect (generally three axles) acceleration in all directions Size, can detect that size and the direction of gravity time static, can be used for identify mobile phone attitude application (such as horizontal/vertical screen switching, Dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.;Can also configure as terminal Gyroscope, barometer, drimeter, thermometer, other sensors such as infrared ray sensor, do not repeat them here.
Voicefrequency circuit 406, speaker, microphone can provide the audio interface between user and terminal.Voicefrequency circuit 406 can The signal of telecommunication after the voice data conversion that will receive, is transferred to speaker, speaker be converted to acoustical signal output;Another Aspect, the acoustical signal of collection is converted to the signal of telecommunication by microphone, voicefrequency circuit 406 be converted to voice data after receiving, then After voice data output processor 408 is processed, through RF circuit 401 to be sent to such as another terminal, or by voice data Output is to memorizer 402 to process further.Voicefrequency circuit 406 is also possible that earphone jack, with provide peripheral hardware earphone with The communication of terminal.
WiFi belongs to short range wireless transmission technology, and terminal can help user's transceiver electronics postal by WiFi module 407 Part, browsing webpage and access streaming video etc., it has provided the user wireless broadband internet and has accessed.Although Fig. 4 shows WiFi module 407, but it is understood that, it is also not belonging to must be configured into of terminal, can not change as required completely Omit in the scope of the essence becoming invention.
Processor 408 is the control centre of terminal, utilizes various interface and the various piece of the whole mobile phone of connection, logical Cross operation or perform to be stored in the software program in memorizer 402 and/or module, and calling and be stored in memorizer 402 Data, perform the various functions of terminal and process data, thus mobile phone is carried out integral monitoring.Optionally, processor 408 can wrap Include one or more process core;Preferably, processor 408 can integrated application processor and modem processor, wherein, should Mainly process operating system, user interface and application program etc. with processor, modem processor mainly processes radio communication. It is understood that above-mentioned modem processor can not also be integrated in processor 408.
Terminal also includes the power supply 409 (such as battery) powered to all parts, it is preferred that power supply can pass through power supply pipe Reason system is logically contiguous with processor 408, thus realizes management charging, electric discharge and power managed by power-supply management system Etc. function.Power supply 409 can also include one or more direct current or alternating current power supply, recharging system, power failure inspection Slowdown monitoring circuit, power supply changeover device or the random component such as inverter, power supply status indicator.
Although not shown, terminal can also include photographic head, bluetooth module etc., does not repeats them here.Specifically in this enforcement In example, the processor 408 in terminal can be according to following instruction, by corresponding for the process of one or more application program Executable file is loaded in memorizer 402, and is run the application program being stored in memorizer 402 by processor 408, from And realize various function:
Receiving image processing requests, the instruction of this image processing requests needs image to be processed, and this image comprises multiple icon; Obtain the pixel of this image according to this image processing requests, obtain pixel set;This pixel set is searched original Icon boundary pixel point, and according to presetted pixel interval and this original icon boundary pixel point, the original icon border of icon is entered Row extension, updates this pixel set according to the result of this extension;Pixel set in the updated is searched icon border picture Vegetarian refreshments, and according to this icon boundary pixel point positional information in the images, from this image, cut out corresponding figure.
Wherein, step " according to this icon boundary pixel point positional information in the images, cuts out phase from this image The icon answered " may include that
Determine the icon boundary pixel point belonging to same icon border, obtain the boundary pixel point set that this icon border is corresponding Close;
Obtain icon boundary pixel point positional information in the images in this border picture point set;
From this image, this icon is cut out according to this positional information.
Such as, step " cuts out this icon from this image according to this positional information " and may include that
Obtain the position offset information that this presetted pixel interval is corresponding;
According to this position offset information and this positional information, in obtaining this border picture point set, icon boundary pixel point is at this Actual position information in image;
From this image, this icon is cut out according to this actual position information.
Specifically, step " cuts out this icon from this image according to this actual position information " and may include that
According to the actual position information of icon boundary pixel point in this boundary pixel point set, obtain the chi that this icon is corresponding Very little information;
From this image, this icon is cut out according to this dimension information and this actual position information.
The most such as, step " determines the icon boundary pixel point belonging to same icon " and may include that based on this icon border Interval between pixel, determines the icon boundary pixel point belonging to same icon.
Aforesaid operations or operating procedure specifically can be found in embodiment of the method above, do not repeat them here.
From the foregoing, it will be observed that the terminal of the embodiment of the present invention
When receiving image processing requests, the pixel of this image can be obtained according to this image processing requests, obtain Pixel set, then, searches original icon boundary pixel point in this pixel set, and is spaced according to presetted pixel and is somebody's turn to do The original icon border of icon is extended by original icon boundary pixel point, updates this pixel point set according to the result of this extension Close, lookup icon boundary pixel point in pixel set in the updated, and according to this icon boundary pixel point in the images Positional information, from this image, cut out corresponding icon;The program can be based on icon boundary pixel in the position of image Information carries out cutting figure, i.e. can carry out cutting figure according to the actual size of icon, it is not necessary to user is adjusted figure image position when cutting figure The operation such as put, in terms of existing technologies, simplify and cut graphic operation, the efficiency cutting figure can be improved;Additionally, due to the program Can carry out cutting figure according to the actual size of icon, it is also possible to improve and cut the accuracy of figure and save system resource.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can Completing instructing relevant hardware by program, this program can be stored in a computer-readable recording medium, storage Medium may include that read only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc..
A kind of image processing method provided the embodiment of the present invention above and device are described in detail, herein Applying specific case to be set forth principle and the embodiment of the present invention, the explanation of above example is only intended to help Understand method and the core concept thereof of the present invention;Simultaneously for those skilled in the art, according to the thought of the present invention, at tool All will change on body embodiment and range of application, in sum, this specification content should not be construed as the present invention Restriction.

Claims (10)

1. an image processing method, it is characterised in that including:
Receiving image processing requests, the instruction of described image processing requests needs image to be processed, and described image comprises multiple icon;
Obtain the pixel of described image according to described image processing requests, obtain pixel set;
Original icon boundary pixel point is searched in described pixel set, and according to presetted pixel interval and described original icon The original icon border of icon is extended by boundary pixel point;
Result according to described extension updates described pixel set;
Pixel set in the updated is searched icon boundary pixel point, and according to described icon boundary pixel point at described figure Positional information in Xiang, cuts out corresponding icon from described image.
2. image processing method as claimed in claim 1, it is characterised in that described according to described icon boundary pixel point in institute State the positional information in image, from described image, cut out corresponding icon, including:
Determine the icon boundary pixel point belonging to same icon border, obtain the boundary pixel point set that described icon border is corresponding Close;
Obtain icon boundary pixel point positional information in described image in the picture point set of described border;
From described image, described icon is cut out according to described positional information.
3. image processing method as claimed in claim 2, it is characterised in that described according to described positional information from described image In cut out described icon, including:
Obtain the position offset information that described presetted pixel interval is corresponding;
According to described position offset information and described positional information, in obtaining the picture point set of described border, icon boundary pixel point exists Actual position information in described image;
From described image, described icon is cut out according to described actual position information.
4. image processing method as claimed in claim 3, it is characterised in that described according to described actual position information from described Image cuts out described icon, including:
According to the actual position information of icon boundary pixel point in described boundary pixel point set, obtain the chi that described icon is corresponding Very little information;
From described image, described icon is cut out according to described dimension information and described actual position information.
5. image processing method as claimed in claim 2, it is characterised in that described determine the icon border belonging to same icon Pixel, including:
Based on the interval between described icon boundary pixel point, determine the icon boundary pixel point belonging to same icon.
6. image processing method as claimed in claim 1, it is characterised in that described according to presetted pixel interval with described original The original icon border of icon is extended by icon boundary pixel point, including:
Corresponding original icon border is depicted according to described original icon boundary pixel point;
Being stretched out on described original icon border according to described presetted pixel interval, wherein, after extension, icon border is with described Distance between original icon border is spaced equal to described presetted pixel.
7. image processing method as claimed in claim 1, it is characterised in that described obtain institute according to described image processing requests State the pixel of image, obtain pixel set, including:
Obtain the pixel of described image according to described image processing requests, obtain original pixels point set;
Effective pixel points and inactive pixels point is determined in described original pixels point set;
Pixel set is determined according to described effective pixel points.
8. image processing method as claimed in claim 7, it is characterised in that determine in described original pixels point set effectively After pixel and inactive pixels point, before determining pixel set according to described effective pixel points, described image processing method Also include:
Determine whether described image is provided with protection zone;
The most then will be located in the point of the inactive pixels in described protection zone and be defined as effective pixel points.
9. an image processing apparatus, it is characterised in that including:
Receiving unit, be used for receiving image processing requests, the instruction of described image processing requests needs image to be processed, described image Comprise multiple icon;
Acquiring unit, for obtaining the pixel of described image according to described image processing requests, obtains pixel set;
Expanding element, for searching original icon boundary pixel point in described pixel set, and is spaced according to presetted pixel With described original icon boundary pixel point, the original icon border of icon is extended;
Updating block, updates described pixel set for the result according to described extension;
Cutter unit, searches icon boundary pixel point in pixel set in the updated, and according to described icon border Pixel positional information in described image, cuts out corresponding icon from described image.
10. image processing apparatus as claimed in claim 9, it is characterised in that described cutter unit includes: first searches son list Unit, border determine subelement, position acquisition subelement and cutting subelement;
Described first searches subelement, searches icon boundary pixel point in pixel set in the updated;
Described border determines subelement, for determining the icon boundary pixel point belonging to same icon border, obtains described icon The boundary pixel point set that border is corresponding;
Described position acquisition subelement, in obtaining the picture point set of described border, icon boundary pixel point is in described image Positional information;
Described cutting subelement, for cutting out described icon according to described positional information from described image.
CN201610539785.9A 2016-07-08 2016-07-08 Image processing method and device Active CN106204588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610539785.9A CN106204588B (en) 2016-07-08 2016-07-08 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610539785.9A CN106204588B (en) 2016-07-08 2016-07-08 Image processing method and device

Publications (2)

Publication Number Publication Date
CN106204588A true CN106204588A (en) 2016-12-07
CN106204588B CN106204588B (en) 2020-03-17

Family

ID=57473510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610539785.9A Active CN106204588B (en) 2016-07-08 2016-07-08 Image processing method and device

Country Status (1)

Country Link
CN (1) CN106204588B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106846353A (en) * 2017-01-04 2017-06-13 美的集团股份有限公司 Image processing method, image processing apparatus and equipment based on density
CN107463697A (en) * 2017-08-15 2017-12-12 腾讯科技(深圳)有限公司 Method of adjustment, device and the computer-readable storage medium of picture size
CN109582807A (en) * 2018-09-29 2019-04-05 中国平安人寿保险股份有限公司 Picture update method, device, computer installation and storage medium
CN110660029A (en) * 2019-09-12 2020-01-07 深兰科技(上海)有限公司 Image processing method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101493735A (en) * 2008-01-21 2009-07-29 宏碁股份有限公司 Touch control plate operating system and method
CN101727656A (en) * 2008-10-31 2010-06-09 李德毅 Image segmenting method based on data field
CN102111640A (en) * 2010-11-30 2011-06-29 广东威创视讯科技股份有限公司 Effective image area detection method and system
CN102495727A (en) * 2011-10-25 2012-06-13 福州博远无线网络科技有限公司 Method for synthesizing icons in interface of intelligent handheld device system
CN102572205A (en) * 2011-12-27 2012-07-11 方正国际软件有限公司 Image processing method, device and system
CN102622163A (en) * 2011-03-14 2012-08-01 北京小米科技有限责任公司 Icon generation method
CN103248796A (en) * 2012-02-01 2013-08-14 佳能株式会社 Image processing apparatus and method
CN104091332A (en) * 2014-07-01 2014-10-08 黄河科技学院 Method for optimizing multilayer image segmentation of multiclass color texture images based on variation model
CN105389165A (en) * 2015-10-21 2016-03-09 广州视睿电子科技有限公司 Document picture display method and device and terminal

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101493735A (en) * 2008-01-21 2009-07-29 宏碁股份有限公司 Touch control plate operating system and method
CN101727656A (en) * 2008-10-31 2010-06-09 李德毅 Image segmenting method based on data field
CN102111640A (en) * 2010-11-30 2011-06-29 广东威创视讯科技股份有限公司 Effective image area detection method and system
CN102622163A (en) * 2011-03-14 2012-08-01 北京小米科技有限责任公司 Icon generation method
CN102495727A (en) * 2011-10-25 2012-06-13 福州博远无线网络科技有限公司 Method for synthesizing icons in interface of intelligent handheld device system
CN102572205A (en) * 2011-12-27 2012-07-11 方正国际软件有限公司 Image processing method, device and system
CN103248796A (en) * 2012-02-01 2013-08-14 佳能株式会社 Image processing apparatus and method
CN104091332A (en) * 2014-07-01 2014-10-08 黄河科技学院 Method for optimizing multilayer image segmentation of multiclass color texture images based on variation model
CN105389165A (en) * 2015-10-21 2016-03-09 广州视睿电子科技有限公司 Document picture display method and device and terminal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106846353A (en) * 2017-01-04 2017-06-13 美的集团股份有限公司 Image processing method, image processing apparatus and equipment based on density
CN106846353B (en) * 2017-01-04 2020-02-21 美的集团股份有限公司 Density-based image processing method, image processing apparatus and device
CN107463697A (en) * 2017-08-15 2017-12-12 腾讯科技(深圳)有限公司 Method of adjustment, device and the computer-readable storage medium of picture size
CN109582807A (en) * 2018-09-29 2019-04-05 中国平安人寿保险股份有限公司 Picture update method, device, computer installation and storage medium
CN110660029A (en) * 2019-09-12 2020-01-07 深兰科技(上海)有限公司 Image processing method, device, equipment and storage medium
CN110660029B (en) * 2019-09-12 2022-05-06 深兰科技(上海)有限公司 Image processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN106204588B (en) 2020-03-17

Similar Documents

Publication Publication Date Title
CN103455582B (en) The display packing of browser navigation page and mobile terminal
CN103530115B (en) Application program display method and device and terminal equipment
CN103853819B (en) A kind of method of acquisition of information, terminal and system
CN105005457A (en) Geographical location display method and apparatus
CN104978115A (en) Content display method and device
CN105095432A (en) Display method and device for webpage annotations
CN104457767A (en) Position service realization method and apparatus thereof
CN103455571A (en) Method and device for displaying picture in webpage, and terminal
CN106204588A (en) A kind of image processing method and device
CN105975190A (en) Graph interface processing method, device and system
CN106203459A (en) Image processing method and device
CN104216915A (en) Webpage processing method, device and terminal equipment
CN107368231A (en) A kind of theme processing method and Related product
CN103310007B (en) Webpage changing method, device and equipment
CN105955597A (en) Method and device for displaying information
CN104035951A (en) Method, device and terminal for displaying map
CN105957544A (en) Lyric display method and device
CN104021129A (en) Picture group display method and terminal
CN104238900A (en) Page positioning method and device
CN104216929A (en) Method and device for intercepting page elements
CN107291326A (en) Icon processing method and terminal
CN104820546A (en) Functional information exhibition method and apparatus
CN104598542A (en) Display method and device for multimedia information
CN105303591A (en) Method for superposing place information in puzzle, terminal and server
CN106980654B (en) Road condition updating method, device and computer equipment

Legal Events

Date Code Title Description
C06 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