Changes between Version 41 and Version 42 of GsocDSMGenerationToolForOSSIM


Ignore:
Timestamp:
May 29, 2015, 3:27:18 AM (9 years ago)
Author:
martidi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GsocDSMGenerationToolForOSSIM

    v41 v42  
    5555
    5656WHAT I GET DONE THIS WEEK:
     57
     58I have created the Eclipse project for OSSIM to manage all the source code.
     59
     60I have set up the ossim preferences file with the elevation information to try to solve the image loading problems and in order to prepare the proper files to begin using the orthorectification tool (ossim-orthoigen).
     61
     62I have studied the code of the ossim-orthoigen tool and of the associated class ossimOrthoIGen in order to understand their implementation.
     63
     64I have begun to write the ossim-epipolar app that is based on ossim-orthoigen tool and on the ossim OpenCv plugin. The algorithm for the quasi-epipolar images generation consists of two main steps: first it is necessary to project the raw images on an horizontal plane at a median height of the area of interest and subsequently it is required to search automatically Tie points to minimize the residual parallax error between the two images.
     65
     66
     67[[BR]]
     68WHAT I PLAN ON DOING NEXT WEEK:
     69
     70To solve the problem on which I am stuck.
     71
     72To continue the ossim-epipolar tool implementation.
     73
     74To verify and assess the automatic Tie Points collection.
     75
     76To test and control implementation efficacy – discuss results with mentors.
     77
     78
     79[[BR]]
     80SOMETHING ON WHICH I AM BLOCKED:
     81
     82Despite I have worked on the preferences file and on image histogram remapping I still have problems in loading some particular images (e.g. images taken from IKONOS2 and Geoeye). 
     83
     84
     85
     86
     87=== Weekly Report 3 (2014, June 06) ===
     88
     89'''Week 3:'''
     90
     91WHAT I GET DONE THIS WEEK:
     92
     93As a result of a discussion with mentors I have discarded the ossim-orthoigen tool as a reference for my ossim-epipolar app and turned towards ossim-chipper, a newer and clearer one.
     94
     95I have begun to write the ossim-epipolar app editing the ossimSrtmSupportData class, in order to compute the median height and the standard deviation of SRTM values, parameters that are required for the automatic generation of the quasi-epipolar images.
     96
     97I have upload the drafted ossim-epipolar app and the related code modified (ossimSrtmSupportData) on the repository (https://github.com/martidi/OSSIM-GSoC-2014).
     98
     99[[BR]]
     100WHAT I PLAN ON DOING NEXT WEEK:
     101
     102To solve the problem on which I am stuck.
     103
     104To continue working on epipolar images generation
     105
     106To assess the automatic Tie Points identification.
     107
     108To begin the implementation of the OpenCV SIFT procedure for automatic TPs generation
     109
     110To test and control implementation efficacy – discuss results with mentors.
     111
     112[[BR]]
     113SOMETHING ON WHICH I AM BLOCKED:
     114
     115I'm trying to use an ASCII DEM file as input for the elevation data, but I have had some issues with it.
     116
     117
     118
     119
     120=== Weekly Report 4 (2014, June 13) ===
     121
     122'''Week 4:'''
     123
     124WHAT I GET DONE THIS WEEK:
     125
     126Considering that, as well known the epipolar rectification is a complex topic, I have deeply studied how to implement it (goal of the mid-term). As a result of a discussion with mentors, I have also evaluate alternative approaches for the DSM extraction, such as Vertical Line Locus feature-based type approach, Vertical Line Locus based on a coarse external DSM (such as SRTM or ASTER) and integration of Disparity Map and Non-Disparity Map approaches.
     127
     128As a result of a discussion with mentors, I have discarded the idea of using Open-CV SIFT procedure for automatic TPs generation since it cannot be included or used as part of a public distribution, and I have chosen another free Open Source detector (Orb-Feature-Detector). Therefore I have wrote a procedure for the automatic TPs detection with Orb-Feature-Detector using the implementation available in the Open-CV library and I have tested it on an Ortho Ready Geo-Eye stereo-pair: I have calculated the x and y parallax errors, and I have seen that these images are basically quasi-epipolar as already projected by provider on a constant ellipsoidical height.
     129
     130[[Image(TP matched_screenshot_12.06.2014.jpg)]]
     131
     132
     133Furthermore I have wrote a procedure for the implementation of the Semi Global Matching algorithm and I have tested it on the above-mentioned images generating the following Disparity Map.
     134
     135[[Image(Disparity of SGM_screenshot_12.06.2014.jpg)]]
     136
     137I have upload the code produced on the Git repository (https://github.com/martidi/OSSIM-GSoC-2014).
     138
     139[[BR]]
     140WHAT I PLAN ON DOING NEXT WEEK:
     141
     142To solve the problem on which I am stuck.
     143
     144To continue working on epipolar images generation and Disparity Map creation.
     145
     146To test and control implementation efficacy – discuss results with mentors.
     147
     148[[BR]]
     149SOMETHING ON WHICH I AM BLOCKED:
     150
     151I am having some issues in the integration between OpenCV algorithms and OSSIM Apps: I have found some compiling problems using some Open-CV basic class (i.e. cv::Mat, cv::imread, etc.). Probably I have not configured rightly the Cmake-List-File.
     152
     153
     154
     155=== Weekly Report 5 (2014, June 20) ===
     156
     157'''Week 5:'''
     158
     159WHAT I GET DONE THIS WEEK:
     160
     161As a result of a talk with mentors, I have changed the procedure I have thought for the orthorectification on a plane: instead of orthorectify on a plane using the OSSIM orthorectification class, I have thought to impose a fixed height and use it when SRTM data is not available. For this reason I have set up in the preference file a default height above ellipsoid, for use when no elevation data is present. In this way raw images are projected automatically at this height.
     162
     163
     164I have created the ortho function (ortho.cpp and ortho.h) and I have implemented it in the ossim-epipolar app that I'm designing, in order to be able to call the function easier for e.g. ortorectify more than an image per time.
     165
     166I have detailed the procedure I will implement for DSM generation.
     167
     168I have continued improving the procedure for the implementation of the Semi Global Matching algorithm: for every raw image I have computed the SGM in i and j directions both in negative and positive, so to obtain 4 Disparity Maps to compare. What I want to do is to mediate the 4 different DSMs, that it is possible to achieve from the Disparity Maps, in order to obtain a more robust result.
     169
     170I have drafted the mid-term evaluation report.
     171
     172[[BR]]
     173WHAT I PLAN ON DOING NEXT WEEK:
     174
     175To solve the problem on which I am stuck.
     176
     177To finalize the mid-term evaluation report.
     178
     179To continue working on epipolar images generation and to improve Disparity Map creation.
     180
     181To test and control implementation efficacy – discuss results with mentors.
     182
     183[[BR]]
     184SOMETHING ON WHICH I AM BLOCKED:
     185
     186I am having some issues with automatic TPs collection and orthorectification on particular imagery I am testing.
     187
     188=== Weekly Report 6 (2014, June 27) ===
     189
     190'''Week 6:'''
     191
     192WHAT I GET DONE THIS WEEK:
     193
     194Generally speaking, I've done some tests in order to find a better solution for the quasi-epipolar image generation.
     195
     196I have solved the issue I had with automatic TPs collection and orthorectification on particular morphologically relevant imagery I am testing.
     197
     198I have continued to improve the Semi Global Matching procedure implemented, such in a way that it could be used for any kind of images; for this reason I have used a stereo pair with a relevant mountain morphology in which it is achieved an height difference bigger than 1500 m. As expected, it results that a simple shift it is not sufficient to achieve an epipolar geometry and, following the paper by Wang et al. about epipolar resampling, I am implementing the transformation necessary for bring the projected images (actually on a constant ellipsoidical height) in the epipolar geometry.
     199
     200I have solved some little issues related to SGM implementation (Disparity Map visualization and shift refinement) and I have improved the Disparity Map resulting from the same GeoEye stereo pair used for the first tests (see attached).
     201
     202[[Image(SGM Disparity.jpg)]]
     203
     204[[BR]]
     205WHAT I PLAN ON DOING NEXT WEEK:
     206
     207To solve the problem on which I am stuck.
     208
     209To continue working on epipolar images generation and to integrate the developed code in an ossim app.
     210
     211To test and control implementation efficacy – discuss results with mentors.
     212
     213[[BR]]
     214SOMETHING ON WHICH I AM BLOCKED:
     215
     216I’m having some difficulties in finding the correct image transformation for epipolar generation. I have seen that using the affine transformation (estimated with the opencv api) the disparity between the objects is not well preserved. Actually, I think that I found a possible solution estimating a roto-translation without scale.
     217(https://github.com/martidi/OSSIM-GSoC-2014_draft/tree/master/TEST_AFFINE).
     218
     219
     220
     221=== Weekly Report 7 (2014, July 04) ===
     222
     223'''Week 7:'''
     224
     225WHAT I GET DONE THIS WEEK:
     226
     227I have solved the issue I had with OpenCV and OSSIM integration: I have created a class in which I have defined some OpenCV functions and I have included it in the plugIn generated. Then I have linked the library from the class to the plugIn above mentioned [target_link_libraries (ossim-opencv ${requiredLibs} ossimopencv_plugin)]; in this way I am able to use OpenCV algorithms inside the plugIn.
     228
     229I have continued to improve both Epipolar image generation and the Semi Global Matching algorithm implementation.
     230
     231[[BR]]
     232WHAT I PLAN ON DOING NEXT WEEK:
     233
     234To solve the problem on which I am stuck.
     235
     236To continue working on epipolar images generation and to refine the SGM algorithm implementation.
     237
     238To test and control implementation efficacy – discuss results with mentors.
     239
     240[[BR]]
     241SOMETHING ON WHICH I AM BLOCKED:
     242
     243I’m keeping on having some difficulties in finding the correct image transformation for epipolar generation. I have seen that using the affine transformation (estimated with the OpenCV api) the disparity between the objects is not well preserved.
     244
     245
     246[[BR]]
     247'''TIMELINE:'''
     248
     249Below is detailed a reviewed timeline, changed in agreement with the mentoring organization.
     250
     251Timeline has slightly changed with respect to the foreseen, since I'm having some problems with epipolar image generation; as a matter of fact I’m having some difficulties in finding the correct image transformation for epipolar generation. I have seen that using the affine transformation (estimated with the OpenCV api) the disparity between the objects is not well preserved.
     252Furthermore as regards to the Semi Global Matching algorithm, it is scheduled just a refinement since the algorithm for Disparity Map creation has been already tested.
     253
     254[[BR]]
     255'''Documentation and Code report:'''
     256
     257- Documenting work advancements every week on wiki page (this include code documentation)
     258
     259- Updating repository regularly
     260
     261- Weekly reporting about the task accomplished and what I plan doing next week
     262
     263[[BR]]
     264'''June 28 - July 25:'''
     265
     266- Refine Epipolar image generation
     267
     268- Refine Semi Global Matching algorithm implementation
     269
     270- Test and control implementation reliability and efficacy - discuss results with mentor(s)
     271
     272[[BR]]
     273'''July 26 - August 8:'''
     274
     275- Implement the conversion from the disparity map into a geocoded DSM
     276
     277- Implement interpolation algorithm for areas not previously matched
     278
     279- Test and control implementation efficacy - discuss results with mentor(s)
     280
     281- Handle unpredictable delays
     282
     283[[BR]]
     284'''August 11 - August 18:'''
     285
     286- Testing and debugging code – Bugs fixing and code review
     287
     288- Refine documentation - exchange opinions with mentor(s) 
     289
     290'''AUGUST 22th FINAL EVALUATION DEADLINE'''
     291
     292
     293=== Weekly Report 8 (2014, July 11) ===
     294
     295'''Week 8:'''
     296
     297WHAT I GET DONE THIS WEEK:
     298
     299I have created the OpenCVtestclass, in which I have begun to put all the OpenCV functions I need for my ossim-epipolar plugin (https://github.com/martidi/OSSIM-GSoC-2014/tree/master/plugIn).
     300
     301I have continued to work on the epipolar-plugIn in order to unify the orthophoto generation process by the ossim-chipper tool with the subsequent TPs automatic extraction and the ulterior phase for the epipolar images generation, for which I will use the OpenCVtestclass.
     302
     303I have continued to improve both Epipolar image generation and the Semi Global Matching algorithm implementation.
     304
     305[[BR]]
     306WHAT I PLAN ON DOING NEXT WEEK:
     307
     308To solve the problem on which I am stuck.
     309
     310To continue working on the ossim-epipolar plugIn.
     311
     312To refine the epipolar images generation.
     313
     314To test and control implementation efficacy – discuss results with mentors.
     315
     316[[BR]]
     317SOMETHING ON WHICH I AM BLOCKED:
     318
     319I'm still working on the theoretical problem for finding the correct image transformation for epipolar images generation.
     320
     321
     322
     323=== Weekly Report 9 (2014, July 18) ===
     324
     325'''Week 9:'''
     326
     327WHAT I GET DONE THIS WEEK:
     328
     329I have improved the OpenCVtestclass, in which I'm creating the various methods I need for my ossim-epipolar plugin (https://github.com/martidi/OSSIM-GSoC-2014/tree/master/OSSIM_DEV_HOME/ossim_plugins/opencv).
     330
     331I have continued to work on the epipolar-plugIn in order to unify the orthophoto generation process by the ossim-chipper tool with the subsequent TPs automatic extraction and the ulterior phase for the epipolar images generation, for which I will use the OpenCVtestclass.
     332
     333[[BR]]
     334WHAT I PLAN ON DOING NEXT WEEK:
     335
     336To solve the problem on which I am stuck.
     337
     338To create and implement the Disparity Map class for disparity map generation.
     339
     340To complete the epipolar images generation plugIn.
     341
     342To test and control implementation efficacy – discuss results with mentors.
     343
     344[[BR]]
     345SOMETHING ON WHICH I AM BLOCKED:
     346
     347I'm still working on the theoretical problem for finding the correct image transformation for epipolar images generation.
     348
     349
     350
     351=== Weekly Report 10 (2014, July 25) ===
     352
     353'''Week 10:'''
     354
     355WHAT I GET DONE THIS WEEK:
     356
     357I have found and implemented a new image transformation model for epipolar generation: I have realized that nor an affine transformation neither a pure rototranslation without scale were sufficient to find a good epipolarity. Therefore this week I wrote a rigorous model to estimate a transformation on the generated TPs, which is able to return images with null parallax error and whatever disparity on the single TP.
     358It still remains some little issue that seems to disappear once outliers in TPs are scratched out.
     359
     360I have modified the code in order to be able to use a 16bit .tif image (and not a compressed one) and not to loose the radiometric information of the raw images: as a matter of fact I noticed that by deteriorating the radiometric information the SGM algorithm solution was compromised, and therefore tha Disparity Map was not properly generated.
     361
     362I have solved some minor warning in the ossim-opencv app building, related to “deprecated conversion” and “unappropriate comparison” in the code.
     363
     364I have created two classes:
     365
     366- TP generator
     367
     368- Disparity Map
     369
     370and implemented it into the app. To do it I have reorganized the app structure.
     371
     372I have implemented the Disparity Map class for disparity map generation.
     373
     374I have realized that one of the major problem in finding the correct image transformation for epipolar images generation, was due to the wrong median computation in Boost library accumulators, that I have used to implement the transformation computation: this fact caused me a lot of misunderstanding in results interpretation. I'm implementing a new median algorithm.
     375
     376[[BR]]
     377WHAT I PLAN ON DOING NEXT WEEK:
     378
     379To solve the problem on which I am stuck.
     380
     381To test the new rigorous model for epipolar generation and upload the mathematical model.
     382
     383To begin thinking how to implement the conversion from the disparity map into a geocoded DSM.
     384
     385To test and control implementation efficacy – discuss results with mentors.
     386
     387[[BR]]
     388SOMETHING ON WHICH I AM BLOCKED:
     389
     390---
     391
     392
     393=== Weekly Report 11 (2014, August 1) ===
     394
     395'''Week 11:'''
     396
     397WHAT I GET DONE THIS WEEK:
     398
     399I have tested the rigorous model (see attached) for epipolar generation on various type of images.
     400
     401[[Image(Rigorous_model.pdf)]]
     402
     403I have solved the issue related to outliers in TPs introducing a 3 sigma test, a well-known statistical rule used to eliminate outliers in a population.
     404
     405[[BR]]
     406WHAT I PLAN ON DOING NEXT WEEK:
     407
     408To solve the problem on which I am stuck.
     409
     410To modify some SGM thresholds in order to adapt the algorithm on the basis of  % of TPs found.
     411
     412To continue thinking how to implement the conversion from the disparity map into a geocoded DSM.
     413
     414To test and control implementation efficacy – discuss results with mentors.
     415
     416[[BR]]
     417SOMETHING ON WHICH I AM BLOCKED:
     418
     419---
     420
     421
     422=== Weekly Report 12 (2014, August 8) ===
     423
     424'''Week 12:'''
     425
     426WHAT I GET DONE THIS WEEK:
     427
     428Beside to the 3 sigma test, I have implemented a preliminary screening  for the points found with the Orb Feature Detector: the filter selects the better 2% of TPs which have the highest values of Brief descriptors.
     429
     430I have tested the 3 sigma test implemented last week and, as can be seen from the images attached, it works well for outliers removal.
     431
     432[[Image(TP matched_no_filtered.jpg)]]
     433[[Image(TP matched_filtered.jpg)]]
     434
     435I have solved the “radiometric” issue due to the conversion from raw images to opencv images used for the Disparity Map creation. I have noticed that different image equalization strongly change the SGM result. 
     436
     437Moreover, I have improved the Disparity Map generated (see attached) by manually refining the SGM parameters (i.e. ndisparities and minDisparities values).
     438
     439[[Image(SGM Disparity.2.jpg)]]
     440
     441I have uploaded the updated code in the repository (https://github.com/martidi/OSSIM-GSoC-2014).
     442
     443[[BR]]
     444WHAT I PLAN ON DOING NEXT WEEK:
     445
     446To investigate the influence that the change of the SGM parameters have on the quality of the Disparity Map generated.
     447
     448To automate the correct search of SGM parameters in relation to the different input images.
     449
     450To work on the conversion from the disparity map into a geocoded DSM.
     451
     452To begin "scrubbing" the code for the final version.
     453
     454To begin writing the documentation on how to compile and test the program.
     455
     456To test and control implementation efficacy – discuss results with mentors.
     457
     458[[BR]]
     459SOMETHING ON WHICH I AM BLOCKED:
     460
     461---
     462
     463
     464=== Weekly Report 13 (2014, August 15) ===
     465
     466
     467'''Week 13:'''
     468
     469WHAT I GET DONE THIS WEEK:
     470
     471I have eventually finished my plug-in!
     472
     473I have selected the optimized parameters for the SGM algorithm in order to generate a good-quality Disparity Map.
     474
     475I have added the possibility to orthorectify the images using SRTM data instead of projecting on an horizontal plane.
     476
     477I have implemented the conversion from the Disparity Map into a geocoded DSM: the “local” Disparity Map obtained from the Disparity Map class is converted from pixels to meters, then summed up to the height of the surface used for the orthorectification. Finally I have geocoded the DSM obtained in a standard geotiff format, thanks to the ossim Image File Writer function.
     478
     479I have begun “scrubbing” the code for the final version.
     480
     481I have begun writing the final documentation that will be finished before the pencil-down day.
     482
     483I have uploaded the updated code and the compiling instruction in the repository (https://github.com/martidi/OSSIM-GSoC-2014).
     484
     485[[BR]]
     486WHAT I PLAN ON DOING IN THE NEXT FUTURE:
     487
     488As a possible development of this project, it could be feasible to refine the DSM extraction procedure adopting a multi-resolution pyramidal approach. I would like to develop an algorithm based on a coarse-to-fine structure: it can be adopted to obtain several Disparity Map at different resolutions that can be combined using a wavelet transformation in order to refine DSMs generation. This kind of strategy have particular relevance for DSM extraction in areas characterized by complex terrain morphology (i.e. dense urban areas, mountain regions).
     489
     490
     491=== Final Report (2014, August 18) ===
     492
     493I have finished the code "scrubbing". 
     494
     495At the following link can be found the final documentation of the Ossim developed PlugIn for the DSM extraction.
     496
     497[https://www.dropbox.com/s/cg2xgubnowheh9e/GSoC_DiRita_FinalDocumentation.pdf?dl=0]