You are on page 1of 9

JST: Smart Systems and Devices

Volume , Issue , May 2022,

Applying of CATMULL-ROM Spline in adjusting the image from the


projectors on the sphere surface
Tuan Do Quoc1, Khiem Nguyen Van1 , Hung Dinh Tan2, Anh Nguyen The2*
1
Vietnam Air Defence-Airforce Technical Institute
2
Hanoi University of Science and Technology, Hanoi, Vietnam
*Email: theanhbk58@gmail.com

Abstract
This article proposes a solution for calibrating the projector images on sphere surface by applying the Catmull-
Rom spline and should be applied in the spatial simulation system. There are many problems that arose when
displaying the images from multi projectors on to the sphere surface. This affect significantly to the quality as
well as the authenticity of the image such as low-resolution image or overlapping images…, therefore, by
applying the Catmull-Rom spline for calibrating the projector images, those problems will be solved. This article
does the research, analyses to choose the Catmull-Rom spline parameter value which is suitable for grid
calibration image. Base on the above theory, the article proposes a solution for building calibration grid, then
developing the algorithm and software to adjust projector images using in simulation system. The obtained
result has been experimented in flight simulation training systems proving that the solution is feasible and
effective in adjusting simulation images.
Keywords: Catmull-Rom, sphere surface, Grid calibration image

1. Introduction1 with the shape of sphere surface. So that, it is necessary


to build a grid calibration curve which is plotted along
The simulation system has been designed in the direction of the edge of the sphere surface screen.
applying to training. E.g., Flight training, Armoured Though the control points are on the grid curves, the
fighting vehicle training, Ship-driving training. These image on the screen could be calibrated in detailly as
systems use the projector to show the spatial well as entirely. Then, the projector images would be
simulation. There are many manufactures have their visualized accordingly on the sphere surface screen.
owes simulation system with the different solution but Applying the grid system of the projectors, the entire
they are all secured. In Vietnam, there are several 3D image is visualized on the sphere surface screen.
sciences centre investigating to design this simulation
Through the previous research and survey, to
system but there is no publication.
ensure the projector images are calibrated uniformly,
To ensure the reality and the compatibility of the the grid curve needs to be established as the
simulation system, these projectors have to be set in requirement as below:
order to visualize the spatial image on the sphere
- The control point is the intersection point
surface. To setup the sphere simulation system, we
between lateral and vertical curve
have to combine the 10 projectors to display the image
on the sphere screen at the same time. Then, the 3D - Moving a control point will affect only to the
image will be shown on the large size sphere screen. vicinity curve, not the entire of the curve,
The spatial image is visualized in panoramic and vivid
- The calibration of the grid curve is
manner, covering the spatial of the training area, and
convenient. Example: Do not need to calibrate the
helping the trainer observe the same as reality.
normal vector at the control point.
There would be some problems with the image
To obtain those requirements, the curve have to
shown on the sphere screen:
ensure the following properties:
- The image, which is displayed, does not fit
- The interpolation according to the control
with the size of sphere screen
point: Any point on the curve is interpolated and
- The image from different projectors would be passing through the control points.
overlapped (Figure 7(a))
- The local controllability: moving a control
The solution for these problems is combining the point is only effect to the vicinity curve
images of multiple projectors into a uniform image on
- The continuity C1: the curve is continuous on
the entire of the sphere surface screen. The projector
every segment and the normal vectors at two adjacent
images must be calibrated according to the curve to fit
segments are the same. This feature allows to join the

ISSN 2734-9373
https://doi.org/10.51316/jst.150.ssad.2021.31.1.xx
Received: ......./..../......; accepted: ......./..../......

1
JST: Smart Systems and Devices
Volume , Issue , May 2022,

curve segments into a uniform curve. Therefore, the We have Pi = [xi yi]T present a point, the Catmull-
curve is at least the cubic curve. Rom spline C(t) is determined as the following
equations:
- Calculate conveniently : Using the control
𝑡2 −𝑡 𝑡−𝑡1
point in calculation. 𝐶(𝑡) = 𝐵1 + 𝐵2 (1)
𝑡2 −𝑡1 𝑡2 −𝑡1
There are many methods to establish the curve
like: Hermite, Bezier, Catmull-Rom, B-Splines… With:
However, the Catmull-Rom owns the most suitable 𝑡2 −𝑡 𝑡−𝑡0
𝐵1 = 𝐴1 + 𝐴2 (2)
feature in plotting the grid calibrated curve in applying 𝑡2 −𝑡0 𝑡2 −𝑡0

to the 3D simulation system. The other spline has some 𝐵2 =


𝑡3 −𝑡
𝐴2 +
𝑡−𝑡1
𝐴3 (3)
characteristics which are not suitable with the 𝑡3 −𝑡1 𝑡3 −𝑡1
requirement: 𝑡1 −𝑡 𝑡−𝑡0
𝐴1 = 𝑃0 + 𝑃 (4)
𝑡1 −𝑡0 𝑡1 −𝑡0 1
- Hermite Spline: this spline requires to
𝑡2 −𝑡 𝑡−𝑡1
determine the normal vector at the control point 𝐴2 = 𝑃 + 𝑃2 (5)
𝑡2 −𝑡1 1 𝑡2 −𝑡1
- Bezier Spline: the interpolation is not require 𝑡3 −𝑡 𝑡−𝑡2
passing through the control point 𝐴3 = 𝑃2 + 𝑃3 (6)
𝑡3 −𝑡2 𝑡3 −𝑡2

- B-Spline: the calculation method is too The parameter ti is the distance between two
complex, does not adapt with the time processing in control points [2]:
the 3D simulation system 𝛼
𝑡𝑖+1 = [√(𝑥𝑖+1 − 𝑥𝑖 )2 + (𝑦𝑖+1 − 𝑦𝑖 )2 ] + 𝑡𝑖 (7)
The Section 2 of this article will introduce about
the Catmull-Rom spline. The section 3 will do research We have α  [0,1], i = [0,3], t0=0.
and analyse the feature of the Catmull-Rom spline in
Barry and Goldman recursive algorithm has been
order to choose the suitable parameterization α with
demonstrated in the Triangular Schemes (Figure 1) to
the initial requirement, then applying this spline in
establish the C(t) equation which present the Catmull -
plotting the grid calibration curve. Section 4 introduce
Rom spline. The cubic case (n=3) is shown. This
the software was built to calibrate the image of the
pyramid scheme includes the triangular formed by two
multi projectors in displaying on the sphere surface.
nodes at the base and arrows with coefficients leading
Finally, some conclusions with assessments of the
to its apex. The value on the apex is the sum of two
result and the next improvements in the future would
multiplication between the nodes at the base and the
be presented.
coefficient along the arrow direction. The cubic
2. Introduce About Catmull-Rom Spline polynomials are considered for the above scheme
corresponding with three stages and each adds a single,
The Catmull-Rom spline [1] is a method that linear factor.
approximate a set of points (named control points) by
In the equation from (1) to (6), insert t=t1 into the
using the interpolation with the local calibration by
A1, A2, A3, B1, B2,C, the result at t=t1 is C(t1)=P1.
combining the Lagrange and B-spline. Barry and
Similarly, substituting t=t2 into the above equation, the
Goldman [3] have used this feature to construct the
result is C(t2)=P2.
Catmull-Rom curve in the recursion algorithm.
Considering the cubic Catmull-Rom curve. The
curve is generated by interpolating via 4 control points
P0, P1, P2, P3 and the parameters t0, t1, t2, t3

Fig.1: Barry and Goldman Algorithm

2
JST: Smart Systems and Devices
Volume , Issue , May 2022,

These results have proven that the C(t) passing through With the shorter segment, the Centripetal Catmull-
the control points and do not depend on the parameter Rom spline is similar to the Chordal Catmull-Rom
: spline. Through the above results, the Centripetal
Catmull-Rom spline is closest to the control polygon
- α = 0: Uniform parameterization than others in the complete curve. This result will
- α = 0.5: Centripetal parameterization remain with the difference control segments.
- α = 1: Chordal parameterization

3. Analyzing and applying the Catmull-Rom spline


