Vous êtes sur la page 1sur 15

3D Shape Search

Shiben Bhattacharjee
P.Dilip
S.Manikandan

Introduction:
Determining the similarity between 3D shapes is a fundamental task in
shape-based recognition, retrieval, clustering, and classification. Its main
applications have traditionally been in computer vision, mechanical
engineering, and molecular biology. Since most 3D file formats (VRML, 3D
Studio, etc.) have been designed for visualization, they contain only
geometric and appearance attributes, and usually lack semantic information
that would facilitate automatic matching. 3D models are most probably
acquired with the help of scanning devices or geometric manipulation tools
and thus they will have only geometric and appearance information and will
be completely devoid of semantic and structural information. Hence an
algorithm useful for recognition of 3D shapes will be very useful. The first
step would be to develop methods that can give us a measure of the
similarity/dissimilarity between any two shapes. This is what we have tried
to achieve in our project.
The challenging aspect of this problem is that it should be done quickly
while still being able to discriminate between similar and dissimilar shapes.
The key idea is to represent the signature of an object as a shape distribution
sampled from a shape function measuring global geometric properties of an
object. The primary motivation for this approach is to reduce the shape
matching problem to the comparison of probability distributions, which is
simpler than traditional shape matching methods that require pose
registration, feature correspondence, or model fitting.

Prior Methods:
Prior matching methods can be broadly classified based on their
representation of the shape as:

2D Contours
3D Surfaces
3D Volumes
Structural models

Statistics
Shape matching has been well-studied for 3D objects. For instance,
representations for registering and matching 3D surfaces include Extended
Gaussian Images, Spherical Attribute Images, Harmonic Shape Images, and
Spin Images. Unfortunately, these previous methods usually assume that a
topologically valid surface mesh or an explicit volume is available for every
object. In addition, volumetric dissimilarity measures based on wavelets or
Earth Movers Distance usually rely upon a priori registration of objects
coordinate systems, which is difficult to achieve automatically and robustly.
Geometric hashing is a potential solution, but it requires a large amount of
storage for complex models. Model based approaches first decompose a 3D
object into a set of features and then compute a dissimilarity measure
between objects based on the differences between their features and their
spatial relationships. Examples representations of this type include
generalized cylinders, superquadrics, geons, deformable regions, shock
graphs, medial axes and skeletons. These methods work best when 3D
models can be segmented into a canonical set of features naturally and
correspondences can be found between features robustly. Unfortunately,
these tasks are difficult and not always well-defined for arbitrary 3D
polygonal models. Moreover, feature detection and segmentation algorithms
tend to be sensitive to small perturbations to the model, placing undue
burden on subsequent feature correspondence and dissimilarity computation
steps. Also the combinatorial complexity of finding correspondences in large
discrete models usually leads to long computation times and/or large storage
requirements. Shapes have also been compared based on their statistical
properties. The simplest approach would be to compute the distances
between feature vectors of features that represent global geometric
properties such as circularity, eccentricity, algebraic moments, etc. Other
methods have compared discrete histograms of geometric statistics.

Overview of Approach:
The key idea is to represent the signature for a 3D model as a probability
distribution sampled from a shape function measuring geometric properties
of the 3D model. This is called a shape distribution. Once the shape
distributions has been computed for two 3D models then the
similarity/dissimilarity between them can be calculated using any metric that
measures distance between distributions. We transform any arbitrary 3D
model into a parameterized function that can be compared with others easily.

The main advantage of this method is that the problem of shape comparison
is reduced to a problem of sampling, normalization and comparison of shape
distributions which are relatively easy compared to the prior methods which
require reconstructing a solid object or manifold surface from degenerate 3D
data, registering pose transformations, finding feature correspondences, or
fitting high-level models. This method is invariant to arbitrary rotations,
translations and mirroring. Invariance to scaling can be achieved by
normalizing the shape distributions before comparison. The method is also
robust since random sampling ensures that shape distributions are insensitive
to small perturbations like noise, blur, cracks, dust, etc in the input models.
Another advantage of the above method is its efficiency. Construction and
comparison of shape distributions is very fast and efficient. Also this method
works regardless of they way in which the 3D model is represented. The
three main steps to be implemented are:
To select a discriminating shape function.
To construct shape functions for the given 3D models efficiently.
To compute a similarity/dissimilarity measure for a pair of
distributions.
Below we have provided a block diagram of our approach.

Detailed Approach:
Selecting a shape function:
The most important issue is to select a shape function whose distribution
provides a good signature for the shape of a 3D polygonal model. An ideal
distribution would be invariant to tessellations and other transformations and
insensitive to noise, cracks, tessellation and insertion/removal of small
polygons. The shape function could also be domain specific, based on
visibility and surface attributes.

Model 1
Generate shape functions
using measures such as
D2,D3 or A3

Model 2
Generate shape functions
Using measures such as
D2,D3 or A3

Shape function 1

Sample shape function


to get shape distribution

Shape function 2

Sample shape function


to get shape distribution

Shape
distribution 1

Shape
distribution 2

Compute dissimilarity between the two shape distributions using measures


such as 2, Bhattacharyya or LN Minkowski

Dissimilarity measure

The most common shape functions are:


A3: Measures the angle between three random points on the surface
of a 3D model.
D1: Measures the distance between a fixed point and one random
point on the surface. The centroid of the boundary of the model is
generally used as the fixed point.
D2: Measures the distance between two random points on the surface.
D3: Measures the square root of the area of the triangle between three
random points on the surface.
D4: Measures the cube root of the volume of the tetrahedron between
four random points on the surface.
The figure below shows a diagrammatic representation of the shape
functions A3, D1, D2, D3 and D4 respectively.

We have implemented the A3, D2 and D3 shape functions. They were


chosen because of the ease of implementation and their invariance
properties. They are quick to compute, easy to understand and produce shape
distributions invariant to rigid motions (translations and rotations). They are
invariant to tessellation of the 3D polygonal model, since points are selected
randomly from the surface. They are insensitive to small perturbations due
to noise, cracks, and insertion/removal of polygons, since sampling is area
weighted. In addition, the A3 shape function is invariant to scale, while the
others have to be normalized to enable comparisons. Finally, the D2 and D3
shape functions provide a nice comparison of 1D and 2D geometric
measurements. The figure below shows the D2 shape distribution for some
models. In each plot, the horizontal axis represents distance, and the vertical
axis represents the probability of that distance between two points on the
surface.

Constructing shape distributions:


Once a shape function has been chosen the next issue is the construction and
storage of a representation of its distribution. For this we evaluate N samples
from the shape distribution and construct a histogram by counting how many
samples fall into each of B fixed size bins. From the histogram we
reconstruct a piecewise linear function with V (<=B) equally spaced
vertices. This sequence of V numbers is the representation for the shape
distribution.
The main issue here is the sampling density. More samples mean more
accurate and precise reconstruction of the shape distribution. However the
time to sample a shape distribution is linearly proportional to the number of
samples. Hence there is an accuracy/time tradeoff in the choice of N.
Similarly more vertices yield higher resolution distributions while increasing
the storage and comparison costs of the shape signature. In our
implementation we have used N=1024*1024 samples, B=1024 bins and
V=64 vertices.
A second issue is sample generation. Although it would be simplest to
sample vertices of the 3D model directly, the resulting shape distributions
would be biased and sensitive to changes in tessellation. Instead, our shape
functions are sampled from random points on the surface of a 3D model.
The method used for generating unbiased random points with respect to the
surface area of a polygonal model proceeds as follows. First, iterate through
all polygons, splitting them into triangles as necessary. Then, for each

triangle, compute its area and store it in an array along with the cumulative
area of triangles visited so far. Next, select a triangle with probability
proportional to its area by generating a random number between 0 and the
total cumulative area and performing a binary search on the array of
cumulative areas. For each selected triangle with vertices (A; B; C),
construct a point on its surface by generating two random numbers, r1 and
r2, between 0 and 1, and evaluating the following equation:
P = (1 - r1)A + r1(1 - r2)B + r1r2C

Comparing shape distributions:


The next task is the comparison of two shape distributions to produce a
similarity/dissimilarity measure. There are many simple dissimilarity
measures. Some of them are:
2 :
D(f,g) = (f-g)2/(f+g)
Bhattacharyya :
D(f,g) = 1 - fg
LN Minkowski norm of the pdf :
D(f,g) = (|f g|N)1/N
LN Minkowski norm of the cdf :
D(f,g) = (|f* g*|N)1/N
x
Where f* = f
-
Since each shape distribution is represented as a piecewise linear function,
analytic computation of these norms can be done efficiently in time
proportional to the number of vertices used to store the distributions. For
certain shape functions, a normalization step has to be added to the
comparison process to account for differences in scale. The three most
common methods for normalization are:

1) align the maximum sample values


2) align the mean sample values
3) search for the scale that produces the minimal dissimilarity measure
during each comparison.

Implementation Details:
We have assumed that the inputs are in .3ds file format in which the model
is described in terms of the triangles which make it up.
We have implemented the following shape functions:
D2
D3
A3
We have implemented the following dissimlarity measures:
2
Bhattacharyya
LN Minkowski norm of the pdf (with N=2)
For our implementation we used N=1024*1024 samples, B=1024 bins and
V=64 vertices.
We used three dissimilarity measures:
2
Bhattacharyya
LN Minkowski norm of the pdf (with N=2)

Experimentation and Results:


We have used the following twenty models for our experiments:
Bed

Casio

Chair

Column

Guitar

Hand Set

Helicopter

Lamp

Monitor

Car

All these models were downloaded from www.help3d.com

Dissimilarity matrix using D2 shape function:


Bed

Car

Casio

Chair

Column

Hand Set

Guitar

Helicopter

Lamp

Monitor

B 0.0522843
e 0.0133494
d 0.0454714

0.114814
0.294435
0.0999145

0.319191
0.0893539
0.128534

0.739689
0.188293
0.13786

0.3022
0.0897885
0.106445

0.0515548
0.0131408
0.0431497

0.293866
0.0789532
0.115848

0.329812
0.0894503
0.116206

0.434307
0.118603
0.28882

0.0847076
0.0217109
0.0523883

C 0.419527
a 0.116082
r 0.133715

0.208554
0.0556251
0.0985718

0.47835
0.332312
0.189802

0.345875
0.0953444
0.151279

0.33234
0.0942872
0.141081

0.329182
0.0997939
0.120671

0.431785
0.119739
0.109059

0.361702
0.149167
0.191049

0.498323
0.143756
0.143511

0.568582
0.159989
0.152268

C
a 0.147048
s 0.0395929
i 0.0695793
o

0.149304
0.0414834
0.0684619

0.134528
0.007258
0.00608630 0.0371709
0.0601861
.0256732

0.162574
0.0449513
0.0732475

0.133964
0.0382132
0.0645826

0.168176
0.0455808
0.0833615

0.232192
0.0702756
0.0845656

0.192067
0.0517847
0.0788495

0.242197
0.0663028
0.0882167

C
h 0.253972
a 0.0725295
i 0.090112
r

0.0822553
0.0216659
0.055987

0.32746
0.0948865
0.136082

0.0602086
0.0282891
0.040196

0.358007
0.114853
0.104121

0.0918136
0.0280221
0.0598845

0.434149
0.120159
0.13538

0.24327
0.0639522
0.111686

0.150089
0.0442604
0.0561107

0.316772
0.0915136
0.100092

C
o
0.212171
l
0.0579961
u
0.086671
m
n

0.326644
0.089046
0.108324

0.315641
0.0902578
0.118361

0.27633
0.0775159
0.0968909

0.0965449
0.0214857
0.030675

0.284597
0.0782868
0.10004

0.166407
0.0444839
0.073497

0.310268
0.0912713
0.0944473

0.345384
0.0987133
0.112072

0.328893
0.0947606
0.10915

H
a
n 0.0436772
d 0.0257867
S 0.0740785
e
t

0.282829
0.0729386
0.0324877

0.231812
0.0646573
0.115926

0.0605264
0.157676
0.0879923

0.252872
0.0708915
0.0916996

0.039174
0.0104488
0.0328211

0.300506
0.08094
0.119391

0.225231
0.0607063
0.0985716

0.105826
0.0275538
0.0892811

0.21369
0.0563512
0.0886789

