Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

International Journal of EmergingTrends & Technology in Computer Science(IJETTCS)

Web Site: www.ijettcs.org Email: editor@ijettcs.org


Volume 3, Issue 3, May June 2014 ISSN 2278-6856


Volume 3, Issue 3 May June 2014 Page 107


Abstract Extracting surface depth from one or more
images is one of the classic problems in computer vision.
Shape-from-Shading and photometric stereo are two
fundamental problems in computer vision aimed at
reconstructing the surface depth from a given single image
taken under a known light source. There are a several
development techniques for estimating the surface from
shading images information. This paper presents a new
approach for estimating the shape in three dimension (3D)
object from coloring images lies in two dimension (2D)
domain, in terms of a approximating the height map by a
second order of differential equation. Our approach suggest a
High Map Function (HMF) method that is satisfy the
Constraint of Integrability Condition (CIC) and does not
need any boundary condition assumptions, we have designed
a stand-alone, using the software Matlab, in order to
implementation and enables to evaluate the purposed method.
The experiments on real world color images show that the
purposed method is effective and able to estimate the surface
from shading images.

Keywords: Coloring Images, Shading Images, Constraint
of Integrability.

1. Introduction
Many computer vision problems are defined over a grid,
such as stereo, shape from shading, image super-
resolution, and others. In computer vision, the techniques
to recover shape are called shape-from-X techniques,
where X can be shading, stereo, contour, texture, etc.
Shape-from-shading (SfS) deals with the recovery of
shape from a gradual variation of shading in the image
[3,15]. Shape-from-shading (SfS) is a challenging
problem because of the considerable ambiguity in its
solution. For the simplest case of Lambertian reflectance
and known albedo, the derived solution suffers from bas-
relief ambiguity [13]. When albedo is unknown, the range
of possible solutions expands significantly. To resolve
these ambiguities, an obvious solution is to utilize a set of
input images under different lighting conditions, which
transforms the SfS problem into that of photometric
stereo [15]. However, such additional input data is often
inconvenient to obtain in practice. Recent techniques for
SfS [9,18] estimate shape from a single input image
under natural illumination, but deal with uniform-albedo
objects and require a special calibration target to measure
lighting. Also, Shape from Shading (SfS) is defined as
inferring the shape of an object depicted in a single input
image given only the light reflectance and illumination in
the scene. It is a classic task in computer vision and was
pioneered by Horn [19] using partial differential
equations (PDEs), see [20] for reviews of the field. Since
then, there has been enormous progress in the area of
(SfS). In particular, the appropriate modelling of light
reflectance and scene illumination has played a key role
in the design of successful SfS approaches. The goal of
SfS is to estimate 3D shape from a single image, under
the assumption that albedo is uniform, lighting originates
from a single point from a known direction, and the
surface reflectance function is both uniform and known.
The common way to obtain shape information is to solve
the image irradiance equation, which relates the
reflectance map to image intensity. As this task is
nontrivial, most of the works in the field employ
simplifying assumptions, and in particular the assumption
that projection of scene points during a photographic
process is orthographic [2]. This resulted in low stability
of reconstruction algorithms.
The SfS problem consists of computing the three-
dimensional shape of a surface from the brightness
variations in a black and white image of that surface.
Pioneered by Horn [19], this problem has been central in
the field of computer vision since the early days, because
of several reasons, the interest in this problem has slightly
decreased at the end of the 90s. First, due to the difficulty
of the problem, progress in SfS research is very slow.
Second, until recently, the results obtained on real images
have been very disappointing. For example, in [20],
Zhang et al. acknowledge failure. Third, the various
constraints imposed by the existing solutions to the SfS
problem limit its applications [21]. The shading problem
used to recovering the shape of a scene from a single
grey-level image, by means of the analysis of the shading.
The craze for SfS in the past seems to have subsided,
probably because of rather disappointing results on real
images. Nevertheless, several recent works [17,23, 24]
have (independently) attempted to modelize SfS in a more
realistic way, in particular by considering perspective
projection.
There exist wide applications of Shape from Shading
(SfS), in various fields including computer vision,
computer graphics, robotics, and pattern recognition etc,
[21]. For example, illumination-insensitive and pose-
insensitive 3D object recognition can be achieved based
on 2D images only. This is possible because images from
any views and light source directions can be synthesized
from a single given image after successful SfS has been
carried out [22]. In this paper we purpose a new approach
for shape reconstruction method from multi-color images.
We develop constraints of integrability condition for
achieving this goal. For efficient computation, we use
high map function that satisfies the constraint of
integrability condition. Our final purpose method tested
High Frequency Shape Estimation from shading
in Color Images

