Project of CSE_260 (Speed Up PTM Computation for Mobile Devices)
RTIScan is an app for archaeologists. It can use 36 pictures to simulate light and shadow changes from different angles.
-
Fixed the bug that the color is not normal
-
Compress the time of matrix operations (The comparative data is in the table below)
Before optimization | After optimization | |
---|---|---|
Reading images to momery | 3698.06ms | 3245.52ms |
Initial Process(Memory allocation) | 183.62ms | 502.11ms |
Convert int Matrix to double | 5788.28ms | 3255.85ms |
SVD calculation | 0.38ms | 0.364065ms |
Large matrix multipulation | 241551.93ms | 105.31ms |
Total time | 251222.42ms | 7109.27ms |
Before optimization | After optimization | |
---|---|---|
Reading images to momery | 446.03ms | 144.59ms |
Initial Process(Memory allocation) | 42.90ms | 86.68ms |
Convert int Matrix to double | 1194.90ms | 566.31ms |
SVD calculation | 0.33ms | 0.334ms |
Large matrix multipulation | 55432.48ms | 21.14ms |
Total time | 57116.82ms | 1081.02ms |
Before optimization | After optimization | |
---|---|---|
Reading images to momery | 161.47ms | 144.59ms |
Initial Process(Memory allocation) | 6.94ms | 12.94ms |
Convert int Matrix to double | 167.85ms | 86.81ms |
SVD calculation | 0.30ms | 0.29ms |
Large matrix multipulation | 7601.55ms | 2.89ms |
Total time | 7938.30ms | 247.61ms |
- Install app RTIScan(iphone6 test runs without problems)
- Prepare 36 photos with different angles
- Put the photo in the iphone
- Run the app
- Import pictures from phone album
- Adjust the black shadow to coincide with the physical ball in the photo
- Touch Locate Light,
- Touch Process, Waiting for the program to process the picture
- Touch render, Enter the rendering interface
- You can simulate the movement of the light source by moving your finger on the screen.
screenRecording:
36 pictures‘s size: 889*684
720p version demo in youtube
paper:
T. Malzbender, D. Gelb and H. Wolters, "Polynomial Texture Maps", Proc. ACM SIGGRAPH, pp. 519-528, 2001.
Code:
before optimization:PTM_Scan_iOS