JeVois
1.20
JeVois Smart Embedded Machine Vision Toolkit
|
Share this page: |
|
|
|
 |
 |
|
Go to the documentation of this file.
3 #include <opencv2/core/core.hpp>
4 #include <opencv2/imgproc/imgproc.hpp>
18 public jevois::Parameter<thresh1, thresh2, aperture, l2grad, thresh1delta, thresh2delta>
44 std::vector<std::future<void> > fut;
46 for (
int i = 0; i < 3; ++i)
50 cv::Mat edges(grayimg.rows, grayimg.cols, CV_8UC1, outimg.pixelsw<unsigned char>() + i * grayimg.total());
52 cv::Canny(grayimg, edges, thresh1::get() + i * thresh1delta::get(),
53 thresh2::get() + i * thresh2delta::get(), aperture::get(), l2grad::get());
57 cv::Mat edges(grayimg.rows, grayimg.cols, CV_8UC1, outimg.
pixelsw<
unsigned char>() + 3 * grayimg.total());
Data collection mode RAW means that the latest available raw data is returned each time get() is called
Exception-safe wrapper around a raw image to be sent over USB.
std::future< std::invoke_result_t< std::decay_t< Function >, std::decay_t< Args >... > > async(Function &&f, Args &&... args)
Async execution using a thread pool.
virtual void process(jevois::InputFrame &&inframe, jevois::OutputFrame &&outframe) override
Processing function, version that receives a frame from camera and sends a frame out over USB.
JEVOIS_REGISTER_MODULE(TutorialEdgeDetectionX4)
A raw image as coming from a V4L2 Camera and/or being sent out to a USB Gadget.
A category to which multiple ParameterDef definitions can belong.
cv::Mat convertToCvGray(RawImage const &src)
Convert RawImage to OpenCV doing color conversion from any RawImage source pixel to OpenCV gray byte.
void require(char const *info, unsigned int w, unsigned int h, unsigned int f) const
Require a particular image size and format, issue a fatal error message and throw if no match.
virtual ~TutorialEdgeDetectionX4()
unsigned int width
Image width in pixels.
T * pixelsw()
Shortcut access to pixels, read-write.
JEVOIS_DECLARE_PARAMETER(help, bool, "Print this help message", false, ParamCateg)
Parameter.
static const ParameterCategory ParamCateg("General Options")
Parameter category.
std::string warnAndIgnoreException(std::string const &prefix="")
Convenience function to catch an exception, issue some LERROR (depending on type),...
Virtual base class for a vision processing module.
unsigned int height
Image height in pixels.