summaryrefslogtreecommitdiff
path: root/src/ipa
diff options
context:
space:
mode:
authorFang Hui <hui.fang@nxp.com>2024-08-23 14:02:02 +0800
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-08-25 04:34:13 +0300
commit87fd05c66356ef605bd04d96bdff456334f6d5da (patch)
tree1bf22680d8e8a25dcab71c4d4e2948883867065f /src/ipa
parent3186a0eb546d405aca2b3554d951ea7b78490465 (diff)
libcamera: controls: Fix example for ExposureValue
EV = [-2, -1, 0.5, 0, 0.5, 1, 2] should change to EV = [-2, -1, -0.5, 0, 0.5, 1, 2] Signed-off-by: Fang Hui <hui.fang@nxp.com> Reviewed-by: Harvey Yang <chenghaoyang@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa')
0 files changed, 0 insertions, 0 deletions
// exposure time, and to convert between the sensor's gain codes and actual // gains. // // A method to return the number of frames of delay between updating exposure, // analogue gain and vblanking, and for the changes to take effect. For many // sensors these take the values 2, 1 and 2 respectively, but sensors that are // different will need to over-ride the default method provided. // // A method to query if the sensor outputs embedded data that can be parsed. // // A parser to parse the metadata buffers provided by some sensors (for // example, the imx219 does; the ov5647 doesn't). This allows us to know for // sure the exposure and gain of the frame we're looking at. CamHelper // provides methods for converting analogue gains to and from the sensor's // native gain codes. // // Finally, a set of methods that determine how to handle the vagaries of // different camera modules on start-up or when switching modes. Some // modules may produce one or more frames that are not yet correctly exposed, // or where the metadata may be suspect. We have the following methods: // HideFramesStartup(): Tell the pipeline handler not to return this many // frames at start-up. This can also be used to hide initial frames // while the AGC and other algorithms are sorting themselves out. // HideFramesModeSwitch(): Tell the pipeline handler not to return this // many frames after a mode switch (other than start-up). Some sensors // may produce innvalid frames after a mode switch; others may not. // MistrustFramesStartup(): At start-up a sensor may return frames for // which we should not run any control algorithms (for example, metadata // may be invalid). // MistrustFramesModeSwitch(): The number of frames, after a mode switch // (other than start-up), for which control algorithms should not run // (for example, metadata may be unreliable). class CamHelper { public: static CamHelper *Create(std::string const &cam_name); CamHelper(MdParser *parser, unsigned int frameIntegrationDiff); virtual ~CamHelper(); void SetCameraMode(const CameraMode &mode); MdParser &Parser() const { return *parser_; } uint32_t ExposureLines(double exposure_us) const; double Exposure(uint32_t exposure_lines) const; // in us virtual uint32_t GetVBlanking(double &exposure_us, double minFrameDuration, double maxFrameDuration) const; virtual uint32_t GainCode(double gain) const = 0; virtual double Gain(uint32_t gain_code) const = 0; virtual void GetDelays(int &exposure_delay, int &gain_delay, int &vblank_delay) const; virtual bool SensorEmbeddedDataPresent() const; virtual unsigned int HideFramesStartup() const; virtual unsigned int HideFramesModeSwitch() const; virtual unsigned int MistrustFramesStartup() const; virtual unsigned int MistrustFramesModeSwitch() const; protected: MdParser *parser_; CameraMode mode_; private: bool initialized_; /* * Smallest difference between the frame length and integration time, * in units of lines. */ unsigned int frameIntegrationDiff_; }; // This is for registering camera helpers with the system, so that the // CamHelper::Create function picks them up automatically. typedef CamHelper *(*CamHelperCreateFunc)(); struct RegisterCamHelper { RegisterCamHelper(char const *cam_name, CamHelperCreateFunc create_func); }; } // namespace RPi