Gamal F. Elhady

Menofia University, Faculty of Computers and Informations, Menofia, Egypt
International Journal of EmergingTrends & Technology in Computer Science(IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May June 2014 ISSN 2278-6856


Volume 3, Issue 3 May June 2014 Page 108


on a variety of real world color images with different
sizes and constant illumination direction taken by a
digital camera.
The outline of the paper is as follows. In section.2, we
present the related literature about several methods used
to solve SfS problems. We briefly review the physics of
lambertian surface and reflectance map in section.3.
Section 4, offer the problem description of our methods
and algorithm of the constraint of integrability condition.
Our results with discussions presented in section 5.
Finally, the paper conclusion and the future directions in
section 6.

2. Related Literature
In recent years, several methods have been developed that
solve the classical SfS problem well as long as surface
reflectance R is assumed to be Lambertian [1,4,7]. Still,
humans are able to exploit shading cues under far more
general scenarios. In order to compete with human
performance, SfS algorithms may need to accommodate
non-Lambertian reflectance (which is highly nonlinear
and non-Gaussian), shadow cues (which are highly non-
local and may produce large cliques), unknown lighting
and albedo properties (which are global properties,
possibly requiring fully connected potentials), and the
integration of multiple depth cues. For this reason, more
flexible optimization methods for SfS are desirable [11].
Many different techniques for achieving shape
reconstruction, and can usually be considered as being
either propagation or optimization. Propagation methods
for solving the SFS problem start with knowledge of the
surface height at a number of known points and gradually
extend that known area by calculating the height at
neighboring positions. Since Horns method of
characteristic strips [19], there have been a number of
variations on this theme. The fast marching [14,24]
methods have been shown to work well for smooth
surfaces with known surface height at local maxima.
These have included the use of perspective camera
models. A similar approach to propagating surface height
is expressed by the minimum downhill principle.
Although propagation SfS algorithms have achieved very
good results on relatively simple surfaces, the problem of
initializing local height maxima to the correct values is
still unsolved for realistic surfaces (despite some
interesting recent progress on enforcing smooth traversals
[25].
Optimisation techniques for SfS minimize a cost function
which describes how well the estimated surface
approximates the input image. They usually also include
additional penalty terms in the cost function to prevent
incorrect minima of the cost function being found.
Brooks, Horn [19], developed an iterative algorithm that
minimizes the cost function. Although the algorithm
converges to a solution for the surface orientation p(x,y)
and q(x,y), the solution does not satisfy integrability
condition. The integrability problem by using Fourier
transform as a transition stage to satisfy the integrability
condition by projecting the nonintegerable solution into
its nearest integrable solution in the Fourier domain.
Although they achieved their aim of integrable solution,
the algorithm reflects high computational complexity
since they need to use Fourier transform at every iteration
to satisfy the integrability in Fourier domain then come
back to time domain using inverse Fourier transform [5].
Most existing shape-from-shading (SfS) methods are
based on signal image and orthogonal projection.
Perspective projection method [16], uses multi-images for
estimating the shape from shading. Three images with
different lighting source directions are captured by
camera. Following by three reflectance map equations
which are described by Lambertain model are established.
Then the gradient vectors of the 3D surface are calculated
by solving the reflectance map equations.
Hara, Barnes give algorithm [21] and its application to
Mars images, demonstrates good results if the initial
shape estimation stage is successful, but can perform
badly otherwise. The use of conjugate gradient descent to
refine an initial surface estimate (assumedly from a stereo
technique) has been popular but can suffer from finding
bad local minima if the initial shape is not close to that of
the real surface. A deformable model formulation [22],
has been shown to effectively recover shape and refine
reflectance parameters for relatively simple surfaces.
Shape-from-photometric-stereo [8,15] is another method
for shape recovery in computer vision. The difference
between shape-from-photometric-stereo and SFS is in the
number of input images. Shape-from-photometric-stereo
recovers shape from multiple intensity images of the same
scene generated using fixed viewing direction and
different light source directions; while SFS provides the
shape estimate from a single image. Thus, using multiple
images which are taken with different lighting provides
additional information for robust surface reconstruction.

3. Reflectance of a Lambertian surface
The most commonly used model in SfS literature is
Lambertian surface with constant albedo due to its
simplicity. A Lambertian surface is a surface which as the
property of invariant luminance according to the viewing
angle. Let's add that changing the observation angle is the
same thing as rotating the surface, because what is at
stake here is the angle between the surface normal and
the observation view point [7,10], see figure 1.


Figure 1. Lambertian Reflection Geometry

we can easily locate the two angles
i
between the surface
normal and the light source, the viewing angle
v

between the surface normal and the observation point.
International Journal of EmergingTrends & Technology in Computer Science(IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May June 2014 ISSN 2278-6856


Volume 3, Issue 3 May June 2014 Page 109


Lambertian surfaces are surfaces having only diffuse
reflectance, i.e., surfaces which reflect light in all
directions. The brightness of a Lambertian surface is
proportional to the energy of the incident light. The
amount of light energy falling on a surface element is
proportional to the area of the surface element as seen
from the light source position (the foreshortened area).
The foreshortened area is a cosine function of the angle
between the surface orientation and the light source
direction. Therefore, the Lambertian brightness of the
surface can be modeled as the product of the strength of
the light source A, the albedo of the surface , and the
foreshortened area ) cos(
i
as follows [10]:
) (
i l
COS A I = (1)
Where
i
is the angle between the surface normal N

and
the direction of the light sourceS

, see figure.1, is the


albedo. Albedo is Latin, meaning whiteness. The albedo
of a surface is the fraction of the incident sunlight that the
surface reflects [10]. Let's now express separately the two
scalar products between the surface normal N

and the
source direction S

as follow:
) cos( ) (
i
S N S N = -


(2)
From equation (2) we can get as the following formula:
2 2 2 2 2 2
) (
) cos(
z y x z y x
z
y
x
z
y
x
i
s s s n n n
s
s
s
n
n
n
S N
S N
+ + + +
|
|
|
.
|

\
|

|
|
|
.
|

\
|

-
=

(3)

where the (
z y x
n n n , , ) and (
z y x
s s s , , ) denoted
the direction of surface normal and illumination source
light direction respectively.
By substituting from equation (3) into equation (1) we can
write the Lambertian brightness as the following formula:

2 2 2 2 2 2
z y x z y x
z z y y x X
l
s s s n n n
s n s n s n
A I
+ + + +
+ +
= (4)
For a given light source distribution and a given surface
material, the reflectance for all surface orientations p and
q can be cataloged or computed to yield the reflectance
map R(p, q). Since the precise value for the image
irradiance depends on a variety of factors such as the
strength of the light source, the light-gathering ability of
the optical system, and many other factors that do not
affect reflectance qualitatively, the reflectance map is
normalized so that its maximum value is 1.
Combining this normalization with the assumption that
scene radiance equals image irradiance yields the image
irradiance equation (brightness equation) [7]. Which says
that the irradiance (brightness) at point (x, y) in the image
plane is equal to the reflectance map value for the.
Surface orientation p and q of the corresponding point on
the scene surface. For a Lambertian reflector and point
light source, the reflectance map R(p, q) is given by the
following equation:

)) , ( ), , ( ( ) , ( ) , ( y x q y x p R q p R y x I = =
(5)
Where I(x,y) the input image irradiance, are the surface
orientation component with respect to x and y axis. Z(x,y)
be the range image corresponding to the true 3D shape
and the surface height of the 3D object above the (x,y)
plane [7].
For the Lambertian surface, we write:

) ( ) , (
i
COS q p R =

(6)
From equations (3),(5) and (6) we can write the
brightness equation as the following:
1
) , ( ) , (
2 2 2 2 2
+ + + +
+ +
= =
q p s s s
s qs ps
q p R y x I
z y x
z y x

(7)
Note: the normal of the once-differentiable surface, z, at
point (x,y,z(x,y)) can be written as:
) 1 ), , ( ), , ( ( ) , , ( y x q y x p n n n
z y x
= (8)
The brightness equation (7) is define as the brightness
distribution of the shading image of that surface and the
brightness values are define by the properties of the
surface such as orientation, reflectively, illumination and
reflectance map R(p,q).

4. Problem Description
To solve the shape from shading problem, it is important
to study how the images are formed. A simple model of
image formation is the Lambertian model, in which the
gray level at a pixel in the image depends on the light
source direction and the surface normal. In SfS, given a
gray level image, the aim is to recover the light source
and the surface shape at each pixel in the image.
However, real images do not always follow the
Lambertian model [6]. Even if we assume Lambertian
reflectance and known light source direction, and if the
brightness can be described as a function of surface shape
and light source direction, the problem is still not simple.
This is because if the surface shape is described in terms
of the surface normal, we have a linear equation with
three unknowns, and if the surface shape is described in
terms of the surface gradient, we have a non-linear
equation with two unknowns. Therefore, finding a unique
solution to SfS is difficult; it requires additional
constraints [22]. Image intensity at a pixel as a function
of the surface orientation of the corresponding scene point
is captured in a reflectance map. Thus, for fixed
illumination and imaging conditions, and for a surface
with known reflectance properties, changes in surface
orientation translate into corresponding changes in image
intensity. The inverse problem of recovering surface
shape from changes in image intensity is known as the
shape from shading problem. We now summarize the
procedure for solving this problem using the constraint of
International Journal of EmergingTrends & Technology in Computer Science(IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May June 2014 ISSN 2278-6856


Volume 3, Issue 3 May June 2014 Page 110


integrability [4]. From the previous section, the
relationship between image irradiance E(x,y) and the
orientation (p,q) of the corresponding point on the surface
is given by equation (7).
The goal is to recover surface shape by calculating the
orientation (p, q) on the surface for each point (x, y) in
the image. Note that we have only one equation, but there
are two unknowns, p and q. Thus, this problem cannot be
solved unless additional constraints are imposed. A
commonly imposed constraint is that integrability
constraint. Equation (7) is a first order nonlinear partial
differential equation in x and y. It has been observed that
shape from shading can be expressed as a problem of
solving a first-order nonlinear partial differential equation
in x and y. In deriving iterative solutions to equation (7)
by the calculus of variations, it appears to be much more
straightforward to solve for surface orientation than to
solve directly for Z, the question of consistency between
p(x,y) and q(x,y) arises and leads us to search for an
integrable solution [4]. The integrability constraint satisfy
the valid surface that is Zxy =Zyx.
A nonintegerable solution will give rise to an infinite
number for solutions for the problem of shape from
shading. An iterative solution for equation.(7), seek p(x,y)
and q(x,y) values that minimize the total square
brightness error F(p,q) over region in xy plane. The
square brightness error F(p,q) define the difference
between the original irradiance image I(x,y) and the
computed gray scale image resulted from substituting p(x,
y) and q(x,y) in the reflectance map R(p, q) at point (x,y).
See equation (9):
dxdy y x R y x I q p F
}}
O
=
2
)) , ( ) , ( ( ) , ( (9)
In this paper, our method estimating the high surface and
satisfies the constraint of integrability condition without
resorting to additional Fourier Transform (FT) [5], stages
is provided. The problem of finding integrable solution in
the SfS problem can be simplified if the unknown surface
height is represented in a form that satisfies the constraint
of integrability. The unknown surface height Z(x,y) can be
expanded on a complete set of basis function ) , ( y x
ij
u
as the following:

= =
u =
n
i
ij
n
i
y x y x Z
0 0
) , ( ) , ( (10)
The surface orientation p(x, y) and q(x, y) can be written
as:

= =
c
u c
=
n
i
ij
n
i
x
y x
y x p
0 0
) , (
) , ( (11)

= =
c
u c
=
n
i
ij
n
i
y
y x
y x q
0 0
) , (
) , ( (12)
The suggested method depends on estimating the values
of p(x,y) and q(x,y) that minimize the cost function U(x,y)
which based on square brightness error F(p,q) and lack of
smoothness [19], such that:-

dxdy q q p p
q p R y x I y x U
y x y x
)) (
)) , ( ) , ( ((( ) , (
2 2 2 2
2
+ + + +
+ =
}}
O

(13)
where the first term represented the square of the
difference between the image brightness and the resultant
brightness using the reflectance map R(p(x, y),q(x, y)), the
second term represents the smoothness, where p
x
(x, y),
q
x
(x, y), p
y
(x, y), and q
y
(x ,y) represents the derivatives of
the surface.
The expression
) (
2 2 2 2
y x y x
q q p p + + +
is instead best
regarded as a regularizing term that is primarily intended
as a means of finding a particularly smooth shape that is
close to a solution of the original problem. Different
surfaces will give rise to different values for the integral
the expressions
) (
2 2 2 2
y x y x
q q p p + + +
, is a scalar
that assigns a relative weighting to the terms. The
distortion due to regularization depends on the
parameter . A large value of appropriate when the
image data is very noisy, leads to large errors, since the
emphasis will be on producing as smooth a surface as
possible, while permitting considerable error in
brightness. Conversely, a small value for cause's
brightness errors to be weighted more. In this case, a
more undulating surface is acceptable since the
contribution of the regularizing term to the overall
functional is relatively small.

4.1 Algorithm for the constraint of Integrality.
Shape from shading is a technique for estimating surface
shape from a camera image using variations in the
observed brightness across that surface. The solution to
the shape-from-shading problem requires long-range
error to be reduced through strictly local interactions.
This situation arises mainly from the local nature of the
representation used for gradient and height fields and
causes very large number of iterations in the iterative
scheme [7]. Multi grid methods are often used in
computer vision to speed up computationally intensive
tasks such as shape-from-shading [1]. In these methods,
an integrable solution computed for a reduced image is
used to guide the algorithm toward the complete solution
on a larger image. The unknown surface height map
Z(x,y) can be expanded on a complete set of basis
function. We suppose that the function take the form:

= =
+ = u
n
i
j i j i
n
i
ij
y x
j i
Y X y x
0 0
) ) sin( ) sin(
! !
1
( ) , ( (14)
and the surface of height map Z(x, y) can be written as:-

= =
+ =
n
i
j i j i
n
i
y x
j i
Y X y x Z
0 0
) ) sin( ) sin(
! !
1
( ) , (
(15)
From equations (11),(12) and (15) we can find the
surface orientation gradient, p(x, y) and q(x, y) as the
following form:
International Journal of EmergingTrends & Technology in Computer Science(IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May June 2014 ISSN 2278-6856


Volume 3, Issue 3 May June 2014 Page 111

=

+ =
n
i
j i i
j i
n
i
j
y
i
x x
Y iX y x p
0
) 1 (
1
0
)
!
) sin(
)! 1 (
) cos(
( ) , (
(16)

=

+ =
n
i
j j i
j i
n
i
j
y y
i
x
Y jX y x q
0
) 1 (
1
0
)
)! 1 (
) cos(
!
) sin(
( ) , (
(17)
where the surface of second derivatives
y y x x
q p q p , , ,
,satisfy the integrability condition Zxy=Zyx or
) , ( ) , ( y x q y x p
x y
=
then the constraint of intergrability
condition take the form:

=

=
+ =
n
i
ij
j i
n
i
y x N Y ijX y x W
0
1 1
0
)) , ( ( ) , ( (18)
where )
)! 1 (
) cos(
)! 1 (
) cos(
) , (
) 1 ( ) 1 (

=

j
y y
i
x x
y x N
j j i i
ij

The Euler equations for minimized the problem of
equation (13) can be simplified to read [6]:
0 )) , ( ) , ( (
2
= V + p R y x R y x I
p
(19)
0 )) , ( ) , ( (
2
= V + q R y x R y x I
q
(20)
where Rp and Rq are the partial derivatives of R(p,q) with
respect to p and q and,

2
2
2
2
2
y x c
c
+
c
c
= V
is the Laplacian operator.
At this point we introduce a discrete approximation of the
Laplacian. The Laplacian of a function at a given point is
approximately equal to a constant times the difference
between a local average of the function and its value at
the point. We use the simple finite difference
approximation as the form [19]:
] 4 ) [(
1
, 1 , 1 1 , 1 , 2
2
j i j i j i j i j i ij
p p p p p p + + + ~ V
+ +

(21)
] 4 ) [(
1
, 1 , 1 1 , 1 ,
2
2
j i j i j i j i j i ij
q q q q q q + + + ~ V
+ +

(22)
then
) (
4
2
2
j i j i ij
p p p ~ V

(23)
) (
4
2
2
j i j i ij
q q q ~ V

(24)
Where denotes the spacing between picture cells and
smoothness of the local average is given by:
] [
4
1
, 1 , 1 1 , 1 , j i j i j i j i j i
p p p p p
+ +
+ + + = (25)
] [
4
1
, 1 , 1 1 , 1 , j i j i j i j i j i
q q q q q
+ +
+ + + = (26)
By using the finite difference approximations from
equations, (23) and (24) in the Euler equations (19) and
(20), we obtain:
) , ( )) , ( ) , ( (
4
2
ij ij p ij ij ij ij ij
q p R q p R y x I p p + =

(27)
) , ( )) , ( ) , ( (
4
2
ij ij q ij ij ij ij ij
q p R q p R y x I q q + =

(28)
An iterative scheme can now be developed in which these
particular terms are considered to be new values to be
computed by inserting the current values into the
remainder of the expression, we finally arrive at the
scheme:
) , ( )) , ( ) , ( (
4
2
1 k
ij
k
ij p
k
ij
k
ij ij
k
ij
k
ij
q p R q p R y x I p p + =
+

(29)
) , ( )) , ( ) , ( (
4
2
1 k
ij
k
ij p
k
ij
k
ij ij
k
ij
k
ij
q p R q p R y x I q q + =
+

(30)
where, k denotes the iteration number.
The purposed High Map Function (HMF) method
procedure satisfies the constraint of integerability
condition and provides shading and 3D shape estimation
with low computational complexity compared to
conventional Fourier Transform Profilometry (FTP) based
methods [5] and the Perspective projection method (Pers
proj) [16].
The algorithm of the purposed method can be
summarized as following:
1: Input color image with known light source direction,
albedo and parameter .
2: Convert color image into gray scale image.
3: Start with initial random values for p
ij
and q
ij
.
4: Estimate the smoothness of , using equations 25, 26.
5: Compute the surface orientation pij and qij at a given
iteration (k=0, 1, 2,.,n) by equations 29,30.
6: Compute the cost function U(x,y) from equation 13.
7: Repeat the previous step 4, to step 6. Until the cost
function U(x,y) is stop decreasing or become sufficiently
small.
8: Estimate the 3D from equation 15.
9: End.

5. RESULTS AND DISCUSSIONS
The goal of SfS is to estimate 3D shape from a single
color image, under the assumption that albedo is uniform,
lighting originates from a single point from a known
direction, and the surface reflectance function is both
uniform and known. If we define x z p c c = / and
y z q c c = / , then I(x, y) = R(p, q), where I(x, y) is the
input image, and z is a range image corresponding to the
true 3D shape. A depth map z only exists if p and q are
integrable so that x q y p c c = c c / / .
To evaluate the performance of the new shape from
shading algorithm, we tested our proposed method on
different real world color images, with different sizes and
different intensity brightness distribution. The parameter
albedo and are constant and always positive value
[10], and without know boundary conditions. We are
going to discuss and implementation the shape form
shading technique by using our proposed method. Our
methods depend on estimating the value of surface
International Journal of EmergingTrends & Technology in Computer Science(IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May June 2014 ISSN 2278-6856


Volume 3, Issue 3 May June 2014 Page 112


orientation p(x,y) and q(x,y) which satisfy the constraint
of integrability condition Zxy=Zyx, and minimization the
cost function U(x,y), equation 13. After that we estimated
the height map of the surface in three dimensions (3D)
using equation 15.
We have illustrated our experiments on a set of real world
color images are taken by single camera at different
positions and sizes. Figure 3a1, show that the first
original lady color image, the second and third are two
hand color images with different shape and sizes, see
figures (4a2, 5a3). The forth image is vegetables color
image shown in figure (6a4), and fives image is small-
basket color image in figure (7a5). In our method before
estimation the shape from shading. We must be
converting the color images into gray level images that
are shown in figures (3b1, 4b2,5b3,6b5,7b5). The height
map has been extracted for each shading images using the
proposed method, the surface of high map can be
computed by using the equation 14. The results of our
proposed methods are illustrated by figures (3c1, 4c2,
5c3, 6c4, 7c5).
The performance of our High Map Function (HMF)
method has been tested with two methods, Fourier
Transform Profilometry (FTP) method [5] and
Perspective projection method (Pers proj) [16]. Fourier
transform profilometry method depends on the complex
function that is difficult to computed, comparing with my
proposed method which depends on simple function that
is easy to compute. The Fourier domain by definition is a
global transform such that a change in any pixel values
will affect the whole transform. On the other hand, the
proposed method is local mapping, such that any
variation in specific pixels will only affect the same set of
pixels and the rest will remain unchanged. Perspective
projection method uses multi-images with multi
reflectance map equations, which are difficult to
computed compering with our proposed method which
uses one equation of reflectance map. Table.1 shows the
performance evaluation between the purposed (HMP)
method and other methods, Fourier Transform
Profilometry (FTP), Perspective projection (Pers proj)
respectively, when computing the cost function with
square brightness error.

Table1. Performance evaluation between Our method and
FTP, Pers proj Methods

Object image
Percent error of cost function
Image
size in
pixels
Our HMP
method
FTP
method
Pers proj
method
lady image
256 256

0.122011 0.188735 0.403929
Hand1 image 208 211

0.089232 0.112171 0.412727
Hand2 image
205 210

0.010815 0.0236366 0.346738
Vegeta-
image
210 210

0.040760 0.0876898 0.294066
Basket image
128 128

0.285168 0.347612 0.661455
To comparing between our proposed method and other
methods (Fourier transform profilometry and Perspective
projection). We use cost function U(x,y) from equation
(13) at a given number of input images. Figure 2, show
that the proposed method has satisfy the values of p(x,y)
and q(x,y) that minimize the cost function U(x,y) which
based on square brightness error F(p,q), with comparing
than the values of Fourier transform profilometry and
Perspective projection methods.


Figure. 2, Square brightness error between Our method
and FTP, Pers proj Methods



a1) Original lady color image b1) lady gray image


c1) lady image in 3D shape
Figure 3, Results reconstruction of lady image


