CN104408754A - Icon synthesis method - Google Patents

Icon synthesis method Download PDF

Info

Publication number
CN104408754A
CN104408754A CN201410594170.7A CN201410594170A CN104408754A CN 104408754 A CN104408754 A CN 104408754A CN 201410594170 A CN201410594170 A CN 201410594170A CN 104408754 A CN104408754 A CN 104408754A
Authority
CN
China
Prior art keywords
image
icon
border
cut
mid point
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
CN201410594170.7A
Other languages
Chinese (zh)
Other versions
CN104408754B (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
JIUBANG COMPUTER TECHNOLOGY (GUANGZHOU) 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 JIUBANG COMPUTER TECHNOLOGY (GUANGZHOU) Co Ltd filed Critical JIUBANG COMPUTER TECHNOLOGY (GUANGZHOU) 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

Abstract

Provided in the invention is an icon synthesis method. The method comprises the following steps: extracting a content of an icon original image and obtaining all boundary midpoints of the image content; calculating vertical distances between all boundary midpoints of the image content and the image boundary; comparing whether the distances between all boundary midpoints of the image content and the icon image boundary are identical or in a preset distance difference range; if so, determining the image as a regular one, cutting the regular image, traversing boundary pixels of the icon image content, and finding out endpoint coordinate positions of all boundaries; determining whether the endpoint coordinate values of adjacent boundaries are identical; if not, calculating circular arc radiuses for connection of the adjacent boundaries according to the endpoint coordinate values of adjacent boundaries and calculating midpoints of the circular arcs; carrying out connection successively by using the midpoints of the circular arcs as end points to obtain a cutting range of a final cutting icon original image and cutting the icon original image; and combining the cut icon image with a preset masking image. With the method, the icon can be cut simply and rapidly, thereby realizing style unification.

Description

A kind of icon synthetic method
Technical field
The present invention relates to technical field of image processing, be specifically related to a kind of icon synthetic method.
Background technology
According to existing mobile terminal desktop icon synthetic method synthesized by icon more stiff, and different style, unified sense.China publication CN102622163A discloses a kind of icon generation method, first primary icon is adjusted to the size that presets and is calculated the dominant hue of primary icon by it, then according to this dominant hue generation background look, described background colour is applied mechanically gradual change template generation icon bottom plate, finally the icon after adjustment is cut, described icon bottom plate, icon after cutting and a preset icon foreground template are superimposed, generate final icon, although the icon style of being synthesized by the method is unified, but the dominant hue calculating icon generates corresponding icon bottom plate to be merged again, step is more loaded down with trivial details.
Summary of the invention
Object of the present invention, overcomes the deficiencies in the prior art exactly, provides a kind of being carried out by icon quickly and easily to cut to reach the unified icon synthetic method of style.
In order to achieve the above object, adopt following technical scheme: a kind of icon synthetic method, comprises the following steps:
S1, acquisition icon original image;
The content of S2, extraction icon original image, obtains picture material each border mid point;
The vertical range of S3, computed image content each border mid point and image boundary;
Whether S4, comparison image content each border mid point is identical with the distance value on icon image border or in predeterminable range difference range, is if so, judged to be regular image, cuts it; If not, be then judged to be irregular image, merge with preset icon base;
S5, cut regular image, traversing graph logo image content boundaries pixel, finds out the extreme coordinates position on each border;
S6, judge that whether the extreme coordinates value of adjacent boundary is identical, if identical, then do not cut, merge with default masking-out image; If not identical, then calculate the arc radius of adjacent boundary connection according to the extreme coordinates value of adjacent boundary, and calculate the mid point of circular arc according to the radiuscope of circular arc;
S7, using the mid point of each circular arc as end points, carry out successively connecting draw finally cut icon original image cut scope, and icon original image to be cut;
S8, the icon image cut and default masking-out image to be merged.
Further, the concrete operations of extracting the content of icon original image in described step S2 are: each pixel of traversal icon original image, judge whether each pixel transparent angle value exceedes preset value, if exceed preset value, then be judged to be non-icon image content, if be no more than preset value, be then judged to be icon image content.
Further, the concrete operations obtaining picture material each border mid point in described step S2 are: the extreme coordinates value obtaining each border of icon image content, the intermediate point getting two-end-point coordinate is the mid point on each border.
Further, described method is further comprising the steps of:
Before step S4, judge whether the ultimate range in the vertical range of picture material each border mid point and image boundary is greater than preset ratio value relative to the ratio value of whole icon image, if so, then enters step S4, if not, then without the need to carrying out cutting and merging with default masking-out image.
Further, traversing graph logo image content boundaries pixel in described step S4, the concrete operations finding out the extreme coordinates position on each border are: using picture material each border mid point as starting point, travel through left, to the right respectively, judge whether current pixel transparence value exceedes preset value one by one, if be no more than preset value, then judge valid pixel and record coordinate position, continuing to judge next pixel transparent angle value; If exceed preset value, be then judged to be inactive pixels, stop the traversal to next pixel transparent angle value, and record the endpoint location of coordinate position as border of the previous pixel of this pixel.
Further, in described step S8 by the concrete operations that the icon image cut and default masking-out image carry out merging be: on identical canvas object, draw masking-out image object, in drawing process, the excessive pattern of appointment rendered object is: only draw the final icon image shown, to realize synthesis at icon image and the disjoint place of masking-out image.
Compared with prior art, beneficial effect of the present invention is: the present invention is by obtaining icon original image; Extract the content of icon original image, obtain picture material each border mid point; The vertical range of computed image content each border mid point and image boundary; Whether comparison image content each border mid point is identical with the distance value on icon image border or in predeterminable range difference range, is if so, judged to be regular image, cuts it; If not, be then judged to be irregular image, merge with preset icon base; Cut regular image, traversing graph logo image content boundaries pixel, finds out the extreme coordinates position on each border; Judge that whether the extreme coordinates value of adjacent boundary is identical, if identical, then do not cut, merge with default masking-out image; If not identical, then calculate the arc radius of adjacent boundary connection according to the extreme coordinates value of adjacent boundary, and calculate the mid point of circular arc according to the radiuscope of circular arc; Using the mid point of each circular arc as end points, carry out successively connecting draw finally cut icon original image cut scope, and icon original image to be cut; The icon image cut and default masking-out image are merged; Quickly and easily icon is carried out cutting to reach style unified.
Accompanying drawing explanation
Fig. 1 embodiment of the present invention one icon synthetic method process flow diagram;
Fig. 2 embodiment of the present invention one regular image cut process flow diagram;
Fig. 3 embodiment of the present invention one irregular image cut process flow diagram;
Fig. 4 embodiment of the present invention two icon synthetic method process flow diagram.
Embodiment
Describe the present invention in detail below in conjunction with accompanying drawing and specific implementation method, be used for explaining the present invention in exemplary embodiment and description of the present invention, but 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 extracting icon original image, obtains picture material each border mid point;
S103: the vertical range of computed image content each border mid point and image boundary;
S104: whether comparison image content each border mid point is identical with the distance value on icon image border or in predeterminable range difference range, if so, as shown in Figure 2, is judged to be regular image, cuts it; If not, as shown in Figure 3, be then judged to be irregular image, merge with preset icon base;
S105: regular image is cut, traversing graph logo image content boundaries pixel, finds out the extreme coordinates position on each border;
S106, judge that whether the extreme coordinates value of adjacent boundary is identical, if identical, then do not cut, merge with default masking-out image; If not identical, then calculate the arc radius of adjacent boundary connection according to the extreme coordinates value of adjacent boundary, and calculate the mid point of circular arc according to the radiuscope of circular arc;
S107: using the mid point of each circular arc as end points, carry out successively connecting draw finally cut icon original image cut scope, and icon original image to be 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 extracting icon original image, each pixel of traversal icon original image, judges whether each pixel transparent angle value exceedes preset value, if so, enters step S203; If not, step S204 is entered;
S203: be judged to be non-icon image content;
S204: be judged to be icon image content, and enter step S205;
S205: the extreme coordinates value obtaining each border of icon image content, the intermediate point getting two-end-point coordinate is the mid point on each border;
S206: the vertical range of computed image content each border mid point and image boundary,
S207: judge whether the ultimate range in the vertical range of picture material each border mid point and image boundary is greater than preset ratio value relative to the ratio value of whole icon image, if so, then enters step S209, if not, then enters step S208;
S208: without the need to carrying out cutting and merging with default masking-out image;
S209: whether comparison image content each border mid point is identical with the distance value on icon image border or in predeterminable range difference range, if so, enters step S211; If not, step S210 is entered;
S210: be judged to be irregular image, merges with preset icon base;
S211: be judged to be regular image, cuts it, and traversing graph logo image content boundaries pixel, finds out the extreme coordinates position on each border, using picture material each border mid point as starting point, travels through left, to the right respectively;
S212: judge whether current pixel transparence value exceedes preset value, if so, then enters step S214 one by one; If not, then step S213 is entered;
S213: judge valid pixel and record coordinate position, continues to judge next pixel transparent angle value;
S214: be judged to be inactive pixels, stops the traversal to next pixel transparent angle value, and records the endpoint location of coordinate position as border of the previous pixel of this pixel;
S215: judge that whether the extreme coordinates value of adjacent boundary is identical, if so, enter step S216; If not, step S217 is entered;
S216: do not cut, merges with default masking-out image;
S217: the arc radius calculating adjacent boundary connection according to the extreme coordinates value of adjacent boundary, and the mid point of circular arc is calculated according to the radiuscope of circular arc;
S218: using the mid point of each circular arc as end points, carry out successively connecting draw finally cut icon original image cut scope, and icon original image to be cut;
S219: the icon image cut and default masking-out image are merged, identical canvas object is drawn masking-out image object, in drawing process, the excessive pattern of appointment rendered object is: only draw the final icon image shown, to realize synthesis at icon image and the disjoint place of masking-out image.
The present invention is by obtaining icon original image; Extract the content of icon original image, obtain picture material each border mid point; The vertical range of computed image content each border mid point and image boundary; Whether comparison image content each border mid point is identical with the distance value on icon image border or in predeterminable range difference range, is if so, judged to be regular image, cuts it; If not, be then judged to be irregular image, merge with preset icon base; Cut regular image, traversing graph logo image content boundaries pixel, finds out the extreme coordinates position on each border; Judge that whether the extreme coordinates value of adjacent boundary is identical, if identical, then do not cut, merge with default masking-out image; If not identical, then calculate the arc radius of adjacent boundary connection according to the extreme coordinates value of adjacent boundary, and calculate the mid point of circular arc according to the radiuscope of circular arc; Using the mid point of each circular arc as end points, carry out successively connecting draw finally cut icon original image cut scope, and icon original image to be cut; The icon image cut and default masking-out image are merged; Desktop icons style can be unified, solve desktop icons style disunity in the past, lack the problem of aesthetic feeling, add the experience of user.
If the function described in the present embodiment using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computing equipment read/write memory medium.Based on such understanding, the part of the part that the embodiment of the present invention contributes to prior art or this technical scheme can embody with the form of software product, this software product is stored in a storage medium, comprising some instructions in order to make a computing equipment (can be personal computer, server, mobile computing device or the network equipment etc.) perform all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. various can be program code stored medium.In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiment, between each embodiment same or similar part mutually see.
To the above-mentioned explanation of the disclosed embodiments, professional and technical personnel in the field are realized or uses the present invention.To be apparent for those skilled in the art to the multiple amendment of these embodiments, General Principle as defined herein can without departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention can not be restricted to these embodiments shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (6)

1. an icon synthetic method, is characterized in that, comprises the following steps:
S1, acquisition icon original image;
The content of S2, extraction icon original image, obtains picture material each border mid point;
The vertical range of S3, computed image content each border mid point and image boundary;
Whether S4, comparison image content each border mid point is identical with the distance value on icon image border or in predeterminable range difference range, is if so, judged to be regular image, cuts it; If not, be then judged to be irregular image, merge with preset icon base;
S5, cut regular image, traversing graph logo image content boundaries pixel, finds out the extreme coordinates position on each border;
S6, judge that whether the extreme coordinates value of adjacent boundary is identical, if identical, then do not cut, merge with default masking-out image; If not identical, then calculate the arc radius of adjacent boundary connection according to the extreme coordinates value of adjacent boundary, and calculate the mid point of circular arc according to the radiuscope of circular arc;
S7, using the mid point of each circular arc as end points, carry out successively connecting draw finally cut icon original image cut scope, and icon original image to be cut;
S8, the icon image cut and default masking-out image to be merged.
2. icon synthetic method according to claim 1, it is characterized in that, the concrete operations of extracting the content of icon original image in described step S2 are: each pixel of traversal icon original image, judge whether each pixel transparent angle value exceedes preset value, if exceed preset value, then be judged to be non-icon image content, if be no more than preset value, be then judged to be icon image content.
3. icon synthetic method according to claim 1, it is characterized in that, the concrete operations obtaining picture material each border mid point in described step S2 are: the extreme coordinates value obtaining each border of icon image content, the intermediate point getting two-end-point coordinate is the mid point on each border.
4. icon synthetic method according to claim 1, is characterized in that, described method is further comprising the steps of:
Before step S4, judge whether the ultimate range in the vertical range of picture material each border mid point and image boundary is greater than preset ratio value relative to the ratio value of whole icon image, if so, then enters step S4, if not, then without the need to carrying out cutting and merging with default masking-out image.
5. icon synthetic method according to claim 1, it is characterized in that, traversing graph logo image content boundaries pixel in described step S4, the concrete operations finding out the extreme coordinates position on each border are: using picture material each border mid point as starting point, travel through left, to the right respectively, judge whether current pixel transparence value exceedes preset value one by one, if be no more than preset value, then judge valid pixel and record coordinate position, continuing to judge next pixel transparent angle value; If exceed preset value, be then judged to be inactive pixels, stop the traversal to next pixel transparent angle value, and record the endpoint location of coordinate position as border of the previous pixel of this pixel.
6. icon synthetic method according to claim 1, it is characterized in that, in described step S8 by the concrete operations that the icon image cut and default masking-out image carry out merging be: on identical canvas object, draw masking-out image object, in drawing process, the excessive pattern of appointment rendered object is: only draw the final icon image shown, to realize synthesis at icon image and the disjoint place of masking-out image.
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 true CN104408754A (en) 2015-03-11
CN104408754B 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)

