EnvInferoTemporal.H
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef NEURO_ENVINFEROTEMPORAL_H_DEFINED
00039 #define NEURO_ENVINFEROTEMPORAL_H_DEFINED
00040
00041 #include "Component/ModelComponent.H"
00042 #include "Component/ModelParam.H"
00043 #include "Image/Image.H"
00044 #include "Image/Pixels.H"
00045 #include "NeovisionII/Nv2LabelReader.H"
00046 #include "rutz/shared_ptr.h"
00047 #include "rutz/time.h"
00048
00049 #include <stdint.h>
00050 #include <string>
00051 #include <vector>
00052
00053 class EnvInferoTemporal : public ModelComponent
00054 {
00055 public:
00056 EnvInferoTemporal(OptionManager& mgr);
00057
00058 virtual ~EnvInferoTemporal();
00059
00060 virtual void paramChanged(ModelParamBase* const param,
00061 const bool valueChanged,
00062 ParamClient::ChangeStatus* status);
00063
00064 void initReaders(const std::string& addrlist);
00065
00066 void sendPatch(const uint32_t id,
00067 const Image<PixRGB<byte> >& fullimg,
00068 const Rectangle& foa,
00069 const rutz::time& qtime,
00070 bool is_training_image,
00071 const std::string& training_label,
00072 const std::string& remote_command,
00073 Point2D<int> fixLoc = Point2D<int>(0,0));
00074
00075 std::vector<Nv2LabelReader::LabeledImage>
00076 getLabeledImages(const size_t text_length);
00077
00078 bool belowConfidenceThresh() const;
00079
00080 double getMaxConfidence() const;
00081
00082 double getConfidenceThresh() const
00083 { return itsConfidenceThresh.getVal(); }
00084
00085 private:
00086 EnvInferoTemporal(const EnvInferoTemporal&);
00087 EnvInferoTemporal& operator=(const EnvInferoTemporal&);
00088
00089 void addNewPatchReader(const std::string& addr);
00090
00091 OModelParam<double> itsConfidenceThresh;
00092 NModelParam<bool> itsIgnoreNomatch;
00093 OModelParam<std::string> itsAddPatchReader;
00094 NModelParam<std::string> itsOnlineAddPatchReader;
00095
00096 std::vector<rutz::shared_ptr<Nv2LabelReader> > itsReaders;
00097 mutable pthread_mutex_t itsReadersLock;
00098 };
00099
00100
00101
00102
00103
00104
00105
00106
00107 #endif // NEURO_ENVINFEROTEMPORAL_H_DEFINED