The SSRLCV utilities are meant to help with debugging and data analysis of the SSRLCV output. This repository does not include the SSRLCV library, the SSRLCV is maintained at the SSRLCV gitlab page and mirrored on github.
The programs are broken roughly into IO and visualization. IO helps with generating test cases or analyzing test data. Visualization helps with graphing and viewing test data.
- MeshLab - Critical for viewing the results of SSRLCV.
- CloudCompare - Useful for comparing ground truth models, the ICP algorithm within CC is great for this.
- Python 3.*
- Numpy
- Matplotlib
- plyfile
This program performs simple point cloud modification. It scales, rotates, or translates an ASCII encoded PLY file.
Run the program with
python3 file.ply modPointCloud.py scale rotate_x rotate_y rotate_z translate_x translate_y translate_z
Where the arguments are:
file.ply
-- the PLY file to modifyscale
-- scales all points in point cloud by this amountrotate_x
-- in degrees, rotates all points around x axis this amountrotate_y
-- in degrees, rotates all points around y axis this amountrotate_z
-- in degrees, rotates all points around z axis this amounttranslate_x
-- translates all points on x axis this amounttranslate_y
-- translates all points on y axis this amounttranslate_z
-- translates all points on z axis this amount
The program outputs a PLY file titled modified.ply
This program converts the anatomy of SIFT "raw" matches into a format that can be easily viewed or scripted with. This is written in python 2.7 and is DEPRECATED; it should be converted into python3 and updated to output an encoded unity struct; it is only included because of its potential usefulness for research.
to generate the anatomy of SIFT matches, view the SSRL mirror of the repo for details. The following is the expected use:
./bin/sift_cli images/everest01.png > p01.kp; ./bin/sift_cli images/everest02.png > p02.kp; ./bin/match_cli p01.kp p02.kp > matches_raw.txt
This program generates position and orientation input for testing the camera parameters of a pushbroom scanner. The program is currently incomplete and needs additional contributions
Run the program with
python3 scan_orbit_camera_gen.py altitude stepAngle numSteps
Where the arguments are:
altitude
-- the altitude of the circular orbit in kmscanDistance
-- the distance on earth to scan, in kmnumImages
-- the number of images locations to produce during the scan
Given a particular reference point, this program determines if there are more points on the left of an input csv file. The input data is interpreted as unordered singular values in a histogram.
Run the program with:
python3 sumcut.py file/path/to/file.csv cutoff \n
Where the arguments are:
file.csv
-- a path to a csv file that you want to make a histogram ofcutoff number
-- a number which represent the cutoff value to sum either side of
This program generates perfect matches on the image planes of various cameras. It can be used to test if a conversion from the image plane to the real world coordinate system is working correctly. The test points are output as c++ / CUDA code which can be copy / pasted into a test program.
simply run the program:
python3 test_point_generator.py
Additions to give more arguments are parameters are welcome
Perhaps the most useful util program for testing. This program generates example camera positions and orientations which can be used to test 3D reconstructions, and to make camera parameters for blenderGIS generated test imagery.
This program also outputs slew rates for the given inputs. These slew rates are given from image to image and not as a whole.
Run the program with:
python3 track_orbit_camera_gen.py altitude stepAngle numSteps
Where the arguments are:
altitude
-- the altitude of the circular orbit in kmstepAngle
-- the off angle from the point track normalnumSteps
-- the numbers of angle steps to take
An example is to take 3 images at 400km with a 15 degree off angle for each is:
python3 track_orbit_camera_gen.py 400 15 3
The script produces some values that are usable for pointing and controls bounding. The script will output the following values (in order)
orbit angle
(rad): The angle a singlestepAngle
defined above makes with the center of mass of the orbiting bodyinput angle
(rad): The given input anglestepAngle
converted to radiansorbit arclen
(km): The arc length of the orbit pathground arclen
(km): The arc length of the ground pathvelocity
(km/s): The orbital velocity at thealtitude
slew time
(s): The total time it take to slew between one set of images. To get a total slew time multiply this bynumSteps
defined above
The script also produces slew rate values between one set of images.
Tracking Slews
: These slews are tracking (by pointing directly at) an arbitrary point on the surface of the orbiting bodyslew rate
(rad/s): the slew rate between one set of imagesslew rate
(deg/s): the slew rate between one set of images
Nadir Slews
:slew rate
(rad/s): the slew rate between one set of imagesslew rate
(deg/s): the slew rate between one set of images
This program accepts a list of values and plots them in that order. The input values must be an ASCII encoded csv file
Run the program with:
python3 2dplotcsv.py file/path/to/file.csv xlabel ylabel
Where the arguments are:
file.csv
-- a path to a csv file that you want to graphxlabel
-- a string to label the x axisylabel
-- a string to label the y axis
This program plots values that are output during a tests of bundle adjustment. This helps a programmer view convergences to an optima, how long these convergences take, and when they fail. To have the necessary outputs for graphing, debug needs to be enabled within bundle adjustment. A graph of the optimizations is produced as an output.
The script is graphing multiple csv files what are of the form $$$Errors.csv
where the ###
indicates and integer run number of a specific bundle adjustment test.
Run the program with:
python3 bundle_adjustment_tests_viewer.py file/path/to/ba/tests/ badRunCut OptimalVal
Where the arguments are:
directoryPath
-- a directory pathbadRunCut
-- A value representing a bad runOptimalVal
-- A value representing the optimal value
Used in disparity testing, this script is now deprecated. It could still be used to generate example disparities.
This program draws arrows that represent vectors over each pixel in the input image. The input image should be small and ideally square. An input image of 25 by 25 pixels is the largest size that should realistically be used. This should be used to view example HOGS or SIFT descriptors.
Run the program with:
python3 feature_vector_plot.py /path/to/image
Where the arguments are:
imagePath
-- a directory path including the image
This allows a programmer to view the state transitions, voltage, current, and power draw over time as an SSRLCV pipeline is executed. These values are graphed if enabled. This is incredibly useful for power budget related things.
The program reads the ssrlcv.log
file which leaves tags for state, power, voltage, and current. This could be extended to graph thermal output as well. The output is visually graphed.
Run the program with:
python3 logGrapher.py file/path/to/log.csv enableStates enableVoltage enableCurrent enablePower
Where the arguments are:
file.csv
-- a path to the log fileenableStates
-- Graph the state transitions of the pipelineenableVoltage
-- Graph the voltage of the system over timeenableCurrent
-- Graph the voltage of the system over timeenablePower
-- Graph the wattage of the system over time
This program returns accurate runtimes for states of the pipeline. This is used to measure how long feature detection, extraction, and matching takes. It is used to measure how long triangulation, filtering, and bundle adjustment take.
Run the program with:
python3 logTimes.py file/path/to/log.csv
Where the arguments are:
file.csv
-- a path to the log file
The program outputs the following precise timing of SSRLCV:
Total Runtime
: The total time taken to run the pipeline in msSeed Image Time
: The time taken to generate seed image features in msFeature Gen Time
: The time taken to generate features in msMatching Time
: The time taken to match features in msTriangulate Time
: The time taken to triangulate in msFiltering Time
: The time taken to filter in msBundle Adj Time
: The time taken in bundle adjustment in ms
This program visualizes matched points between images. It shows the location on one image where the feature is located and draws a line to the feature on the corresponding image.
Run the program with:
python2 match_plotter.py -m matches -1 image1 -2 image2
Where the arguments are:
-m matches
the path and file location of a CSV encoded matches file-1 image1
the path and file location of image 1 in the matched set-2 image2
the path and file location of image 2 in the matched set
TODO
TODO
This program should be used with the generateSensitivityFunctions()
method in SSRLCV. This allows the programmer to analyze the practical objective functions. Hopefully, the programmer will notice these objective functions follow a specific pattern or are differentiable.
The necessary CSV files are generated within the generateSensitivityFunctions()
method, the partialFilename
is specified there. 6 graphs are generated.
Run the program with:
python3 plot-sensitivity.py file/path/to/partialFilename xlabel ylabel
Where the arguments are:
partialFilename
-- a path with a PARTIAL filename, which does not inclde the _Delta######.csv partxlabel
-- a string to label the x axisylabel
-- a string to label the y axis
This method plots paired CSV encoded data. Each value in the CSV is encoded as x,y\n
with a newline character after each entry.
Run the program with:
python3 plot-x-y.py file/path/to/file.csv xlabel ylabel
Where the arguments are:
file.csv
-- a path to a csv file that you want to graphxlabel
-- a string to label the x axisylabel
-- a string to label the y axis
This program will plot CSV data to be seen as a histogram. The program takes a set of CSV encoded values (all on the same line) and plots them as desired.
Run the program with:
python3 plotHistogram.py file/path/to/file.csv bin# xlabel ylabel
Where the arguments are:
file.csv
-- a path to a csv file that you want to make a histogram of
bin#
-- an integer representing the number of bars you want in the histogram
xlabel
-- a string to label the x axis
ylabel
-- a string to label the y axis
xlimit
-- the x limit of the chart, if 0 there will be no limit