G
u
0.200952
i
0.0523276
t
0.0923786
a
r

0.217088
0.0570994
0.0963588

0.170117
0.0465266
0.0986187

0.195456
0.0511755
0.0895305

0.188256
0.0552828
0.0836358

0.231626
0.0611373
0.0983544

0.0394368 0.135834
0.00995864 0.0382768
0.0444481 0.0577408

0.326717
0.0888849
0.112043

0.332712
0.0903135
0.114918

H
e
l
i
0.277976
c
0.0757696
o
0.102148
p
t
e
r

0.0890044
0.0231368
0.0637402

0.168256
0.0504726
0.106869

0.162573
0.0423595
0.0777038

0.205636
0.0582612
0.0852807

0.153662
0.0402216
0.0764009

0.187266
0.0490504
0.0849933

0.0366661 0.298201
0.00944749 0.0808161
0.0372489 0.102827

0.420683
0.116592
0.124092

L
0.120502
a
0.0347483
m
0.0522851
p

0.392532
0.111281
0.111408

0.593152
0.18322
0.153362

0.195299
0.0566454
0.0687402

0.503123
0.171864
0.125172

0.229469
0.0652571
0.0823831

0.466972
0.135994
0.133555

0.660728
0.206658
0.149917

0.088332
0.0173754
0.0246162

0.1007
0.0320254
0.0470266

M
o
n 0.499516
i 0.17229
t 0.128299
o
r

0.108521
0.0301961
0.0557825

0.376139
0.113305
0.139402

0.217875
0.0704279
0.0735501

0.411129
0.124358
0.111261

0.508909
0.169404
0.128134

0.552901
0.163419
0.148006

0.292369
0.0780659
0.119659

0.155519
0.0519018
0.052943

0.0645298
0.0227079
0.0147232

Dissimilarity matrix using A3 shape function:


Bed

Car

Casio

Chair

Column

Hand Set

Guitar

Helicopter

Lamp

Monitor

B 0.00421644 0.14505
0.125011
e 0.00381456 0.05093920 0.0393602
d 0.0135032 0.0983142 0.0781532

0.044184
0.0138686
0.0422063

0.114495
0.0316516
0.0814197

0.0248248
0.011401
0.0310763

0.11463
0.0317186
0.0713441

0.0347073
0.0110107
0.0375937

0.059239
0.0185673
0.0434032

0.0754425
0.0225615
0.0529078

C 0.0101219 0.00765467 0.170982


a 0.00343161 0.00148054 0.0498428
r 0.0224428 0.0108831 0.0949803

0.0272805
0.0074783
0.0306139

0.166476
0.0442097
0.0986837

0.0139099
0.0067783
0.0222298

0.156052
0.0413385
0.0879157

0.028849
0.0401417
0.00779045 0.0112206
0.0363666 0.0309834

0.0623095
0.0167953
0.0457645

C
0.0955048
a
0.035414
si
0.0939397
o

0.116423
0.039981
0.103827

0.0850844
0.0340585
0.0843634

0.0931568
0.033176
0.0787549

0.115765
0.0419848
0.102549

0.224919
0.074361
0.123626

0.032551
0.0198752
0.00825472 0.0052228
0.0355719 0.0208734

0.0910089
0.043675
0.0490551

0.0638363
0.0301901
0.0272665

0.175377
0.0591867
0.114298

C
0.0142615 0.206531
h
0.00404615 0.0677262
a
0.0211118 0.119322
ir

0.207326
0.0602538
0.102107

0.0112393 0.175851
0.00287439 0.0460025
0.0198576 0.0969335

0.0266154
0.0097598
0.0319454

0.17599
0.0464942
0.0894268

C
o
0.170562
l
0.0447676
u
0.0916795
m
n

0.151657
0.0502814
0.112895

0.047175
0.0166965
0.0605939

0.318812
0.0859347
0.123911

0.0291969
0.0074451
0.0302281

0.17623
0.0487134
0.0975809

0.0389598 0.127296
0.00987981 0.0327285
0.0476944 0.0789242

H
a
n 0.013613
0.191794
d 0.00428601 0.0634294
S 0.0226769 0.115694
e
t

0.181753
0.0535715
0.096742