in generating the grid calibration image
3.1. Analysing and evaluating the Catmull-
Rom spline a) α = 0
The shape of the Catmull-Rom curve is depended
on choosing the parameterization α. Some values of α Fig.2: Calmull-Rom Spline with difference
might result to the unexpected spline as cups and self- α b) α = 0.5 c) α = 1
intersections. In addition, the distance from the curve
to the control polygon too far might make the curves 3.1.2. Cusps and Self-Intersections
difficult to control in practice.
A uniform parameterization [5] often produces
In this section, we focus on analysing to choose cusps (Figure 2a) or self-intersections (Figure 4a)
the suitable parameterization α in generating the grid within curve segments. Even when there are no cusps
calibration image by considering the different type of or intersections, the uniform parameterization tends to
Catmull-Rom spline: Uniform Catmull-Rom spline, produce high curvature points along shorter segments
Centripetal Catmull-Rom spline, Chordal Catmull- (Figure 3), which are usually undesirable in practice.
Rom spline.
The Catmull-Rom spline has the parametric
value ti that depends on the distance between the
control points. When all line segments of the control
polygon have the same length, all parameterizations of
this family produce the same curve. The differences
between parameterization choices appear when the
Fig.3. The Catmull-Rom spline has the high
control polygon has line segments with different
curvature.
lengths. As the differences between the lengths of
These features are less appeared when increasing
neighboring segments increase, the different
the α. When α > ½, cups or self-intersections can only
characteristics of the parameterizations are amplified.
happen when the Catmull-Rom curve overshoots its
3.1.1. The distance between the control polygon control points (figure 4b). Therefore, there is only the
and the actual curve centripetal Catmull-Rom spline is the only member of
this parameterization family that guarantees no cups or
In fact, for uniform parameterization as an edge self-intersections anywhere within a single Catmull-
becomes larger in comparision to its neighbours, the Rom curve segment.
curve becomes closer to the edge. A similar behaviour
happens with chordal parameterization for shorter
edges, while longer edges push the curve segments of
the chordal parameterization closer to the shorter edge.
In that sense, the edge distance behaviour of uniform
and chordal parameterization is opposite of each other.
In the figure 2, the light line is the control line with the
control points are the green dots, the bold line is the
Catmull-Rom spline. a) α = 0

With the small value of α, the curve on the shorter


edge segment will deviate more than on the longer.
When increasing the α, [5] the deviation will decrease
slowly. In contrary, with the longer control polygon
segments, the curve slowly deviates with small α and
rapidly deviates when increasing the α. Therefore, with b) α = 1
the longer segment, the Centripetal Catmull-Rom Fig.4. The self-intersection (uniform spline) and
spline is similar to the uniform Catmull-Rom spline. unexpected apex (chordal spline).

3
JST: Smart Systems and Devices
Volume , Issue , May 2022,

3.1.3. The direction of the curve and the control 3.2. Applying the Catmull-Rom spline in
edge plotting the image calibration grid.
Another inconvenient feature of the chordal As mention above, the cubic Catmull-Rom
spline is easy to be affected by the direction of the spline is the continuity C1 curves. So that, a spline
control polygon. This could be observed near the short going through n control points could be plotted a series
edges. The curves with chordal parameterization are of the consecutive cubic Catmull-Rom curve
very close to shorter edges of the control polygon, this segments. Each curve segment is plotted from four
makes the curves overshoot when longer edges are consecutive control points.
adjacent to shorter ones. [5] As a result, relatively
To plot the spline, which contains n points,
minor changes in the position of a control point with a
requires (n+2) control points due to the two end points
short edge can drastically alter the shape of the curve
are not used. A curve between Pi and Pi+1 is
with chordal parameterization. This behaviour is
interpolated from the control pints Pi-1, Pi, Pi+1, Pi+2,
demonstrated in Figure 5. This not appear on the
uniform and centripetal Catmull-Rom curve. with α  [1, n-1]. Combining these segments, the
continuity curve is generated, go through all the
control points.
Base on this feature, the image calibration grid is
plotted from the horizontal and vertical curve through
three steps: Generating the matrix of control points,
generating the control lines, interpolating the curve
α=0
3.2.1. Generating the matrix of control points.
Generating the matrix of the control points for the
projector frame. The matrix has m rows and n columns,
with the control points of mx1, 1xm, mxn, nxm are on
the edge of the projector frame. At the initial, the
corresponding control points in its rows are uniformly
α = 0.5 separated, corresponding with the control points on the
columns. So that, the frame is divided into the (m-
1)x(n-1) cells. From this matrix, the control points
could be moved to calibrate the curve which
interpolates from these points.
α=1 3.2.2. Generating the control lines
Fig.5. Direction of the control line and the inflection In the next step, to control, calculate the interpolation
point depends on the α (α = 0, α = 0.5, α = 1). and generate the control line corresponding with each
row, each column of the matrix.
3.1.4. The inflection points on the spline.
Considering each row, in which includes n control
In the cubic Catmull-Rom spline family, the points Pi = [xi yi]T( j = 1, n ) . To generate the Catmull-
centripetal spline tends to blend at the control points.
With the other spline, the inflection point is not Rom spline by interpolating these n control points
coincided with the control points (figure 5). This will requires adding two points at begin and the end of the
cause the difficulties when calibrating the spline in control line: P0, Pn+1. These points are required for
desirable shape. interpolating of the Catmull-Rom spline and these
points will not be shown on the control lines.
3.1.5. Conclusion
The additional points are determined by
The centripetal Catmull–Rom spline has several extrapolating:
desirable mathematical properties compared to the
original and the other types of Catmull-Rom 𝑃0 = 𝑃1 − (𝑃2 − 𝑃1 ) (8)
formulation. First, it will not form loop or self- 𝑃𝑛+1 = 𝑃𝑛 + (𝑃𝑛 − 𝑃𝑛−1 ) (9)
intersection within a curve segment. Second, cusp will Then, interpolating to get an interpolation curve go
never occur within a curve segment. Third, it follows through n points with n+2 control points. Similarly,
the control points more tightly. Therefore, the each column has m+2 control points. So that, the
Centripetal Catmull-Rom spline is the most suitable control matrix is extended to the (m+2) x (n+2).
spline to plotting the image calibration grid which is
This process is presented in the algorithm of
mentioned in below.
generating the matrix of image calibrating (Fig.6)