a2 ) Orignal hand1 image b2) hand1gray image
International Journal of EmergingTrends & Technology in Computer Science(IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May June 2014 ISSN 2278-6856


Volume 3, Issue 3 May June 2014 Page 113



c2) hand1 image in 3D shape
Figure 4, Results reconstruction of hand
1
image


a3) Original hand2 image b3) Gray hand2image

c3) hand2 image in 3D shape
Figure 5, Results reconstruction of hand
2
image


a4) Original vegetables image b4) vegetables gray image

c4) vegetables image in 3D shape
Figure 6, Results reconstruction of vegetables image


a5) Original basket image b5) basket gray image

c5) basket image in 3D shape
Figure 7, Results reconstruction of basket image

6. CONCLUSION AND THE FUTURE
DIRECTIONS
In this paper we have presented novel methods for
recovering the 3D representation of the object from single
image making use of shading information. The
contributions are twofold. Frist the color images are
present a problem for shape from shading methods
because it affects the apparent of shading. Second we
have posed the problem of recovering the height map
surface of the object. Our method is taste on real images
to estimate the 3D reconstruction from single 2D gray
scale image illuminated by a single source of
illumination. The proposed method depends on to suggest
the height map surface satisfy the constraint of
integrability condition and minimum value of cost
function. Shape reconstruction from shading image is an
important problem in computer vision. In the future the
present paper can be extended to estimate the 3D shape
from shading of non-lambertain surface. The constrain of
single source of illumination can be extended to study SfS
problem in the case of uniform source of illumination.
Also the constraint of integrability condition can be
extended into other constrain such that brightness
constraint.