0.0195414 0.157582
0.00546632 0.0417303
0.0278876 0.0944764

0.019639
0.0022811
0.0269308

0.15834
0.0420489
0.0865032

0.0507674
0.0176642
0.0534917

0.42825
0.122434
0.149948

0.223792
0.0631061
0.114053

0.0348139 0.208574
0.00889461 0.056564
0.0472251 0.112671

G
u 0.230938
i 0.0617991
t 0.112425
a
r

0.0976072
0.0358734
0.0915725

0.12182
0.0316435
0.0805519

0.192428
0.0647543
0.116499

0.350787
0.0976841
0.125701

0.0406968
0.0104195
0.0369811

0.395886
0.109496
0.137036

0.027248
0.0287238 0.0498595
0.00734982 0.00795875 0.013224
0.0326801 0.0273789 0.0426767

0.449195
0.132733
0.150144

0.498997
0.146007
0.160049

H
e
l
i
c 0.0411331
o 0.0108325
p 0.0407805
t
e
r
L 0.040641
a 0.0109277
m 0.0378313
p
M
o
n 0.0751856
i 0.0205467
t 0.048842
o
r

0.111638
0.0416252
0.105959

0.0860787
0.0272823
0.0723593

0.121055
0.0312614
0.0688789

0.0791926
0.0202234
0.0641514

0.0331636
0.011328
0.0418439

0.052805
0.0136017
0.0560766

0.00856322 0.140538
0.00215824 0.0378528
0.0694883
0.017457

0.286167
0.0925995
0.135436

0.289402
0.0846529
0.120719

0.0208332
0.0055996
0.0845546

0.233085
0.0619826
0.111442

0.0755015
0.0223731
0.0541963

0.262274
0.0708704
0.109038

0.0789199
0.0200798
0.0562777

0.0128054 0.0860541
0.00333187 0.0227068
0.0163738 0.0661458

0.342664
0.106013
0.136499

0.338834
0.0986268
0.124487

0.0229878 0.275089
0.00643117 0.0755031
0.0274046 0.117653

0.122618
0.0351974
0.0661826

0.324674
0.0898914
0.117111

0.136426
0.0361854
0.0700221

0.0237703 0.010221
0.00653334 0.00321905
0.0293461 0.0185209

0.187764
0.0494744
0.0856219

Dissimilarity matrix using D3 shape function:


Bed

Car

Casio

Chair

Column

Hand Set

Guitar

Helicopter

Lamp

Monitor

0.0417333
0.0107992
0.0327831

0.170054
0.0531746
0.0615466

0.124462
0.0373643
0.0501542

0.0133044
0.0035988
0.018848

0.248694
0.0705537
0.0865092

0.481247
0.152451
0.127637

0.0694547
0.0191247
0.0440143

0.175601
0.0567066
0.0634833

C 0.0443891
a 0.0112317
r 0.0427367

0.0293758 0.0770582
0.00810733 0.0206918
0.0135278 0.0540544

0.0999884
0.0265844
0.0534111

0.0774801
0.0200781
0.0488325

0.0484934
0.0135166
0.0347547

0.241605
0.063568
0.100368

0.466392
0.132629
0.138444

0.107838
0.0294916
0.0478917

0.0265192
0.00713505
0.0197639

C
a 0.243787
s 0.0700586
i 0.108643
o

0.0377096 0.0147549
0.00970812 0.0040314
0.0384095 0.021809

0.323228
0.100256
0.124915

0.287808
0.0906141
0.117904

0.256429
0.0702284
0.101876

0.220266
0.0679777
0.108243

0.310446
0.0984646
0.123222

0.49245
0.150667
0.138529

0.430892
0.134614
0.137111

0.0510386
0.016441
0.0385243

0.00701696 0.0127953
0.00185362 0.0032865
0.0086747 0.0153713

0.0731016
0.0217155
0.0412352

0.105575
0.0271053
0.063799

0.270645
0.0752666
0.101281

0.177155
0.0481545
0.0684482

0.0445461
0.011476
0.0376032

0.0925858
0.0270853
0.0549862

0.0539122
0.0141302
0.0383307

0.0849065
0.0259601
0.0446783

