24#include <opencv2/core/core.hpp>
33#include <condition_variable>
96 public jevois::Parameter<saliency::cweight, saliency::iweight, saliency::oweight, saliency::fweight,
97 saliency::mweight, saliency::centermin, saliency::deltamin, saliency::smscale,
98 saliency::mthresh, saliency::fthresh, saliency::msflick>
102 Saliency(std::string
const & instance);
111 void process(cv::Mat
const & input,
bool do_gist);
169 void* status_userdata,
struct env_image* result);
172 void env_mt_motion_channel_input(
struct env_motion_channel* chan,
const char* tagName,
177 void processStart(
struct env_dims const & dims,
bool do_gist);
183 mutable std::mutex itsRawImageMtx;
186 mutable std::condition_variable itsRawImageCond;
187 mutable bool itsInputDone;
197 unsigned int bitshift);
201void drawGist(
jevois::RawImage & img,
unsigned char const * gist,
size_t gistsize,
unsigned int xoff,
unsigned int yoff,
202 unsigned int width,
unsigned int scale);
void drawGist(jevois::RawImage &img, unsigned char const *gist, size_t gistsize, unsigned int xoff, unsigned int yoff, unsigned int width, unsigned int scale)
void drawMap(jevois::RawImage &img, env_image const *fmap, unsigned int xoff, unsigned int yoff, unsigned int scale)
Simple wrapper class around Rob Peter's C-optimized, fixed-point-math visual saliency code.
JEVOIS_DECLARE_PARAMETER(centermin, size_t, "Lowest (finest) of the 3 center scales", 2, ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(oweight, byte, "Orientation channel weight", 255, ParamCateg)
Parameter.
unsigned char * gist
Gist vector has 1152 entries, 72 feature maps * 16 values/map.
void inhibitionOfReturn(int const x, int const y, float const sigma)
Inhibit the saliency map around a point, sigma is in pixels at the sacle of the map.
struct env_image salmap
The saliency map.
void process(jevois::RawImage const &input, bool do_gist)
Process a raw YUYV image. Results are stored in the Saliency class.
void getSaliencyMax(int &x, int &y, intg32 &value)
Get location and value of max point in the saliency map.
JEVOIS_DECLARE_PARAMETER(msflick, bool, "Use multiscale flicker computation", false, ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(mweight, byte, "Motion channel weight", 255, ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(cweight, byte, "Color channel weight", 255, ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(iweight, byte, "Intensity channel weight", 255, ParamCateg)
Parameter.
void waitUntilDoneWithInput() const
Wait until process() is done using the input image.
JEVOIS_DECLARE_PARAMETER(mthresh, byte, "Motion threshold", 0, ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(fthresh, byte, "Flicker threshold", 0, ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(fweight, byte, "Flicker channel weight", 255, ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(smscale, size_t, "Scale of the saliency map", 4, ParamCateg)
Parameter.
virtual ~Saliency()
Destructor.
JEVOIS_DECLARE_PARAMETER(deltamin, size_t, "Lowest (finest) of the 2 center-surround delta scales", 3, ParamCateg)
Parameter.
void() env_chan_status_func(void *userdata, const char *tagName, const struct env_image *img)
ENV_INTG32_TYPE intg32
32-bit signed integer
A simple struct to hold a pair of width/height dimensions.
A composite channel containing a set of direction channels.
This class implements a set of images, often used as a dyadic pyramid.