References
[1] A. Ecker and A. D. Jepson. Polynomial shape from
shading. In CVPR, pages 145152, June 2010.
[2] A. A.H. Ahmed and A.A. Farag. A new formulation
for shape from shading for non-Lambertian surfaces.
In Proc. IEEE Conference on Computer Vision and
Pattern Recognition (CVPR), pages 18171824,
2006.
[3] Bao, S.Y, Savarese, S," Semantic structure from
International Journal of EmergingTrends & Technology in Computer Science(IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May June 2014 ISSN 2278-6856


Volume 3, Issue 3 May June 2014 Page 114


motion" Computer Vision and Pattern Recognition
(CVPR), IEEE Conference, pp, 2025 2032, 2013.
[4] B. Potetz. Efficient belief propagation for vision
using linear constraint nodes. In CVPR. 2007.
[5] Chunsheng Yu, Lushen Wu, Qingjin Peng "3D
Shape Acquisition Using an FTP-based Method in
Product Modeling" Proceedings of the Canadian
Design Engineering Network (CDEN), 2nd
International Conference, Kaninaskis, Alberta, July
18-20, 2005.
[6] E. Prados, F. Camilli, and O. Faugeras. A viscosity
method for Shape from Shading without boudary
data. Technical report, INRIA, To appear in 2004.
[7] E. Prados and O. Faugeras. A mathematical and
algorithmic study of the lambertian SFS problem for
orthographic and pinhole cameras. Technical Report
RR-5005, INRIA, November 2003.
[8] Fassold, H., Danzl, R., Schindler, K., Bischof, H.,
2004. Reconstruction of archaeological finds using
shape from stereo and shape from shading. In: Ninth
Computer Vision Winter Workshop, Piran, Slovenia,
pp. 2130.
[9] G. Oxholm and K. Nishino. Shape and reflectance
from natural illumination. In ECCV (1), pages 528
541, 2012
[10] J A Coakley "Reflectance and Albedo, Surface"
Oregon State University, 2003 Elsevier Science,
USA.
[11] J. T. Barron and J. Malik. High-frequency shape and
albedo from shading using natural image statistics. In
CVPR, 2011.
[12] J. T. Barron and J. Malik. Color constancy, intrinsic
images and shape estimation. In ECCV(4), pages 57-
70, 2012.
[13] J.-D. Durou, M. Falcone, and M. Sagona. Numerical
methods for shape-from-shading: A new survey with
benchmarks. Computer Vision and Image
Understanding, 109(1): 2243, 2008.
[14] Kimmel, R., Sethian, J ., 2001. Optimal algorithm for
shape from shading and path planning. Journal of
Mathematical Imaging and Vision 14 (3), 237244.
[15] L.-F. Yu, S.-K. Yeung, Y.-W. Tai, D. Terzopoulos,
and T. F. Chan. Outdoor photometric stereo. In
ICCP, 2013.
[16] Lei Yang, Ning Zhang, "Recovering Three-
Dimensional Surfaces with Multi-images Shape-
From-Shading Method" AsiaSim, Communications
in Computer and Information Science, pp 108-116,
2012
[17] M. Breu, E. Cristiani, J.-D. Durou, M. Falcone, and
O. Vogel. Perspective shape from shading:
Ambiguity analysis and numerical approximations.
SIAM J ournal on Imaging Sciences, 5(1):311342,
2012.
[18] M. K. Johnson and E. H. Adelson. Shape estimation
in naturalillumination. In CVPR, pages 25532560,
2011.
[19] P. Horn and M.J. Brooks, Height and gradient from
shading Int. J. Computer Vision 5(1), 3775 (1990).
[20] Q. Zheng and R. Chellappa. Estimation of illuminant
direction, albedo, and shape from shading. Trans. on
Pattern Analysis and Machine Intelligence, 13
(7):680702, 1999.
[21] R. O'Hara, D. Barnes " A new shape from shading
technique with application to Mars Express HRSC
images" ISPRS Journal of Photogrammetry and
Remote Sensing 67 (2012) 2734
[22] Samaras, D., Metaxas, D., 2003. Incorporating
illumination constraints in deformable models for
shape from shading and light direction estimation.
IEEE Transactions on Pattern Analysis and Machine
Intelligence 25 (2), 247264.
[23] S.Galliani, Y.-C. Ju, M. Breu, and A. Bruhn.
Generalised perspective shape from shading in
spherical coordinates. In Proc. Scale Space and
Variational Methods in Computer Vision (SSVM),
pages 222233, 2013.
[24] Yuen, S.Y., Tsui, Y.Y., Chow, C.K., 2007. A fast
marching formulation of perspective from shading
under frontal illumination. Pattern Recognition
Letters 28 ( 7), 806824.
[25] Zhu, Q., Shi, J., 2006. Shape from shading:
recognizing the mountains through a global view. In:
Proceedings of the 2006 IEEE Computer Society
Conference on Computer Vision and Pattern
Recognition, New York, NY, USA, pp. 18391846


AUTHORs
Gamal. F. Elhady received the B.S, M.S and
Ph.D degree in Computer Science at Faculty
of Science, in 1998 and 2006, Mansoura
University, Egypt. During 1998 and 2006, he
works a Demonstrator and Lecturer Assistance in Faculty
of science computer science Dept. He is member of
IAENG in USA (#108463).
His research interest includes software programing,
software testing, distributed system, data mining,
database, Artificial intelligent, image processing and
bioinformatics.

You might also like