0.180522
0.0467517
0.0881209

0.281535
0.0748582
0.114232

0.495764
0.1744
0.122265

0.113251
0.0289323
0.165221

B 0.0327302 0.379821
e 0.00849057 0.109551
d 0.0284896 0.120999

C
h 0.0167279 0.31148
a 0.00436188 0.0934991
i 0.0156326 0.124627
r
C
0.0751491
o
0.0228926
l
0.0404894
u
m
n

0.384661
0.113936
0.139444

0.0308669
0.0078131
0.0322462

H
a
n 0.0581505
d 0.0147192
S 0.0465353
e
t
G
u 0.217901
i 0.061245
t 0.0825684
a
r
H
e
l
i
c 0.244083
o 0.0701102
p 0.0867554
t
e
r
L 0.045404
a 0.01203
m 0.0336688
p
M
o
n 0.128709
i 0.0331342
t 0.0671721
o
r

0.483987
0.141694
0.142768

0.0961692
0.0259387
0.0574079

0.0323132 0.128734
0.00846672 0.0354246
0.0276565 0.0582171

0.0092468
0.0049978
0.0120316

0.307161
0.0827662
0.106454

0.56737
0.169545
0.147115

0.236521
0.071607
0.116855

0.207348
0.0598802
0.0832519

0.140127
0.0360641
0.0798013

0.169952
0.0443815
0.0812911

0.323208
0.0928635
0.102795

0.0265747
0.0069416
0.0266502

0.0270287 0.542709
0.00696932 0.16125
0.0301038 0.135479

0.330453
0.101431
0.136274

0.246648
0.0724132
0.0917394

0.162739
0.0426508
0.0840356

0.167087
0.0445949
0.0804238

0.384872
0.113887
0.114443

0.037978
0.0291623 0.611567
0.00980866 0.00737316 0.187487
0.0322755 0.0379532 0.146975

0.470789
0.149609
0.145583

0.108127
0.0333027
0.0570018

0.0600541
0.0158268
0.0363025

0.0532586
0.01376
0.0362319

0.0707109
0.0224154
0.0401059

0.223492
0.0588989
0.0913808

0.454051
0.130162
0.132049

0.0620269 0.039308
0.00827331 0.0109072
0.0162766 0.0278697

0.571569
0.171318
0.149556

0.185845
0.0494486
0.0764842

0.296337
0.0881494
0.0942851

0.263499
0.0764136
0.0880259

0.0829025
0.0219923
0.0520367

0.44566
0.12708
0.125146

0.715772
0.228828
0.16361

0.143613
0.0391429
0.1459

0.0392941
0.010309
0.0305147

Conclusion:
The above method is very simple to implement. It is also very fast it takes
around fifteen seconds to compute all three dissimilarity measures between
two 3D models given in the .3ds format. Invariance and robustness
properties can be satisfied using shape functions and norms with the desired
properties.
The above tables give dissimilarity measures. They absolute values have no
particular meaning. What we must observe is the relative values. So we have
to see how a model compares with respect to the others and with respect to
another model of the same thing. For example we can see that the

0.0472766
0.0134368
0.0301559

0.239979
0.063332
0.101997

0.211138
0.0557542
0.0956866

0.0292735
0.00903518
0.00949332

dissimilarity measure for bed against bed is almost half of all the other
values except for bed against handset. This is because both bed and handset
have the same basic structure and the comparison is invariant to scale.
We can observe that the A3 shape function is the best as it is able to
distinguish better. Also the LN Minkowski norm with N=2 is providing the
best dissimilarity measure.

Improvements:
Development of benchmark databases containing degenerate 3D
polygonal models so that different shape analysis methods can be
compared.
More sophisticated shape functions based on domain specific
information or local geometric properties.
More efficient shape distribution sampling and reconstruction
methods, possibly based on adaptive strategies.
Combining shape distributions with other attributes (e.g. surface
colors, moments, etc.) for improved discriminability.

References:
Shape Distributions
Robert Osada, Thomas Funkhouser, Bernard Chazelle, and David Dobkin
Princeton University, Princeton, NJ 08540, USA

www.help3d.com for the 3D models.

www.google.com

Vous aimerez peut-être aussi