CN104408754B - A kind of icon synthetic method - Google Patents

A kind of icon synthetic method Download PDF

Info

Publication number
CN104408754B
CN104408754B CN201410594170.7A CN201410594170A CN104408754B CN 104408754 B CN104408754 B CN 104408754B CN 201410594170 A CN201410594170 A CN 201410594170A CN 104408754 B CN104408754 B CN 104408754B
Authority
CN
China
Prior art keywords
icon
image
border
midpoint
cut
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410594170.7A
Other languages
Chinese (zh)
Other versions
CN104408754A (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.)
SHANGHAI QUZHI NETWORK TECHNOLOGY CO.,LTD.
Original Assignee
Guangzhou Jiubang Century Science And Technology 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 Guangzhou Jiubang Century Science And Technology Co Ltd filed Critical Guangzhou Jiubang Century Science And Technology Co Ltd
Priority to CN201410594170.7A priority Critical patent/CN104408754B/en
Publication of CN104408754A publication Critical patent/CN104408754A/en
Application granted granted Critical
Publication of CN104408754B publication Critical patent/CN104408754B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention provides a kind of icon synthetic method, including:The content of icon original image is extracted, obtains each border midpoint of picture material;Calculate the vertical range of each border midpoint of picture material and image boundary;Whether each border midpoint of comparison image content is identical with the distance value on icon image border or in pre-determined distance difference range, if so, being determined as regular image, regular image is cut, icon image content boundaries pixel is traveled through, finds out the extreme coordinates position on each border;Judge whether the extreme coordinates value of adjacent boundary is identical, if the different arc radius that adjacent boundary connection is calculated according to the extreme coordinates value of adjacent boundary, calculate the midpoint of circular arc;Using the midpoint of each circular arc as end points, it is attached successively and draws and finally cut the scope that cuts of icon original image, and icon original image is cut;The icon image cut and default masking-out image are merged;Quickly and easily icon is cut unified to reach style.

Description

A kind of icon synthetic method
Technical field
The present invention relates to technical field of image processing, and in particular to a kind of icon synthetic method.
Background technology
Icon synthesized by the icon text importing synthetic method of existing mobile terminal desktop is more stiff, and style is widely different It is different, ununified sense.Chinese publication CN102622163A discloses a kind of icon generation method, and it is first by primary icon It is adjusted to size set in advance and calculates the dominant hue of primary icon, background colour is then generated according to the dominant hue, The background colour is applied mechanically into gradual change template generation icon bottom plate, finally the icon after adjustment cut, the icon bottom Icon and a preset icon foreground template after plate, cutting are superimposed, and generate final icon, are synthesized by the method Although icon style it is unified, the dominant hue that calculate icon generates corresponding icon bottom plate and merged again, step ratio It is cumbersome.
The content of the invention
The purpose of the present invention, it is exactly overcome the deficiencies in the prior art, there is provided one kind is quickly and easily cut icon To reach the unified icon synthetic method of style.
In order to achieve the above object, adopt the following technical scheme that:A kind of icon synthetic method, comprises the following steps:
S1, obtain icon original image;
S2, the content for extracting icon original image, obtain each border midpoint of picture material;
S3, the vertical range for calculating each border midpoint of picture material and image boundary;
Whether each border midpoint of S4, comparison image content is identical or poor in pre-determined distance with the distance value on icon image border In the range of value, if so, being determined as regular image, it is cut;If it is not, then it is determined as irregular image, with preset icon Base merges;
S5, regular image is cut, travel through icon image content boundaries pixel, find out the extreme coordinates position on each border Put;
S6, judge whether the extreme coordinates value of adjacent boundary is identical, if identical, without cutting, with default masking-out figure As merging;If differing, the arc radius of adjacent boundary connection is calculated according to the extreme coordinates value of adjacent boundary, and The midpoint of circular arc is calculated according to the radiuscope of circular arc;
S7, using the midpoint of each circular arc as end points, be attached successively and draw and finally cut cutting for icon original image Scope, and icon original image is cut;
S8, the icon image cut and default masking-out image merged.
Further, the concrete operations of the content of extraction icon original image are in the step S2:Travel through icon original graph Each pixel of picture, judges whether each pixel transparent angle value exceedes preset value, if exceeding preset value, is determined as non-icon figure As content, if being no more than preset value, it is determined as icon image content.
Further, the concrete operations at each border midpoint of acquisition picture material are in the step S2:Obtain in icon image Hold the extreme coordinates value on each border, the intermediate point for taking both ends point coordinates is the midpoint on each border.
Further, methods described is further comprising the steps of:
Before step S4, judge that each border midpoint of picture material is relative with the ultimate range in the vertical range of image boundary Whether it is more than preset ratio value in the ratio value of whole icon image, if so, then entering step S4, if it is not, need not then be cut out Cut and merged with default masking-out image.
Further, icon image content boundaries pixel is traveled through in the step S5, finds out the extreme coordinates position on each border Concrete operations be:Using each border midpoint of picture material as starting point, traveled through to the left, to the right, judged one by one current respectively Whether pixel transparent angle value exceedes preset value, if being no more than preset value, judges valid pixel and records coordinate position, continue to sentence Disconnected next pixel transparent angle value;If exceeding preset value, it is determined as inactive pixels, stops time to next pixel transparent angle value Go through, and record endpoint location of the coordinate position of the previous pixel of the pixel as border.
Further, the concrete operations merged the icon image cut and default masking-out image in the step S8 For:Masking-out image object is drawn on identical canvas object, in drawing process, the specified excessive pattern of rendered object is:Only The icon image finally shown is drawn in the disjoint place of icon image and masking-out image, to realize synthesis.
Compared with prior art, the beneficial effects of the present invention are:The present invention is by obtaining icon original image;Extraction figure The content of original image is marked, obtains each border midpoint of picture material;Calculate hanging down for each border midpoint of picture material and image boundary Straight distance;Whether each border midpoint of comparison image content is identical with the distance value on icon image border or in pre-determined distance difference model In enclosing, if so, being determined as regular image, it is cut;If it is not, then it is determined as irregular image, with preset icon base Merge;Regular image is cut, travels through icon image content boundaries pixel, finds out the extreme coordinates position on each border Put;Judge whether the extreme coordinates value of adjacent boundary is identical, if identical, without cutting, closed with default masking-out image And;If differing, the arc radius of adjacent boundary connection is calculated according to the extreme coordinates value of adjacent boundary, and according to circular arc Radiuscope calculate the midpoint of circular arc;Using the midpoint of each circular arc as end points, it is attached successively and draws and final cut icon original Beginning image cuts scope, and icon original image is cut;The icon image cut and default masking-out image are entered Row merges;Quickly and easily icon is cut unified to reach style.
Brief description of the drawings
The icon synthetic method flow chart of Fig. 1 embodiment of the present invention one;
The regular image of Fig. 2 embodiment of the present invention one cuts flow chart;
The irregular image of Fig. 3 embodiment of the present invention one cuts flow chart;
The icon synthetic method flow chart of Fig. 4 embodiment of the present invention two.
Embodiment
Describe the present invention in detail below in conjunction with accompanying drawing and specific implementation method, the present invention schematic implementation and Illustrate for explaining the present invention, but it is not as a limitation of the invention.
Embodiment one, as shown in figure 1, a kind of icon synthetic method, comprises the following steps:
S101:Obtain icon original image;
S102:The content of icon original image is extracted, obtains each border midpoint of picture material;
S103:Calculate the vertical range of each border midpoint of picture material and image boundary;
S104:Whether each border midpoint of comparison image content is identical with the distance value on icon image border or in pre-determined distance In difference range, if so, as shown in Fig. 2 be determined as regular image, it is cut;If it is not, as shown in figure 3, then it is determined as Irregular image, merged with preset icon base;
S105:Regular image is cut, travels through icon image content boundaries pixel, finds out the extreme coordinates on each border Position;
S106, judge whether the extreme coordinates value of adjacent boundary is identical, if identical, without cutting, with default masking-out Image merges;If differing, the arc radius of adjacent boundary connection is calculated according to the extreme coordinates value of adjacent boundary, And the midpoint of circular arc is calculated according to the radiuscope of circular arc;
S107:Using the midpoint of each circular arc as end points, it is attached draws the final sanction for cutting icon original image successively Scope is cut, and icon original image is cut;
S108:The icon image cut and default masking-out image are merged.
Embodiment two, as shown in figure 4, a kind of icon synthetic method, comprises the following steps:
S201:Obtain icon original image;
S202:The content of icon original image is extracted, each pixel of icon original image is traveled through, judges that each pixel is saturating Whether brightness value exceedes preset value, if so, into step S203;If it is not, into step S204;
S203:It is determined as non-icon picture material;
S204:It is determined as icon image content, and enters step S205;
S205:The extreme coordinates value on each border of icon image content is obtained, the intermediate point for taking both ends point coordinates is each border Midpoint;
S206:The vertical range of each border midpoint of picture material and image boundary is calculated,
S207:Judge the ultimate range in the vertical range of each border midpoint of picture material and image boundary relative to whole Whether the ratio value of icon image is more than preset ratio value, if so, then entering step S209, if it is not, then entering step S208;
S208:It need not be cut and be merged with default masking-out image;
S209:Whether each border midpoint of comparison image content is identical with the distance value on icon image border or in pre-determined distance In difference range, if so, into step S211;If it is not, into step S210;
S210:It is determined as irregular image, is merged with preset icon base;
S211:It is determined as regular image, it is cut, travels through icon image content boundaries pixel, find out each border Extreme coordinates position, using each border midpoint of picture material as starting point, traveled through to the left, to the right respectively;
S212:Judge whether current pixel transparence value exceedes preset value one by one, if so, then entering step S214;If it is not, Then enter step S213;
S213:Judge valid pixel and record coordinate position, continue to judge next pixel transparent angle value;
S214:It is determined as inactive pixels, stops the traversal to next pixel transparent angle value, and record the previous of the pixel Endpoint location of the coordinate position of pixel as border;
S215:Judge whether the extreme coordinates value of adjacent boundary is identical, if so, into step S216;If it is not, into step S217;
S216:Without cutting, merged with default masking-out image;
S217:The arc radius of adjacent boundary connection is calculated according to the extreme coordinates value of adjacent boundary, and according to circular arc Radiuscope calculate the midpoint of circular arc;
S218:Using the midpoint of each circular arc as end points, it is attached draws the final sanction for cutting icon original image successively Scope is cut, and icon original image is cut;
S219:The icon image cut and default masking-out image are merged, drawn on identical canvas object Masking-out image object, in drawing process, the specified excessive pattern of rendered object is:It is only non-intersect in icon image and masking-out image Place draw the icon image that finally shows, to realize synthesis.
The present invention is by obtaining icon original image;The content of icon original image is extracted, obtains each border of picture material Midpoint;Calculate the vertical range of each border midpoint of picture material and image boundary;Each border midpoint of comparison image content and icon Whether the distance value of image boundary is identical or in pre-determined distance difference range, if so, being determined as regular image, it is cut out Cut;If it is not, being then determined as irregular image, merged with preset icon base;Regular image is cut, travels through icon Picture material boundary pixel, find out the extreme coordinates position on each border;Judge whether the extreme coordinates value of adjacent boundary is identical, if It is identical, then without cutting, merged with default masking-out image;If differing, according to the extreme coordinates value of adjacent boundary The arc radius of adjacent boundary connection is calculated, and the midpoint of circular arc is calculated according to the radiuscope of circular arc;With the midpoint of each circular arc As end points, it is attached draws the final scope that cuts for cutting icon original image successively, and icon original image is carried out Cut;The icon image cut and default masking-out image are merged;Desktop icons style is unified, solved Conventional desktop icons style disunity, the problem of lacking aesthetic feeling, add the experience of user.
If the function described in the present embodiment realized in the form of SFU software functional unit and as independent production marketing or In use, it can be stored in a computing device read/write memory medium.Based on such understanding, the embodiment of the present invention is to existing The part for having part that technology contributes or the technical scheme can be embodied in the form of software product, software production Product are stored in a storage medium, including some instructions to cause a computing device (can be personal computer, service Device, mobile computing device or network equipment etc.) perform all or part of step of each embodiment methods described of the present invention.And Foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory Device (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.This explanation Each embodiment is described by the way of progressive in book, what each embodiment stressed be it is different from other embodiments it Place, between each embodiment same or similar part mutually referring to.
The foregoing description of the disclosed embodiments, professional and technical personnel in the field are enable to realize or using the present invention. A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one The most wide scope caused.

Claims (6)

1. a kind of icon synthetic method, it is characterised in that comprise the following steps:
S1, obtain icon original image;
S2, the content for extracting icon original image, obtain each border midpoint of picture material;
S3, the vertical range for calculating each border midpoint of picture material and image boundary;
Whether each border midpoint of S4, comparison image content is identical with the distance value on icon image border or in pre-determined distance difference model In enclosing, if so, being determined as regular image, it is cut;If it is not, then it is determined as irregular image, with preset icon base Merge;
S5, regular image is cut, travel through icon image content boundaries pixel, find out the extreme coordinates position on each border;
S6, judge whether the extreme coordinates value of adjacent boundary is identical, if identical, without cutting, enter with default masking-out image Row merges;If differing, according to the extreme coordinates value of adjacent boundary calculate adjacent boundary connection arc radius, and according to The radiuscope of circular arc calculates the midpoint of circular arc;
S7, using the midpoint of each circular arc as end points, be attached successively draw it is final cut icon original image cut scope, And icon original image is cut;
S8, the icon image cut and default masking-out image merged.
2. icon synthetic method according to claim 1, it is characterised in that icon original image is extracted in the step S2 The concrete operations of content be:Each pixel of icon original image is traveled through, it is pre- to judge whether each pixel transparent angle value exceedes If value, if exceeding preset value, is determined as non-icon picture material, if being no more than preset value, is determined as icon image content.
3. icon synthetic method according to claim 1, it is characterised in that each side of picture material is obtained in the step S2 The concrete operations at boundary midpoint are:The extreme coordinates value on each border of icon image content is obtained, the intermediate point for taking both ends point coordinates is The midpoint on each border.
4. icon synthetic method according to claim 1, it is characterised in that methods described is further comprising the steps of:
Before step S4, judge the ultimate range in the vertical range of each border midpoint of picture material and image boundary relative to whole Whether the ratio value of individual icon image is more than preset ratio value, if so, then entering step S4, if it is not, need not then be cut simultaneously Merged with default masking-out image.
5. icon synthetic method according to claim 1, it is characterised in that icon image content is traveled through in the step S5 Boundary pixel, the concrete operations for finding out the extreme coordinates position on each border are:Using each border midpoint of picture material as starting point, point Do not traveled through to the left, to the right, judge whether current pixel transparence value exceedes preset value one by one, if being no more than preset value, Judge valid pixel and record coordinate position, continue to judge next pixel transparent angle value;If exceeding preset value, it is invalid to be determined as Pixel, stop the traversal to next pixel transparent angle value, and record the coordinate position of the previous pixel of the pixel as border Endpoint location.
6. icon synthetic method according to claim 1, it is characterised in that the icon figure that will have been cut in the step S8 As the concrete operations merged with default masking-out image are:Masking-out image object is drawn on identical canvas object, is being painted During system, the specified excessive pattern of rendered object is:Only drawn in the disjoint place of icon image and masking-out image final aobvious The icon image shown, to realize synthesis.
CN201410594170.7A 2014-10-28 2014-10-28 A kind of icon synthetic method Active CN104408754B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410594170.7A CN104408754B (en) 2014-10-28 2014-10-28 A kind of icon synthetic method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410594170.7A CN104408754B (en) 2014-10-28 2014-10-28 A kind of icon synthetic method

Publications (2)

Publication Number Publication Date
CN104408754A CN104408754A (en) 2015-03-11
CN104408754B true CN104408754B (en) 2017-11-28

Family

ID=52646382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410594170.7A Active CN104408754B (en) 2014-10-28 2014-10-28 A kind of icon synthetic method

Country Status (1)

Country Link
CN (1) CN104408754B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106325956A (en) * 2016-08-30 2017-01-11 乐视控股(北京)有限公司 Application program icon adjusting method and device
CN106445276A (en) * 2016-08-30 2017-02-22 青岛海信移动通信技术股份有限公司 Desktop icon processing method and apparatus
CN108595239B (en) * 2018-04-18 2021-08-13 腾讯科技(深圳)有限公司 Picture processing method, device, terminal and computer readable storage medium
CN108846875A (en) * 2018-04-26 2018-11-20 广州视源电子科技股份有限公司 Shape data treating method and apparatus
CN109885218B (en) * 2018-12-29 2022-02-25 深圳前海达闼云端智能科技有限公司 Icon processing method and device and terminal
CN114862856B (en) * 2022-07-07 2022-10-11 成都数之联科技股份有限公司 Panel defect area identification method and device, electronic equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6031532A (en) * 1998-05-08 2000-02-29 Apple Computer, Inc. Method and apparatus for generating composite icons and composite masks
CN102622163A (en) * 2011-03-14 2012-08-01 北京小米科技有限责任公司 Icon generation method
US8411112B1 (en) * 2011-07-08 2013-04-02 Google Inc. Systems and methods for generating an icon
CN103927772A (en) * 2014-04-30 2014-07-16 厦门美图之家科技有限公司 Icon synthesizing method
CN103970521A (en) * 2013-01-31 2014-08-06 鸿富锦精密工业(深圳)有限公司 Icon generative system and icon generative method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6031532A (en) * 1998-05-08 2000-02-29 Apple Computer, Inc. Method and apparatus for generating composite icons and composite masks
CN102622163A (en) * 2011-03-14 2012-08-01 北京小米科技有限责任公司 Icon generation method
US8411112B1 (en) * 2011-07-08 2013-04-02 Google Inc. Systems and methods for generating an icon
CN103970521A (en) * 2013-01-31 2014-08-06 鸿富锦精密工业(深圳)有限公司 Icon generative system and icon generative method
CN103927772A (en) * 2014-04-30 2014-07-16 厦门美图之家科技有限公司 Icon synthesizing method

Also Published As

Publication number Publication date
CN104408754A (en) 2015-03-11

Similar Documents

Publication Publication Date Title
CN104408754B (en) A kind of icon synthetic method
WO2017173918A1 (en) 3d virtual environment generating method and device
KR102107887B1 (en) Method and apparatus for generating a composite image
CN107967713A (en) Construction three-dimensional model building method and system based on spatial point cloud data
CN108334802B (en) Method and device for positioning road feature
Liqiang et al. A spatial cognition-based urban building clustering approach and its applications
CN106484692B (en) A kind of method for searching three-dimension model
CN105321147B (en) The method and device of image procossing
CN105069808A (en) Video image depth estimation method based on image segmentation
JP2005293577A (en) Method, device, and program for generating high-condensation visual summary of vide area
CN105511792A (en) In-position hand input method and system for form
CN104463873B (en) A kind of image object method for relocating scaled based on local uniform
CN110610045A (en) Intelligent cloud processing system and method for generating three views by selecting cabinet and wardrobe
Dong et al. Summarization-based image resizing by intelligent object carving
CN103686139A (en) Frame image conversion method, frame video conversion method and frame video conversion device
Luo et al. Multi-operator image retargeting with automatic integration of direct and indirect seam carving
Yang et al. Interactive visualization of multi-resolution urban building models considering spatial cognition
US20070266307A1 (en) Auto-layout of shapes
CN104992176B (en) A kind of Chinese character extracting method towards an inscription on a tablet
CN105404612A (en) Digital resource display method and system
CN103605751A (en) Three-dimensional thermodynamic diagram processing method and device
AU2019226189A1 (en) A system for comparison and merging of versions in edited websites and interactive applications
US20230196671A1 (en) Method and System for Rendering Boundary of Map Area Within Game Map, and Computer-Readable Storage Medium
CN109901759A (en) A kind of icon processing method and processing device
US9779698B2 (en) Information processing method and electronic device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20170911

Address after: 510055, tower 17, A tower, Zhonghua International Center, No. three, 33 Zhongshan Road, Yuexiu District, Guangdong, Guangzhou, China

Applicant after: Guangzhou jiubang century science and Technology Co Ltd

Address before: 510055 A, block 16-17, China International Center, No. three, Zhongshan Road, Guangzhou, Guangdong, China

Applicant before: Jiubang computer technology (Guangzhou) Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200629

Address after: 17F, Shanghai Waijing building, 681 xiaomuqiao Road, Xuhui District, Shanghai, 200433

Patentee after: SHANGHAI QUZHI NETWORK TECHNOLOGY Co.,Ltd.

Address before: 510055, tower 17, A tower, Zhonghua International Center, No. three, 33 Zhongshan Road, Yuexiu District, Guangdong, Guangzhou, China

Patentee before: GUANGZHOU GOMO SHIJI TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
CP03 Change of name, title or address

Address after: 200433 room 6015-4, 335 Guo Ding Road, Yangpu District, Shanghai.

Patentee after: SHANGHAI QUZHI NETWORK TECHNOLOGY CO.,LTD.

Address before: 200433 17th floor, Shanghai Waijing building, 681 xiaomuqiao Road, Xuhui District, Shanghai

Patentee before: SHANGHAI QUZHI NETWORK TECHNOLOGY CO.,LTD.

CP03 Change of name, title or address