Stereo Pixel MOVERBy![]() The author`s first attempt at resurrecting Sir Charles Wheatstone in 3D was based on the moving of individual image areas by hand. It was obvious from the start that this could only result in a kind of cardboarding, because the image can only be moved by a complete pixel at a time. When Gutenberg invented movable type, a huge typeface industry developed in France and the Netherlands. It was based on the idea that if a needle is blunted to at least one seventy-second of an inch, it can no longer puncture the paper, and can be used for printing. This, then, was the STANDARD POINT, and even when computers arrived, ir remained a standard. The Centronics and Epson print-heads had needles one point apart, and the standard Postscript graphics are based upon a one-point array. Sharper graphics have since arrived, but we must consider firstly whether we wish to manipulate vast arrays of dots, and secondly whether the eye will see the benefit. Thirdly, the bleeding of the printed dots may make the actual definition much lower than the advertised quality. Human eyes are typically two-and-a-quarter inches apart, and on the point standard this would be 162 dots. When we stare towards the horizon past a one-point image, the axis of each eye will land on a pixel 162 dots apart. When we stare at the plane of the image, the axis of each eye will land on the SAME dot. This leads to the realisation that if we stand ONE (metre/yard) from the printed stereo image, the perceived position of the subject on the point standard will be, in units of metres or yards, 162 divided by the pixel offset. For example, if part of the image is depicted ONE pixel offset from where it would be for infinity, the distance will appear to be 162 divided by 1. That is, 162 metres or yards when one views from a metre or a yard.
Here is a table of the quantized depth-planes for the point
standard. Note that when viewed from TWO metres/yards the
distances must be DOUBLED: |
|
Plane of screen.
163 .993865
164 .9878049
165 .9818182
166 .9759036
167 .9700599
168 .9642857
169 .9585799
170 .9529412
171 .9473684
172 .9418604
173 .9364162
174 .9310345
175 .9257143
176 .9204546
177 .9152542
178 .9101124
179 .9050279
180 .9
181 .8950276
182 .8901099
183 .8852459
184 .8804348
185 .8756757
186 .8709677
187 .8663102
188 .8617021
189 .8571429
190 .8526316
191 .8481675
192 .84375
193 .8393782
194 .8350515
195 .8307692
196 .8265306
197 .822335
198 .8181818
199 .8140703
200 .81
201 .8059701
202 .8019802
203 .7980295
204 .7941176
205 .7902439
206 .7864078
207 .7826087
208 .7788461
209 .7751196
210 .7714286
211 .7677725
212 .7641509
213 .7605634
214 .7570093
215 .7534884
216 .75
217 .7465438
218 .7431192
219 .739726
220 .7363636
221 .7330317
222 .7297297
223 .7264574
224 .7232143
225 .72
226 .7168142
227 .7136564
228 .7105263
229 .7074236
230 .7043478
231 .7012987
232 .6982759
233 .6952789
234 .6923077
235 .6893617
236 .6864407
237 .6835443
238 .6806723
239 .6778243
240 .675
241 .6721992
242 .6694215
243 .6666667
244 .6639344
245 .6612245
246 .6585366
247 .6558704
248 .6532258
249 .6506024
250 .648
251 .6454183
252 .6428571
253 .6403162
254 .6377953
255 .6352941
256 .6328125
257 .6303502
258 .627907
259 .6254826
260 .6230769
261 .6206896
262 .6183206
263 .6159696
264 .6136364
265 .6113207
266 .6090226
267 .6067415
268 .6044776
269 .6022305
270 .6
271 .5977859
272 .5955882
273 .5934066
274 .5912409
275 .5890909
276 .5869565
277 .5848376
278 .5827338
279 .5806451
280 .5785714
281 .5765125
282 .5744681
283 .5724382
284 .5704225
285 .5684211
286 .5664335
287 .5644599
288 .5625
289 .5605536
290 .5586207
291 .556701
292 .5547945
293 .552901
294 .5510204
295 .5491526
296 .5472973
297 .5454546
298 .5436242
299 .541806
300 .54
301 .538206
302 .5364239
303 .5346535
304 .5328947
305 .5311475
306 .5294118
307 .5276873
308 .525974
309 .5242718
310 .5225806
311 .5209003
312 .5192308
313 .5175719
314 .5159236
315 .5142857
316 .5126582
317 .511041
318 .509434
319 .507837
320 .50625
321 .5046729
322 .5031056
323 .501548
324 .5
|
Such data can, of course, be recomputed for other standards
such as 120 or 300 dots per inch.
The essential feature is that at important distances such as two metres, with offsets of 80, 81 or 82 points, there will be about a fortieth of a metre/yard between planes. There are about 39.5 inches to a metre, so we can see that a stereo image on the point standard cannot resolve to better than about an INCH at six feet.
Fortunately, it is possible to SIMULATE positions between the
dots. Consider the next image.
When an image can "blend" slowly from one plane to the next, an effect known as "stereo in the round" can be achieved. However, this requires automation. That was the reasoning behind the creation of the MoveR program. The technical term for this process is ANTI-ALIASING, which is a variant of INTERPOLATION.
Stereo ReconstructionThe process begins by finding a suitable image of the subject and cleaning it up. The author has standardised on keeping the image for the right eye unchanged, and making a copy for the left eye in which pieces are moved right to bring them forward. This leads at once to the realisation that something must replace those pieces that are moved right. For example, in a woodland scene a tree can be moved right to make it smaller and nearer - but one cannot leave the original in place unless one WANTS a small tree in front of a bigger similar tree. There is a need to INVENT, therefore, those parts of the image that were not recorded. If a photo is said to be the RIGHT image, one has to invent what a camera WOULD HAVE SEEN if it had been two-and-a-quarter inches (62 to 64 mm) to the left. Fortunately, with faces, the nose would be seen further to the right and the exposed area would simply be a wider expanse of the hidden cheek. When working on the stereo reconstruction of a scene with humans and background, the people are best removed from the scene and reinserted after manipulation.
MoveR has a width restriction of 2048 pixels. However, this should
be adequate for most purposes.
The first thing to do it to find a suitable image.
This image is then cleaned up, and a copy is kept for the right eye.
A certain amount of "cardboarding" exists in nature - for example,
in photos of cardboard! So the tip of the nose and the edge of the
ear must be shifted by a dot or two to create this effect. Also,
the edges of the spectacles.
This image in turn can be pulled and stretched until it represents the desired DEPTH of the image. It is a Z-AXIS specification. Without it, MoveR would not know how to manipulate the dots.
We continue in this way until we have created a reasonable
representation of the depth information: ![]() We should now have a left-eye image that we CONVERT TO 16 MILLION (16,777,216) COLOURS and save as XY.BMP, as well as a 256-SHADE GREYSCALE Z.BMP.
These two files can be put into a directory C:/WEHNER/MOVER together
with MOVER.COM.
For example, you count out colour number 20 from the palette,
and insert it in the bottom left-hand pixel. Then you save
Z.BMP in this form.
Because we want MoveR to interface with Windows. We want the command
to be "MOVER", not "MOVER 20". In this way, we do not have to pass
the parameter 20, so we do not need to type at the DOS prompt.
Also, if we have overdone or underdone the perspective,
we do not have to re-work the whole Z.BMP. We have just one overall
parameter to adjust to reduce or increase the stereo depth.
An additional benefit is that the parameter is RECORDED in the Z.BMP
file, so the information does not become forgotten.
You can always check that PARAMETER PIXEL by means of the
"eye-dropper" control - here shown for parameter 255: |

|
So, because Bill Gates used mathematicians rather than engineers
to design the BMP format, the Y-axis has its ORIGIN (Y=0) at
the bottom, and the bottom left pixel is the first one encountered
in the file.
If all goes well, a DOS window should appear, to deliver the
messages from the MOVER program. It should say "DONE". You
can go to the "X" - top right of the window - and close it.
MOVER.BMP should have been made.
|

|
MoveR will not overwrite an existing MOVER.BMP, so previous work should be saved under a new name. Then MOVER.BMP can be erased. It is good practice to use an EXCESSIVE parameter pixel - say, 64, whilst developing the image. It helps you to visualise the roundness of the picture. Then, for the final result, you change to a lower value such as 16. The picture below had a PARAMETER PIXEL of 16.
XY was the LEFT eye image. It has now been turned into MOVER.BMP.
You paste the RIGHT eye image on the left, and MOVER.BMP to its
right. If all is correct, you finish off - such as by colouring:
|

|
This image is suitable for cross-eyed viewing. The picture was quickly made to test the system. There really ought to be a competition in stereoscopic circles to create the most lifelike resurrection of Sir Charles Wheatstone. There appear to have been a few shoddy attempts at making an image for each eye prior to Wheatstone. However, his 1838 lecture showed what vast effort he put into the study of visual perception. This was the moment that launched the 3D craze onto an unsuspecting world. He is truly the father of 3D. For the best results, it is possible to use MOVER to move LEFT as well as right. In this way, the burden of dot-shifting can be divided equally between each image using the same Z-axis file. You take the RIGHT-eye image and create a MIRROR copy as XY.BMP. You also turn Z.BMP into a mirror-image of itself. The PARAMETER PIXEL will have to be copied from the extreme right to the left. That parameter will, of course, be HALF of what it would have been with only one image shifted. After using MoveR, you turn MOVER.BMP into its mirror image.
Here is what happens when the entire sinusoidal shade image, with
PARAMETER 144, is used for both a left and a right shift:
|

You can also use ANNA
to create an anaglyph, but the image reverts to black and white.
Images can be saved as GIF or JPEG - the two main systems at the
time of writing. GIF will reduce the number of separate colours
to 256, but can be opened up and reworked over and over. JPEG
will degrade the image - more so when the compression is high.
It should be used ONLY ONCE - at the time of completion of the
image.
Archive copies of finished images should be kept as BMP.
Expanded GIF or JPEG saved as BMP will not do - the information
loss CANNOT be reversed by expanding to BMP.
BMP files are BIG - so they should be stored on a Compact Disk
(CD).
Here are the hot-links for the ZIP files. Go on the Internet to
the WINZIP DOWNLOAD PAGE to install Winzip if you do not have it.
Then EXTRACT to a directory such as C:\WEHNER
It is even possible to make stereoscopic MOVIES,
when one combines binocular GIF with Wehner`s ANIMATE:
Go to http://wehner.org/tools/animate to see how to make animations. |
| Home |
(C) 2003 Charles Douglas Wehner.
Use freely but do not plagiarise.