process
|-- input
|-- 0.jpg
|-- 1.jpg
...
|-- output
|-- template
|-- template.jpg
The sample dataset is here.
Use the template matching method matchTemplate
in opencv
to intercept the roi
.Before and after comparison is as follows๏ผ
python image.py --image_dir ./process/input --output_dir ./process/output --template ./process/template/template.jpg
Check out this blog.
python img2poses.py --scenedir ./result
After running the commands above, a sparse point cloud is saved in result/sparse_points.ply
.
Use meshlab to define roi
.Refer to this blog.
Save it as result/sparse_points_interest.ply
.
python gen_cameras.py
Then the preprocessed data can be found in result/preprocessed
.
Success! ๐ ๐ ๐