CN105303616A - Embossment modeling method based on single photograph - Google Patents

Embossment modeling method based on single photograph Download PDF

Info

Publication number
CN105303616A
CN105303616A CN201510832618.9A CN201510832618A CN105303616A CN 105303616 A CN105303616 A CN 105303616A CN 201510832618 A CN201510832618 A CN 201510832618A CN 105303616 A CN105303616 A CN 105303616A
Authority
CN
China
Prior art keywords
gray
embossment
pixel
scale map
modeling method
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
CN201510832618.9A
Other languages
Chinese (zh)
Other versions
CN105303616B (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.)
QINGDAO UNIQUE PRODUCTS DEVELOP CO Ltd
Original Assignee
QINGDAO UNIQUE PRODUCTS DEVELOP 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 QINGDAO UNIQUE PRODUCTS DEVELOP CO Ltd filed Critical QINGDAO UNIQUE PRODUCTS DEVELOP CO Ltd
Priority to CN201510832618.9A priority Critical patent/CN105303616B/en
Publication of CN105303616A publication Critical patent/CN105303616A/en
Application granted granted Critical
Publication of CN105303616B publication Critical patent/CN105303616B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides an embossment modeling method based on a single photograph. The embossment modeling method comprises steps of: converting the single photograph into a grayscale map; determining the outline of the grayscale map; determining the heights of pixels on the surface layer of the embossment according to the gray value of the grayscale map, constructing the top surface of the embossment and the side surface of the embossment; adding a bottom surface according to a requirement for the thickness and the shape of the bottom surface according to a process and on the basis of the outline; reconstructing the triangular patch of each surface; and generating a model file in a STL format. The method acquires the corresponding grayscale map by preprocessing the single color photograph, constructs the embossment model according to the gray value of the grayscale map, generates the STL-format model file which can be directly used for 3D printing, solves a technical problem of low degree of dissemination in the conventional three-dimensional reconstruction technology based on three-dimensional scanning and multiple photographs with different angles, and gives a more lifelike three-dimensional model.

Description

Based on the embossment modeling method of single photo
Technical field
The invention belongs to Computer Applied Technology field, specifically, relate to a kind of embossment modeling method based on single photo.
Background technology
The three-dimension modeling printed for 3D at present mainly contain two kinds of approach: one is that data by obtaining three-dimensional scanning device carry out three-dimensional reconstruction, but scanning device price is high, and popularity is low; Two is carry out three-dimensional design by the Three-dimensional Design Software of specialty, and this kind of mode requires that operating personnel will have abundant professional knowledge, skillfully uses modeling software, and complicated operation, and the cycle is longer, and therefore popularity is also lower.
Universal and the photographing function of mobile phone of digital camera perfect, makes the acquisition of digitized image very easy, and based on this, the technology of carrying out three-dimensional reconstruction based on photo in recent years develops to some extent.Its method is by using the multiple photos of different angles to carry out three-dimensional reconstruction, but this technology needs the multiple photos being obtained multiple angle shot by professional means, but domestic consumer is difficult to obtain image by the means of specialty, and popularity is not high yet.
Summary of the invention
The invention provides a kind of embossment modeling method based on single photo, corresponding gray-scale map is obtained by carrying out pre-service to individual photochrome, build embossment model according to the gray-scale value of gray-scale map, solve traditional based on 3-D scanning or the low technical matters of the popularity carrying out existing in three-dimensional reconstruction based on the multiple photos of different angles.
For solving the problems of the technologies described above, the present invention is achieved by the following technical solutions:
Propose a kind of embossment modeling method based on single photo, comprising: individual photochrome is converted into gray-scale map; Determine the profile border of gray-scale map; According to the height of the gray-scale value determination embossment top layer pixel of gray-scale map, build embossment upper surface, and construct the side surface of embossment; Based on profile border, according to technique, bottom surface is added to the demand of bottom thickness, shape; Reconstruct the tri patch on each surface; Generate STL form model file.
Further, before the height of the gray-scale value determination embossment top layer pixel according to gray-scale map, described method also comprises: carry out filtering process to gray-scale map.
Further, individual photochrome is converted into gray-scale map, is specially: based on gray=(R*299+G*587+B*114)/1000, adopt weighted average method to obtain the gray-scale value of each pixel; Wherein, R, G, B are the color value of photochrome pixel.
Further, described filtering process is carried out to gray-scale map, be specially: for current pixel selected pixels template; Calculate the gray average of all pixels in template pixel; This gray average gives described current pixel; Wherein, described template pixel is multiple pixel compositions of described current pixel neighbour.
Further, the described profile border determining gray-scale map, is specially: set a square element, and the length of side of described square element is the centre distance of neighbor; Use the pixel of gray-scale map after the filtering of described square element traversal; In record ergodic process, the gray-scale value on its four summits when described square element often locates a time; Setting threshold value, to determine the state of four vertex correspondence of square element described in ergodic process; Based on the state of four vertex correspondence in ergodic process, determine the profile border of gray-scale map after filtering.
Further, the tri patch on described each surface of reconstruct, for completing model surface triangle gridding based on region growing algorithm, specifically comprises: the highest Z coordinate in query point cloud; There are selection two abutment points structure seed triangle near the highest Z coordinate points; Obtain the normal vector of described seed triangle, as whole relief surface triangle, the reference vector of dough sheet normal direction; Three limits of described seed triangle are utilized to set up just initial line queue; From the queue of limit, go out team limit, search abutment points also builds new triangle; The limit increased by new triangle adds limit queue as newly-built active edges, and circulation is until active edges is empty.
Compared with prior art, advantage of the present invention and good effect are:
The present invention propose based in the embossment modeling method of single photo, first individual photochrome is changed into gray-scale map, carry out filtering process to gray-scale map, level and smooth noise, reduces the impact of noise on image; Adopt square element to travel through all pixels in gray-scale map, determine the boundary contour of image, according to the height of gray-scale value determination embossment upper surface pixel; Adopt region growing algorithm implementation model surface triangle gridding, generation can be directly used in the stl file that 3D prints, algorithm realization is easy and effective, and only need single photo to realize, multiple photos without the need to adopting professional method to obtain multi-angle carries out three-dimensional reconstruction, be applicable to popularizing, solve traditional based on 3-D scanning or the low technical matters of the popularity carrying out existing in three-dimensional reconstruction based on the multiple photos of different angles.
After reading the detailed description of embodiment of the present invention by reference to the accompanying drawings, the other features and advantages of the invention will become clearly.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the embossment modeling method based on single photo that the embodiment of the present invention proposes;
Fig. 2 is the schematic diagram of the square element that the embodiment of the present invention proposes;
Fig. 3 is that schematic diagram is set up on the profile border that the embodiment of the present invention proposes.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in more detail.
As shown in Figure 1, the embossment modeling method based on single photo that the present invention proposes, comprises the steps:
Step S11: individual photochrome is converted into gray-scale map.
Weighted mean value-based algorithm is adopted to obtain the gray-scale value of each pixel in individual photochrome, specifically based on gray=(R*299+G*587+B*114)/1000 to obtain, wherein, R, G, B are the color value of photochrome pixel.
Step S12: filtering process is carried out to gray-scale map.This is preferred steps.
Concrete, in single photo, for pending current pixel point (x, y), select a template pixel, this template pixel is made up of some pixels of current pixel neighbour; Then calculate the gray average of all pixels in template pixel, then give current pixel point (x, y) this gray average, as image gray-scale value g(x, y at that point after process), i.e. g(x, y)=1/m ∑ f(x, y), m is the total number of pixel comprising current pixel in this template.
Step S13: the profile border determining gray-scale map.
Concrete, as shown in Figure 2, set a square element, the length of side of this square element is the centre distance of neighbor, and four summits are labeled as a, b, c, d respectively.Then the summit a setting square element is basic point.Wherein, the centre distance of pixel is the middle spacing of two neighbors, and determined by the resolution of photo, resolution height then centre distance is little, and the low then centre distance of resolution is large; Picture resolution is determined, then the centre distance of pixel is determined.
Square element is used to travel through the pixel of gray-scale map after filtering.Wherein, four of square element basic points are corresponding in turn to according to the order of sequence the pixel of gray-scale map.Then record in ergodic process, the gray-scale value on its four summits when square element often locates a time.Set a threshold value, in order to determine the state of square element four vertex correspondence in ergodic process, concrete, when the gray-scale value of the pixel of vertex correspondence is greater than threshold value, identifies the state on this summit for " 1 ", otherwise be designated " 0 ".Visible, for a square element, its corresponding 16 kinds of states, as shown in following table one:
Table one
State value (16 system) a b c d
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
A 1 0 1 0
B 1 0 1 1
C 1 1 0 0
D 1 1 0 1
E 1 1 1 0
F 1 1 1 1
Finally, based on the state of four vertex correspondence in ergodic process, determine the profile border of gray-scale map after filtering.As shown in Figure 3, be the schematic diagram of the gray-scale map that single photo changes into, be wherein with dash area for affect entity, remainder is the blank space that gray-scale value is less than threshold value.
The state of S1 corresponds to 0000, and square element is in solid exterior;
The state of S2 corresponds to 0001, and square element is in entity edge, and summit d is on outer contour;
The state of S3 corresponds to 1111, and square element is in entity inside;
The state of S4 corresponds to 0100, and square element is in entity edge, and summit b is on outer contour;
The state of S5 corresponds to 1000, and square element is in entity edge, and summit a is on outer contour.
Visible, according to the status indicator on four summits during each square element location, can judge that current square element is in one of three kinds of situations below: 1, be positioned at entity inside; 2, solid exterior is positioned at; 3, be positioned on outer contour.Thus the pixel can found out on all outer contours, and then the boundary contour of bottom surface can be determined.
Step S14: according to the height of the gray-scale value determination embossment top layer pixel of gray-scale map, builds embossment upper surface, and constructs the side surface of embossment.
In this step, the gray-scale value of pixel each in gray-scale map is pressed the height of direct proportion as embossment upper epidermis pixel, build the upper surface of embossment, construct the side surface of embossment simultaneously.Side surface is the curved surface that with XY plane orthogonal line form of silhouette edge boundary line along Z-direction to end face.
Step S15: based on profile border, adds bottom surface according to technique to the demand of bottom thickness, shape.
On the basis, gray-scale map profile border that step S13 determines, according to technique, bottom surface is added to the demand of bottom thickness, shape.
Step S16: the tri patch reconstructing each surface.
Be specially based on region growing algorithm, adopt interpolation subdividing to complete the triangle gridding of model surface, comprising: in the some cloud forming each surface, inquire about the highest Z coordinate, and select two abutment points to build seed triangle in its vicinity; Obtain the normal vector of seed triangle, as the reference vector of whole relief surface tri patch normal direction; Three limits of seed triangle are utilized to set up just initial line queue; From the queue of limit, go out team limit, search for its abutment points and build new triangle; The limit increased by new triangle adds limit queue as newly-built active edges, cyclic search and set up new triangle, until active edges be empty end.
Step S17: generate STL(Standardtemplatelibrary, STL) form model file.
Generation can be directly used in the stl file that 3D prints, and meets the requirement of 3D printing to three-dimensional model.
The invention described above propose based in the embossment modeling method of single photo, individual photochrome is changed into gray-scale map, carries out filtering process to gray-scale map, level and smooth noise, reduces the impact of noise on image; Adopt square element to travel through all pixels in gray-scale map, determine the boundary contour of image; According to the height of gray-scale value determination embossment upper surface pixel; Adopt region growing algorithm implementation model surface triangle gridding, generation can be directly used in the stl file that 3D prints, algorithm realization is easy and effective, and only need single photo to realize, multiple photos without the need to adopting professional method to obtain multi-angle carries out three-dimensional reconstruction, be applicable to popularizing, solve traditional based on 3-D scanning or the low technical matters of the popularity carrying out existing in three-dimensional reconstruction based on the multiple photos of different angles.
It should be noted that; above-mentioned explanation is not limitation of the present invention; the present invention is also not limited in above-mentioned citing, the change that those skilled in the art make in essential scope of the present invention, remodeling, interpolation or replacement, also should belong to protection scope of the present invention.

Claims (6)

1., based on the embossment modeling method of single photo, it is characterized in that, comprising:
Individual photochrome is converted into gray-scale map;
Determine the profile border of gray-scale map;
According to the height of the gray-scale value determination embossment top layer pixel of gray-scale map, build embossment upper surface, and construct the side surface of embossment;
Based on profile border, according to technique, bottom surface is added to the demand of bottom thickness, shape;
Reconstruct the tri patch on each surface;
Generate STL form model file.
2. the embossment modeling method based on single photo according to claim 1, is characterized in that, before the height of the gray-scale value determination embossment top layer pixel according to gray-scale map, described method also comprises:
Filtering process is carried out to gray-scale map.
3. the embossment modeling method based on single photo according to claim 1, is characterized in that, individual photochrome is converted into gray-scale map, is specially:
Based on gray=(R*299+G*587+B*114)/1000, adopt weighted average method to obtain the gray-scale value of each pixel;
Wherein, R, G, B are the color value of photochrome pixel.
4. the embossment modeling method based on single photo according to claim 2, is characterized in that, describedly carries out filtering process to gray-scale map, is specially:
For current pixel selected pixels template;
Calculate the gray average of all pixels in template pixel;
This gray average gives described current pixel;
Wherein, described template pixel is multiple pixel compositions of described current pixel neighbour.
5. the embossment modeling method based on single photo according to claim 1, is characterized in that, the described profile border determining gray-scale map, is specially:
Set a square element, the described square length of side is the centre distance of neighbor;
Use the pixel of gray-scale map after the filtering of described square element traversal;
In record ergodic process, the gray-scale value on its four summits when described square element often locates a time; Setting threshold value, to determine the state of four vertex correspondence of square element described in ergodic process;
Based on the state of four vertex correspondence in ergodic process, determine the profile border of gray-scale map after filtering.
6. the embossment modeling method based on single photo according to claim 1, is characterized in that, the tri patch on described each surface of reconstruct, specifically comprises:
The highest Z coordinate in query point cloud;
There are selection two abutment points structure seed triangle near the highest Z coordinate points;
Obtain the normal vector of described seed triangle, as the reference vector of whole relief surface tri patch normal direction;
Three of described seed triangle are utilized to set up while queue;
From the queue of limit, go out team limit, search abutment points also builds new triangle;
The limit increased by new triangle adds limit queue as newly-built active edges, and circulation is until active edges is empty.
CN201510832618.9A 2015-11-26 2015-11-26 Embossment modeling method based on single photo Active CN105303616B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510832618.9A CN105303616B (en) 2015-11-26 2015-11-26 Embossment modeling method based on single photo

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510832618.9A CN105303616B (en) 2015-11-26 2015-11-26 Embossment modeling method based on single photo

Publications (2)

Publication Number Publication Date
CN105303616A true CN105303616A (en) 2016-02-03
CN105303616B CN105303616B (en) 2019-03-15

Family

ID=55200833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510832618.9A Active CN105303616B (en) 2015-11-26 2015-11-26 Embossment modeling method based on single photo

Country Status (1)

Country Link
CN (1) CN105303616B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105747859A (en) * 2016-04-29 2016-07-13 珠海市瑞明科技有限公司 Three-dimensional coffee art making machine and coffer art making method
CN105976362A (en) * 2016-04-28 2016-09-28 厦门大学 Image line drawing generation method suitable for 3D printing
CN106504322A (en) * 2016-07-11 2017-03-15 合肥工业大学 A kind of embossment extracting method based on Height Estimation
CN107856466A (en) * 2017-11-10 2018-03-30 扬州市维拉园艺有限公司 A kind of design method, mould and the flowerpot of Bark mark Mould for flower pot
CN109949402A (en) * 2017-12-20 2019-06-28 艾迪普(北京)文化科技股份有限公司 Threedimensional model generation method based on image recognition
CN110751665A (en) * 2019-10-23 2020-02-04 齐鲁工业大学 Method and system for reconstructing 3D portrait model by portrait embossment
CN110853146A (en) * 2019-11-18 2020-02-28 广东三维家信息科技有限公司 Relief modeling method and system and relief processing equipment
CN111047701A (en) * 2019-12-25 2020-04-21 孟存轩 Method for engraving large-range three-dimensional terrain
CN111090905A (en) * 2019-12-23 2020-05-01 陕西理工大学 Mathematical modeling method using computer multidimensional space
CN111400788A (en) * 2020-03-16 2020-07-10 大连理工大学 Interactive 3D (three-dimensional) embossing method suitable for 3D printing
CN113379890A (en) * 2021-04-22 2021-09-10 浙江大学 Character bas-relief model generation method based on single photo

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101596827A (en) * 2009-06-10 2009-12-09 中国工程物理研究院机械制造工艺研究所 A kind of laser fast method for preparing of light-showing three-dimensional embossment
CN102999515A (en) * 2011-09-15 2013-03-27 北京进取者软件技术有限公司 Method for obtaining embossment model modeling surface patch
CN103201772A (en) * 2010-09-03 2013-07-10 马克·卡德尔 Physical three-dimensional model generation apparatus
CN104899359A (en) * 2015-05-14 2015-09-09 青岛尤尼科技有限公司 Section layering method based on STL model

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101596827A (en) * 2009-06-10 2009-12-09 中国工程物理研究院机械制造工艺研究所 A kind of laser fast method for preparing of light-showing three-dimensional embossment
CN103201772A (en) * 2010-09-03 2013-07-10 马克·卡德尔 Physical three-dimensional model generation apparatus
CN102999515A (en) * 2011-09-15 2013-03-27 北京进取者软件技术有限公司 Method for obtaining embossment model modeling surface patch
CN104899359A (en) * 2015-05-14 2015-09-09 青岛尤尼科技有限公司 Section layering method based on STL model

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
张海艳 等: "基于图像的浮雕曲面建模研究", 《青岛大学学报(自然科学版)》 *
张海艳: "浮雕曲面建模的技术研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
张爱华 等: "一种基于边缘检测的局部阈值分割算法", 《小型微型计算机系统》 *
王寅晨: "基于UG的数控浮雕加工关键技术研究", 《中国优秀硕士学位论文全文数据库 工程科技I辑》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105976362A (en) * 2016-04-28 2016-09-28 厦门大学 Image line drawing generation method suitable for 3D printing
CN105976362B (en) * 2016-04-28 2018-09-18 厦门大学 A kind of image line drawing generation method suitable for 3D printing
CN105747859A (en) * 2016-04-29 2016-07-13 珠海市瑞明科技有限公司 Three-dimensional coffee art making machine and coffer art making method
CN106504322A (en) * 2016-07-11 2017-03-15 合肥工业大学 A kind of embossment extracting method based on Height Estimation
CN107856466A (en) * 2017-11-10 2018-03-30 扬州市维拉园艺有限公司 A kind of design method, mould and the flowerpot of Bark mark Mould for flower pot
CN109949402A (en) * 2017-12-20 2019-06-28 艾迪普(北京)文化科技股份有限公司 Threedimensional model generation method based on image recognition
CN110751665A (en) * 2019-10-23 2020-02-04 齐鲁工业大学 Method and system for reconstructing 3D portrait model by portrait embossment
CN110853146A (en) * 2019-11-18 2020-02-28 广东三维家信息科技有限公司 Relief modeling method and system and relief processing equipment
CN111090905A (en) * 2019-12-23 2020-05-01 陕西理工大学 Mathematical modeling method using computer multidimensional space
CN111047701A (en) * 2019-12-25 2020-04-21 孟存轩 Method for engraving large-range three-dimensional terrain
CN111400788A (en) * 2020-03-16 2020-07-10 大连理工大学 Interactive 3D (three-dimensional) embossing method suitable for 3D printing
CN111400788B (en) * 2020-03-16 2022-09-16 大连理工大学 Interactive 3D (three-dimensional) embossing method suitable for 3D printing
CN113379890A (en) * 2021-04-22 2021-09-10 浙江大学 Character bas-relief model generation method based on single photo
CN113379890B (en) * 2021-04-22 2022-04-19 浙江大学 Character bas-relief model generation method based on single photo

Also Published As

Publication number Publication date
CN105303616B (en) 2019-03-15

Similar Documents

Publication Publication Date Title
CN105303616A (en) Embossment modeling method based on single photograph
CN109003325B (en) Three-dimensional reconstruction method, medium, device and computing equipment
CN106709947A (en) RGBD camera-based three-dimensional human body rapid modeling system
CN100557640C (en) A kind of interactive multi-vision point three-dimensional model reconstruction method
US20180218535A1 (en) Generating a three-dimensional model from a scanned object
CN104574432B (en) Three-dimensional face reconstruction method and three-dimensional face reconstruction system for automatic multi-view-angle face auto-shooting image
CN105279789B (en) A kind of three-dimensional rebuilding method based on image sequence
CN101303772A (en) Method for modeling non-linear three-dimensional human face based on single sheet image
CN101339669A (en) Three-dimensional human face modelling approach based on front side image
CN108335352A (en) A kind of texture mapping method towards the extensive three-dimensional reconstruction scene of multiple view
JP2015108621A5 (en) Non-primary computer-readable medium storing method, image processing apparatus, and program for extracting plane from three-dimensional point cloud
CN110728671B (en) Dense reconstruction method of texture-free scene based on vision
CN103761397A (en) Three-dimensional model slice for surface exposure additive forming and projection plane generating method
CN104240289A (en) Three-dimensional digitalization reconstruction method and system based on single camera
CN106875437A (en) A kind of extraction method of key frame towards RGBD three-dimensional reconstructions
CN109147025B (en) RGBD three-dimensional reconstruction-oriented texture generation method
CN106097433A (en) Object industry and the stacking method of Image model and system
CN103761765A (en) Three-dimensional object model texture mapping algorithm based on mapping boundary optimization
CN104715504A (en) Robust large-scene dense three-dimensional reconstruction method
CN104166992B (en) Perception of content binocular image Zoom method based on distortion of the mesh
CN108510529A (en) A kind of figure based on adaptive weight cuts solid matching method
CN101246595A (en) Multi-view point data splitting method of optical three-dimensional scanning system
CN106500626A (en) A kind of mobile phone stereoscopic imaging method and three-dimensional imaging mobile phone
CN103761766A (en) Three-dimensional object model texture mapping algorithm based on tone mapping and image smoothing
CN104048649A (en) Rapid registering method of multiple images and three-dimensional model

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant