#include <imageDirectoryReader.hpp>
ImageDirectoryReader is an abstract class to extract frames from a image directory. Its interface imitates the cv::VideoCapture class, so it can be used quite similarly to the cv::VideoCapture class. Thus, it is quite similar to VideoReader and WebcamReader.
Definition at line 14 of file imageDirectoryReader.hpp.
◆ ImageDirectoryReader()
op::ImageDirectoryReader::ImageDirectoryReader |
( |
const std::string & |
imageDirectoryPath, |
|
|
const std::string & |
cameraParameterPath = "" , |
|
|
const bool |
undistortImage = false , |
|
|
const int |
numberViews = -1 |
|
) |
| |
|
explicit |
Constructor of ImageDirectoryReader. It sets the image directory path from which the images will be loaded and generates a std::vector<std::string> with the list of images on that directory.
- Parameters
-
imageDirectoryPath | const std::string parameter with the folder path containing the images. |
cameraParameterPath | const std::string parameter with the folder path containing the camera parameters (only required if imageDirectorystereo > 1). |
numberViews | const int parameter with the number of images per iteration (>1 would represent stereo processing). |
◆ ~ImageDirectoryReader()
virtual op::ImageDirectoryReader::~ImageDirectoryReader |
( |
| ) |
|
|
virtual |
◆ get()
double op::ImageDirectoryReader::get |
( |
const int |
capProperty | ) |
|
|
virtual |
This function is a wrapper of cv::VideoCapture::get. It allows getting different properties of the Producer (fps, width, height, etc.). See the OpenCV documentation for all the available properties.
- Parameters
-
capProperty | int indicating the property to be modified. |
- Returns
- double returning the property value.
Implements op::Producer.
◆ getNextFrameName()
std::string op::ImageDirectoryReader::getNextFrameName |
( |
| ) |
|
|
virtual |
This function returns a unique frame name (e.g., the frame number for video, the frame counter for webcam, the image name for image directory reader, etc.).
- Returns
- std::string with an unique frame name.
Implements op::Producer.
◆ isOpened()
bool op::ImageDirectoryReader::isOpened |
( |
| ) |
const |
|
inlinevirtual |
◆ release()
void op::ImageDirectoryReader::release |
( |
| ) |
|
|
inlinevirtual |
◆ set()
void op::ImageDirectoryReader::set |
( |
const int |
capProperty, |
|
|
const double |
value |
|
) |
| |
|
virtual |
This function is a wrapper of cv::VideoCapture::set. It allows setting different properties of the Producer (fps, width, height, etc.). See the OpenCV documentation for all the available properties.
- Parameters
-
capProperty | int indicating the property to be modified. |
value | double indicating the new value to be assigned. |
Implements op::Producer.
The documentation for this class was generated from the following file: