Developed as a part of convergence research contest.
Our team members decided to propose the concept for analyzing, visualizing and exhibit the research relationships in our institute.
We started from extracting the keywords in papers published in recent 5 years from our institute.
Because of the lack of time, I "conceptually" developed an application to show how the relationships can be visualized.
Data visualization, 2D or 3D?
The D3.js is now getting popular for most type of data visualization in 2D.
2D data visualization has advantages on concise expression and easy perception to users.
On the other hand, the 3D visualization is needed when we want to provide "spatial" sort of experience to user.
Usually the type of data we focused tends to be visualized in 2D, but we(actually I,) tried to visualize it in 3D for future.
For instance, LBS or AR use.
Of course the effective visualization approach should be discussed more in later.
Development of a demo application
Like always, Unity3D is very useful when you need to develop an application in very short time.
The concept of my visualization is a planetarium, which each keyword is floating on the dome shaped sky.
Application includes relationship visualization functions and search functions.
Also the titles, authors and research fields can be seen if user selected certain keyword to get into the "Focus Mode".
Textures are simply made from MS PowerPoint.
Source database exists in Dropbox and read through WWW class at first time, but I changed it into TextAsset resource since the data is not going to be dynamically changing.
Again, the multi-channel visualization can be easily done though the multi-channel module I have.
The scene captured in 3rd person view
Selecting the keyword in 1st person view
Relationship is indicated with line
Searching the keyword
Searching result is indicated with simple animation with different texture
Focus Mode.
Specific information related with "Lithium-Ion Battery" can be seen in here
Multi-channel visualization
Discussion?
As I mentioned, the effectivess of visualization should be improved in so many ways.
Location based service application using GPS data can be easily developed, but the performance should be improved when using it with smart device.
There's not much "analysis" of the data in demo application. Data analysis method in bibliography fields should be applied.
I developed the simple code for unsupervised tilt correction(perspective correction?) of panoramic image.
First the "Line segment detector" in vpdetection library has been applied on each panoramic image
By calculating the slope of line segments, define the subset of line segments that can be considered as vertical line segments.
Vertical line segments are indicated as red line
I define the amount of tilt for each line segment as length multiplied by the difference of x coordinate position of start and end point.
Amount of tilt in original image. Mean : 1.6431
Like described in the previous post, each pixel of the image can be mapped to the point on the unit sphere, so calculate the mapped point of all start and end points.
Then find lambda(rotation angle along x axis) and phi(rotation angle along y axis) that is argmin for the sum of amount of tilt for vertical line segments.
Apply rotation to the entire image by given lambda and phi.
In my opinion, two major advantage of digital map is, 1) precise footprint data and 2) simplified building shape data.
These two characteristic may be incompatible, because simplification removes the data.
But still, map is the most precise reference data we can have about the location and orientation of the building if you want data about large area. Even if the shape is projected to 2D and simplified.
Also, in fact, simplification is necessary if you want to model large area, and the allowed degree of simplification is up to the application. For instance, if you reconstruct the pipe model of the ship for inspection, you cannot allow big simplification. So you may want to use LiDAR.
In that research, they assumed 1D camera model and by matching it with digital map, found intrinsic and extrinsic parameters.
I want to apply their approach in my research. But the detailed process is not clear yet.
Pre-processing, Tilt correction
One thing I have to do first is the tilt correction. If tilt is not corrected, 1D camera assumption cause large error according to the scene geometry.
Below figures illustrate the effect of the tilt correction, where the position and direction of the panoramic image has been manually corrected in first figure, and position,direction and tilt(pitch, roll) has been manually corrected.
Tilt not corrected. You can see the displacement between images and building models.
Tilt corrected. Amount of displacement has been reduced.
For the first-step, I modified the MATLAB code for the pano to perspective, to rotate the entire panoramic image.
Process is like below.
1. Each image points(pixel) can be mapped to the points on the unit sphere
2. Rotate the points on sphere with rotation matrix, from given angle
3. Points on sphere is re-projected to image points(pixel) with nearest neighbor
The original version of my implementation was done by modifying the pano to perspective image code, which takes about three minute(196 seconds) to process for source image with 2700x5400 resolution.
I changed the code consisted of nested for loop(column nested by row for loop) to the matrix calculation for speedup.
As a result it takes about 20 seconds to process.
This implementation will be used in unsupervised tilt correction.
In this research, we proposed the automatic 3D city modeling framework which use wide-baseline panoramic image(e.g. Google Street View) and 2D digital map as a source data.
Main contribution is identification of the component technologies which can be applied in each stage of the framework.
Overall process and experimental result is shown below.
What I have learned
What I've learned first is that unsupervised segmentation of the building (contour) is complex problem, even if we have a prior knowledge about the approximate position of the building from the digital map.
There are several candidate methods I have found, vertical edge based, horizontal edge based, repetitive pattern based and semantic segmentation.
The first two methods are very weak to the occlusion and repetitive pattern based method is not applicable to the building style of the Korea. Semantic segmentation is excessive approach for our problem.
Since I'm relatively new to this field, I think I couldn't make a good contribution on image segmentation itself.
Instead, I think I have to focus more on the use of the digital map for my research.
What I have developed
3D cadastral model generator + panoramic sphere viewer using Unity3D
Image-building relation calculator script for Unity3D
Converter for panoramic image to perspective image for MATLAB
Vertical & horizontal edge based segmentation library and VP estimator for MATLAB
Image rectification library for MATLAB
And many others...
3D cadastral model generated from digital map data
Duplicated view of the 3D cadastral model and panoramic sphere, with GPS location and direction data
Pano to perspective, given camera FOV, yaw and pitch
Soon, I realize that the client-side scripting is not enough for maintaining DB for mesh data, and shape descriptors.
I'm not familiar with the various web technologies and choose a server-side programming method that I can develop fast-ASP.NET
First step is develop the calculation module with C# DLL, which is just a conversion task from JS.
Second step is designing the layout, which I'm not good at, and connecting the module with elements in the page.
Also, one functionality added is storing the uploaded mesh data into server machine for later development.
For dynamic visualization of X3DOM, "HTMLGenericControl" of ASP.NET was used to change the attribute value in X3D node.(Is there any performance issue?)
You can test with your OBJ of OFF mesh data, but you should keep in mind that the DATA YOU UPLOADED WILL BE STORED IN MY SERVER MACHINE.
After few weeks, the ORIN Lab performed simulation to validate the reason of capsizing.
And this data, should be visualized as soon as possible for publishing.
So we reuse the framework above, and replacing only the "Data Processing" module to change the processable data from warfare simulation to capsizing simulation.
As a result, a day was enough to implement the application.
Extending the Application to Large-scale Visualization
Today, I converted the application described above, which is for standalone use, into large-scale visualization.
This also takes fairly short time(a day), since I already developed "Multi-Channel" module for our facility.(small grey box in the first figure)
So all I have to do is just plug the module in my Unity3D project and build it to install it in CAVE facility.
Although the GUIs are not handled properly. It is not easy to remove it in client without modifying the script code...
You can see the results in previous post interactively, by X3DOM.
Wheel click + drag : panning
Left button click + drag : rotating
Right button click + drag : zooming