Automatic Generation of a Realistic Looking Single Image Stereogram Using Stereo Vision
Total Page:16
File Type:pdf, Size:1020Kb
2016 23rd International Conference on Pattern Recognition (ICPR) Cancún Center, Cancún, México, December 4-8, 2016 Automatic Generation of A Realistic Looking Single Image Stereogram using Stereo Vision Minh Nguyen School of Engineering, Computer and Mathematical Sciences Auckland University of Technology Auckland, New Zealand Email: [email protected] Abstract—Stereogram or autostereogram, frequently known as Magic Eye picture, is a two-dimensional (2D) image. Hidden inside each stereogram image is a floating object which appears in three-dimensional. We present a fully featured, web-based, online system that produces on-the-fly stereograms (or autostereograms) from a pair of side-by-side images. The system consists of three steps: (i) two side-by-side near stereo images are processed to reconstruct a disparity map, (ii) multiple regions of left or right images are automatically selected for building stereogram, (iii) base distance is estimated for the best human perception, and (iv) reconstruction of stereogram. Stereogram is built with a variety of transparency options, thus, multiple regions of images can be presented in the final output and display of transparent 3D layers in stereogram is possible. Moreover, the system is portable and can be used in smartphones with an Internet connection. Image Fig. 1. A random-dot stereogram that encodes a 3D profile of a shark [8]. pairs can be acquired directly on the phone and stereogram is reconstructed and displayed on the phone screen. These novel features place the system ahead of current alternatives and allows A. Motivation a wide variety of users to experience stereo reconstruction and stereogram generation in a quick and easy manner. Additionally, Beside anaglyphs, stereograms are also frequently seen the system could serve as a platform for online based visual on the Internet related to the keywords “3D images or perception studies. “stereoscopic images. An example of stereograms can be seen in Figure 1, which looks similar to a wallpaper where I. INTRODUCTION random coloured patterns [9] are repeated. Its name originally Autostereograms or single-image stereograms were invented comes from “Stereogram, which is referred to an image by Sir David Brewster around 1840 as an improvement over pair which could be viewed by using a stereoscope. In fact, the kaleidoscope, the apparatus which allowed representing this picture encodes a 3D scene of a shark, which can be 3D shapes [1]. Modern days’ stereograms for computers were “seen with proper viewing technique (no filter glasses are first introduced by Tyler et al. in 1990 [2]. Tyler managed to required). The appearance of this stereogram is established demonstrate the ability to generate depth illusions by using by encoding three-dimensional shark image into distortions image patterns consisting of a single image random dot stere- of symmetrical patterns which are decoded by misleading the ogram. The proposed 2D image contains an unlimited range eye convergences. To achieve the 3D illusion, a viewer can in depth and can create 3D in-depth profiles both above and focus on a point in front of or behind the image surface. The behind the image plane. Stereograms quickly gained interest repeating patterns will thus be moved sideways, and the brain from the public in the 90’s through the patented application attempts to fuse them together by focusing on certain pairs “Magic Eye” [3] as the only accessible 3D images in the at different parallax angles. The image patterns, thus, appear early days of computing. Applications of stereograms range to float at different depths correspondingly. The performance from public-driven media support (3D books or videos [4]) to for in-depth perception was claimed to be similar or even watermarking [5], vision therapy [6], and cristallography [7] to more advantageous than attempting to view side-by-side stereo name a few. Many 3D design tools offer to generate stereogram pairs [7]. stills or videos from depth map and texture map of a scene There have been attempts to use stereograms of random- or to use a 3D object as a start up point. There is, however, dot images [10] for efficient watermarking [5] Thanks to its no available publication or software which allows a user to distinctive appearance and low cost to produce, stereograms create a stereogram still or video from a pair of stereo images are relatively popular for entertainment for many years. On acquired by a user. the current Internet, there exists a significant number of 978-1-5090-0357-0/15/$31.00 c 2015 IEEE similar online applications: [11], [12], [13], [14]. Most of them 978-1-5090-4846-5/16/$31.00 ©2016 IEEE 3815 enable users to quickly and interactively build stereograms by choosing from a number of given depth-maps and patterns. Despite a great number of similar products, to the best of our knowledge, none of them utilise stereo vision technique to generate stereograms, i.e. by using the depth and pattern information recovered from a pair of left and right stereo images. Accordingly there is little if no communication on the use of auto-stereogram to embed both depth and texture information for a given stereo-pair. B. Benefits of the Proposed System We propose a scheme to generate stereogram quickly from a pair of real-life stereo images which are captured by user cameras or cell phones. Compared to the aforementioned similar solutions, this proposed application presents some Fig. 2. Our proposed stereogram creation system contains four image advantages below: processing steps. • Instead of choosing from a selection of given depth models, the system creates stereogram from a real-life II. BACKGROUNDS AND RELATED WORKS pair of photos acquired by any conventional single sensor camera. A. History and literature reviews • Repeated colour texture are selected from the source images, hence, the look of stereogram is related to the There are two ways to diverge the eye viewing directions: captured scene. wall-eyed and cross-eyed, which also correspond to two ways • Repeated patterns are automatically chosen from var- to generate a stereogram. Wall-eyed viewing method requires ious areas of the picture to obtain stereograms with the eyes to adopt a relatively parallel angle, we can naturally diverse looks (as seen in Fig. 5(a) and Fig. 5(b)). A few achieve it by looking into the far distance. Cross-eyed viewing, stereograms can be overlaid on each other to make the on the other hand, requires a relatively convergent angle, such combined picture contain parts chosen regions (as seen as looking at an object very close to the eyes. Some may find in Fig. 5(c)). one easier than the other technique; indeed, more stereograms • Our application also lets user re-generate depth from any are constructed to be wall-eye-viewed. With the wrong viewing stereogram. Those who have difficulty seeing stereogram technique, the same 3D scene can still be seen but with the from the first place can reveal what is hidden. depth reversed. For many years, stereograms have been popularly used for C. Overall Process to Create Stereogram artistic expression and in children’s books (often called Magic Overall, the proposed process contains four steps as demon- Pictures or Magic Eyes). Additionally, Katrusiak et al. have strated in diagram 2: used stereograms as a portable methodology to display 3D crystal structures on 2D image [7]. The method facilitates 1) Stereo Matching is used to extract depth information a clear presentation of crystal elements, which may help to from side-by-side images with a known disparity range. solve three-dimensional geometrical and structural problems This process outputs a disparity map that characterises in demonstration and education. the observed 3D surface. Different forms of stereoscopy were discussed above to 2) Texture selection picks multiple regions in the reference show that stereoscopy is far more extensive than is commonly image (left or right) to be repeated within the stere- realised. There were some associations created to promote the ogram. study and collection of stereoscopic products, for instance, 3) Base-distance selection is applied to adjust the display the Stereoscopic Society1 founded in 1893, and the National of stereogram so that it can be easily viewed by different Stereoscopic Association2 founded in 1974. Also, there were people (degree of eye convergent) and on different many books and magazines dedicated solely to 3D stereo- platforms (printed papers, computer screens, cell-phone scopic imaging, e.g. the Stereo World magazine3, which is screens). widely published six times per year. Many may be found in an 4) Stereogram creation is about the reconstruction from the enormous collection belonging to Harold A. Layer [15], who above parameters. spent twenty years collecting stereoscopic books published The paper is continued with another four subsequent sec- from the year 1853 to 1986. tions. Sec. II revises the background of stereogram and other related works. Sec. III discusses on our system design and 1www.stereoscopicsociety.org.uk implementation. It also presents a number of results and 2www.stereoworld.org Sec. IV concludes the paper. 3www.stereoworld.org/stereoWorld.php 3816 ∗ ∗ B. Three dimension perception from Stereogram In this equation dP = pPL − pPR => dP ∼ dP ; therefore: d ∼ −d∗ . This means there is a direct relationship between Single image stereograms are two-dimensional images that P P stereo vision disparity d∗ and stereogram d . We can use the have the unique property that when viewed in a specific P P result of stereo matching to create stereogram, which will be way, a visual illusion of a three-dimensional (3D) scene is described further in Section III. perceived. Stereograms have been found to be a useful tool for studying stereoscopic vision in humans [16], as they provide a C. Other related works straightforward way to manipulate particular depth cues and to On the current Internet, there exists a significant number insert conflicts between these cues.