Cited By (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
CN108595239A (en) * 2018-04-18 2018-09-28 腾讯科技(深圳)有限公司 image processing method, device, terminal and computer readable storage medium
CN108846875A (en) * 2018-04-26 2018-11-20 广州视源电子科技股份有限公司 Shape data treating method and apparatus
CN109885218A (en) * 2018-12-29 2019-06-14 深圳前海达闼云端智能科技有限公司 A kind of icon processing method, device and terminal
CN114862856A (en) * 2022-07-07 2022-08-05 成都数之联科技股份有限公司 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

Cited By (8)

* 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
CN108595239A (en) * 2018-04-18 2018-09-28 腾讯科技(深圳)有限公司 image processing method, device, terminal and computer readable storage medium
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
CN109885218A (en) * 2018-12-29 2019-06-14 深圳前海达闼云端智能科技有限公司 A kind of icon processing method, device and terminal
CN109885218B (en) * 2018-12-29 2022-02-25 深圳前海达闼云端智能科技有限公司 Icon processing method and device and terminal
CN114862856A (en) * 2022-07-07 2022-08-05 成都数之联科技股份有限公司 Panel defect area identification method and device, electronic equipment and medium

Also Published As

Publication number Publication date
CN104408754B (en) 2017-11-28

Similar Documents

Publication Publication Date Title
CN104408754A (en) Icon synthesis method
CN104318607A (en) Method for converting two-dimensional building image into three-dimensional structure
US7948488B2 (en) Shape preserving mappings to a surface
CN105069226A (en) Three-dimensional modeling method based on template
CN105354883A (en) 3ds Max fast and precise three-dimensional modeling method and system based on point cloud
Liu et al. Stereoscopizing cel animations
US9789650B2 (en) Conversion of stereolithographic model into logical subcomponents
CN105786784A (en) PowerPoint template replacing method and device
Dong et al. Summarization-based image resizing by intelligent object carving
WO2014159486A1 (en) Panorama packet
CN101449293A (en) Multi-track of video objects
US11074747B2 (en) Computer-aided techniques for designing detailed three-dimensional objects
Zhang et al. Imageadmixture: Putting together dissimilar objects from groups
JP2009151602A (en) Contour extraction device, contour extraction method and contour extraction program
CN115668271A (en) Method and device for generating plan
CN107180453B (en) The edit methods and device of character face's model
CN103605751A (en) Three-dimensional thermodynamic diagram processing method and device
CN114311682B (en) Model generation method, device, equipment and storage medium
Lee et al. Depth manipulation using disparity histogram analysis for stereoscopic 3d
Fang et al. 3D shape recovery of complex objects from multiple silhouette images
CN104574410A (en) Icon picture processing method
WO2015172504A1 (en) Method for constructing three-dimensional objects and computer aided design system
CN105472238A (en) Image processing method and electronic device
Yan et al. Consistent stereo image editing
CN116958515B (en) Fitting positioning method and device for workpiece contour and storage medium

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