4
JST: Smart Systems and Devices
Volume , Issue , May 2022,

and other control lines, the desirable Catmull-Rom


Start
spline is generated. The interpolation points are
transferred to the other module which help to control
the curve.
Input the matrix size
The steps of calculating the interpolation points
mxn are presented in the algorithm of interpolating the
control points on the curve (Fig.7.)
Initialize the matrix of Start
control points: Cij

Generate the Row Receive the matrix of


control line Ri control points M and
R1..m, C1..n
Extrapolating
Ri0, Ri(n+1)
i=1

Interpolating the Ri
j=1

i:=i+1
Interpolating the point
on the side of the Cellij
Yes (Ri,Ri+1,Cj,Cj+1 )
i m
No
Generate the Column Transfer the points in
control line Cj Cellij to the control the
visualization module
Extrapolating
Cj0, Cj(m+1)
j:=j+1
Interpolating the Cj
Yes j n-1

j:=j+1 No

i:=i+1
j n Yes

No i m-1 Yes

Finish No

Fig.6. The algorithm of generating the image Finish


calibration matrix
Fig.7. The algorithm of interpolating the control
3.2.3. Interpolating the curve points on the curve.
Interpolating the curve bases on the control line 4. Building and testing the software
corresponding with each row, each column of the
matrix. On each control line, applying the Barry- The software was developed to calibrate the image
Goldman algorithm uses 4 consecutive control points of the projectors systems by using Catmul-Rom spline
with α=0.5, the result is centripetal Catmull-Rom to display the image on the sphere surface. The
spline. Recursing these calculation on the control line software was developed on the client-server model:

5
JST: Smart Systems and Devices
Volume , Issue , May 2022,

Calibration software on the calibration computer, the


software to control the visualization of the image on
the simulation computer. The connection between the
computers is present on Fig.8

Calibration HDMI

Graphics
Simulation Projectors

card
computer Computer 1 1

Fig.9. Grid Catmull-Rom spline.


HDMI
Graphics
Simulation Projectors When applying the software in visualization of
card
Computer 2 2
the spatial image on the sphere surface, there is a
software which manage the overall of the spatial which
HDMI
established by the multi projectors in the system and
Graphics

Simulation Projectors manage the address information of the computer


card

Computer 3 3
connect to the projectors. The projectors are setup in
order to display on entire of the sphere surface.
The software help to manage, allow editing,
HDMI
Graphics

Simulation Projectors
calibrating the calibration grid. By observation the
card

Computer 4 4
calibration grid which is visualized on the screen, the
images from different projectors are merged.
The functions of this software are:
HDMI
Graphics

Simulation Projectors
card
SWITCH

Computer 5 5 - Managing the entire of the spatial


- Subdividing the spatial according the calibration grid
- Editing, calibrating the image and the projectors
screen
Graphics

Simulation HDMI Projectors


card

Computer 6 6 - Merging the images of different projectors


- Transferring the information between the simulation
computer
HDMI
Graphics

Simulation Projectors - Controlling the visualization of the calibration image


card

Computer 7 7 of the simulation computer


Start
HDMI
Graphics

Simulation Projectors
card

Computer 8 8 Managing the entire of the


spatial

Managing the grid projector


Graphics

Simulation HDMI Projectors


card

Computer 9 9 screen

Simulation Editing, calibrating the image


Graphics

HDMI Projectors
card

Computer and the projectors screen


10
10

Fig.8. System connection diagram Merging the images of different


projectors

4.1. Calibration software


Controlling the visualization
The calibration software on the calibration computer of the calibration image of the
has the function which generates the grid of curve for simulation computer
the projector system. The software follows the three
steps in section 3.2 to generate the grid with
corresponding the required row and column. The Continue calibrating Yes
control points on the grid are intersections between No
horizontal and vertical lines (Figure 9). The software
allows to edit and calibrate the geometry and projector Finish
frame via the control points. This information will
directly transfer to the simulation computer in the Fig.10. The algorithm of managing, synchronizing
calibrating process. the visualization of the spatial between different screen

6
JST: Smart Systems and Devices
Volume , Issue , May 2022,

4.2. The visualization controlling software on the Start


simulation computer
The software on the simulation computer uses the Receiving, analysing the grid
grid curve information from the calibration computer. calibration curve
Based on these data, this software will calibrate and
assemble the images of the projectors in accordance Managing the grid projector
with the frame on the sphere surface. The result is an screen
overall image that is calibrated, assembled from
different projector frames, allow simulating the Calculating the matrix of
uniform spatial image on the entire sphere surface. control points
The software has the following functions:
- Receiving, analysing grid curve from the Calculating to establish the grid
calibration computer curve
- Managing the grid projector screen
- Calculating the calibrating image parameter
- Assembling the hardware to control the Assembling the hardware to
visualization control the visualization
- Generating the information of controlling the
images
- Generating the simulation spatial according
Generating the controlling of
the sphere surface
the image visualization
This software is tested for application in generating,
calibrating the spatial image from the different
projectors on the sphere surface. This generates the
Generating the entire of spatial
uniform image between the frame, on the edge of the Yes
according the projector screen
frame and on the entire sphere surface. The software
performs the interpolating calculation by using the
Barry-Goldman algorithm, so the processing time is No Update calibration
short and satisfied with the requirement of real-time infomation?
spatial simulation.
Yes
Continue calibrating

No

Finish

Fig.12. The algorithm of controlling the visualization


image on the sphere surface
6. Conclusion
The article provides a solution in applying the
a) Before b) After
Catmull-Rom in plotting the grid curve to calibrate and
Fig.11. The image before and after applying the display the image on the sphere surface. This includes
calibration software the research, analyse, evaluation to choose the suitable
parameter α for the Catmull-Rom. This solution could
be applied in the simulation system in order to display
the image on the different types of curvature surface.
The grid calibration image software has demonstrated
the effectiveness and practicality of the solution. In the
field of spatial simulation using multiple projectors,
there are still some issues that need to be further
researched, including the light intensity processing of
the image between the different projector to ensure the
overall image has the harmonically light intensity.

7
JST: Smart Systems and Devices
Volume , Issue , May 2022,

5. References

[1] E. Catmull, R. Rom, “A class of local interpolating


splines”, Computer Aided Geometric Design, p. 317-
326, 1974.
[2] E. T. Y. Lee, “Choosing nodes in parametric curve
interpolation”, Computer Aided Design 21 (6), p. 363-
370, 1989.W.-K. Chen, Linear Networks and
Systems. Belmont, CA, USA: Wadsworth, 1993, pp.
123–135.
[3] P. J. Barry, R. N. Goldman, “A recursive evaluation
algorithm for a class of Catmull-rom splines”,
SIGGRAPH Computer Graphics, Vol 22 (4), p. 199-
204, 1988.
[4] Website: https://pomax.github.io/bezierinfo/, “A
Primer on Bézier Curves - an open-source online book
explaining Bézier curves.
[5] Yuksel; Schaefer; Keyser, Cem; Scott; John. "On the
Parameterization of Catmull-Rom Curves"

8
JST: Smart Systems and Devices
Volume , Issue , May 2022,

Reviewer Communication Form


(Authors should include this part in revised submission)

Reviewers Comments to Author(s) Author Response and Revision


1. First Review
Reviewer 1

Recommendation: Major revision


Reviewer 2

Recommendation: Minor revision


2. Second Review
Reviewer 1

Reviewer 2

You might also like