Commit 74b9ea6e authored by Vincent POLLET's avatar Vincent POLLET
Browse files

Merge branch 'idiap_opencv' into 'master'

Updates for bob's 8.0

See merge request !14
parents 1602c2ec 40d9fc1b
Pipeline #47384 passed with stages
in 7 minutes and 11 seconds
......@@ -3,7 +3,6 @@ import cv2 as cv
import json
import bob.io.base
import bob.ip.color
......
......@@ -4,7 +4,9 @@
import numpy as np
import cv2 as cv
import bob.io.base
import datetime
import bob.io.image
import bob.ip.color
from .camera import Camera, CameraPair
......@@ -21,7 +23,7 @@ def stereo_match(img_l, img_r, camera_pair, stereo_parameters=StereoParameters()
grayscale and then rectifying them using the :class:`~bob.ip.stereo.CameraPair`
object, if requested a 2x downscaling is also performed. Image disparity is then
computed accordingly to the algorithm and parameters described in the
:class:`~bob.ip.stereo.StereoParameter` object, if requested in these options voids
:class:`~bob.ip.stereo.StereoParameters` object, if requested in these options voids
in the resulting disparity map are filled using an in-painting algorithm.
Finally, the disparity map is converted to a 3D map using geometric
information from the :class:`~bob.ip.stereo.CameraPair` object.
......@@ -34,7 +36,7 @@ def stereo_match(img_l, img_r, camera_pair, stereo_parameters=StereoParameters()
Right image.
camera_pair : :obj:`~bob.ip.stereo.CameraPair`
Camera pair object containing geometric information of the cameras.
stereo_parameters: :obj:`~bob.ip.stereo.StereoParameter`
stereo_parameters: :obj:`~bob.ip.stereo.StereoParameters`
Parameters for the stereo reconstruction algorithm.
Returns
......@@ -281,8 +283,8 @@ def main():
args = parse_arguments()
im_left = bob.io.base.load(args.left_image)
im_right = bob.io.base.load(args.right_image)
im_left = bob.io.image.load(args.left_image)
im_right = bob.io.image.load(args.right_image)
im_out = stereo_match(im_left, img_right, CameraPair())
......@@ -292,7 +294,7 @@ def main():
im_out[i,:,:] -= im_out[i,:,:].min()
im_out[i,:,:] *= (255.0/im_out[i,:,:].max())
bob.io.base.save(im_out.astype('uint8'), args.output_image)
bob.io.image.save(im_out.astype('uint8'), args.output_image)
#==============================================================================
......
......@@ -25,21 +25,20 @@ requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- pkg-config {{ pkg_config }}
- cmake {{ cmake }}
host:
- python {{ python }}
- setuptools {{ setuptools }}
- bob.extension
- numpy {{ numpy }}
- pybind11 {{ pybind11 }}
- opencv
- bob.io.base
- opencv {{ opencv }}
- bob.io.image
- bob.ip.color
run:
- {{ pin_compatible('python') }}
- {{ pin_compatible('setuptools') }}
- {{ pin_compatible('pybind11') }}
- {{ pin_compatible('numpy') }}
- {{ pin_compatible('opencv') }}
test:
imports:
......
.. vim: set fileencoding=utf-8 :
.. Tue 09 Jun 2020 13:16:45 CET
============
Python API
============
==============================
Python API for bob.ip.stereo
==============================
Package Documentation
---------------------
......
......@@ -7,7 +7,7 @@ import pkg_resources
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '1.3'
needs_sphinx = '3.2'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
......@@ -216,11 +216,11 @@ rst_epilog = """
# Default processing flags for sphinx
autoclass_content = 'class'
autodoc_member_order = 'bysource'
autodoc_default_flags = [
'members',
'undoc-members',
'show-inheritance',
]
autodoc_default_options = {
'members': True,
'undoc-members': True,
'show-inheritance': True
}
# For inter-documentation mapping:
......
setuptools
bob.extension
numpy
pybind11
opencv
bob.io.base
bob.ip.color
\ No newline at end of file
# opencv We need opencv, but the opencv package is broken and can't be installed with pip. Install it with conda.
bob.io.image
bob.ip.color
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment