-
Notifications
You must be signed in to change notification settings - Fork 1
Dev Blog
Everything before 23/02/18 not detailed. Everything after is logged below.
So I'm terrible at updating this...
I've used all the work from I2lTEST4 to create imagesToArray.
This script opens a directory, iterates through the images stored inside (skipping those which don't fit the format) while extracting the camera and image number data from the name.
It then uses the cam number to in the future do camera distortion corrections and the image number to calculate the z value. Then for each image it extracts the xy points, appends the z and writes to an array of all points (allPoints
).
Because two cameras are used, each will capture the xy planes at different distortions depending on the distance from lens. So if a plane is captured from 2 cameras at the same time, 2 sets of data exist which are not going to be the same, even allowing for lens correction.
As such, one needs removing and so a duplicate removal function was created that only removes values within a certain tolerance of the original.
Also, it prints out status feedback along the way!
ImagesToArray now has rudimentary xy lens correction. This still needs work as is unexpectedly off the mark.
ImagesToArray has had duplicate deletion time reduced by 80%.
Now have 2 versions of ArrayToSTL TEST. 1st plots a MatLib 3d plot. 2nd outputs a (poor) STL. This low quality is due to three reasons:
-
- scipy.spatial.convexHull tessellates the outermost points necessary such that all points are within this range. So it can't do concaves (which is problematic anyway). There's also some currently inexplicable point being created off to one side of the model that doesn't have any clear cause. This is really messing up the data. I need to look more at the poisson reconstruction which is meant to be a more standard STL constructor.
-
- For some reason every other triangle exported is flipped. this is corrected by flipping normals post-export but is a pain
-
- The lens correction isn't right yet, so the shape printed is not true to the original test model.
Contact me if you're curious or want to help, it's much appreciated :)