class P1::CameraSdk::LiveViewConfiguration

Overview

Representation of a cameras curretn LiveView config (setup) More…

#include <P1CameraLiveViewConfiguration.hpp>

class LiveViewConfiguration
{
public:
    // construction

    LiveViewConfiguration(LiveViewConfigurationPimpl* pimpl);
    LiveViewConfiguration(const LiveViewConfiguration& other);
    LiveViewConfiguration(LiveViewConfiguration&& other);

    // methods

    EXPORT_API LiveViewConfiguration& operator = (const LiveViewConfiguration& other);
    EXPORT_API LiveViewBitmapFormat Format() const;
    EXPORT_API ValueRect Crop() const;
    EXPORT_API uint32_t PreferredMaxDimension() const;
    EXPORT_API ValueArea FullImageSize() const;
    EXPORT_API float Lightness() const;
    EXPORT_API void SetFormat(const LiveViewBitmapFormat format);
    EXPORT_API void SetCrop(const ValueRect& cropRect);
    EXPORT_API void SetPreferredMaxDimension(const uint32_t maxDimensionValue);
    EXPORT_API void SetWhiteBalancePoint(const ValuePoint& whitePoint);
    EXPORT_API void SetLightness(const float lightness);
    EXPORT_API std::string ToString() const;
};

Detailed Documentation

Representation of a cameras curretn LiveView config (setup)

This class allows you to configure the LiveView properties of a camera.

You obtain an object of this class using the Camera::GetLiveViewConfiguration on the Camera. As you edit the parameters on the class, the corrospanding values are changed in the camera.

Note : Changing the LiveView configuration is an exspensive operation, and requires a lot of work to be done in the camera. Also, the LiveView image feed is heavily pipelined, so changes will occur after a some delay.

The LiveViewImage class helps you account of this, by including the current LiveView image’s crop parameters.

This LiveVIew output image size is independent from the applied crop. It is only influenced by the PreferredMaxDimension setting. This defines the length of the biggest of the image dimensions, which is most likely the width.

The default LiveView image width is 1024 pixels, but you can change it to other common resolutions; like 640, 800, etc. You cannot set it to an arbitrary integer. The desired dimension value will snap the supported image resolutions.

Methods

EXPORT_API LiveViewBitmapFormat Format() const

Get the current bitmap format setting of LiveView.

EXPORT_API ValueRect Crop() const

Get the current crop applied to the LiveView.

EXPORT_API uint32_t PreferredMaxDimension() const

Get the current desired max output dimension of the LiveView.

EXPORT_API ValueArea FullImageSize() const

Get the Helper method to reset the crop to “no crop”.

EXPORT_API float Lightness() const

An abstract value for exposure compensation.

This values maps to the exposure compensation, but does not use the same EV values. Instead it uses an opaque float point value.

Returns:

float The current lightness

EXPORT_API void SetFormat(const LiveViewBitmapFormat format)

Set the LiveView image’s bitmap format.

EXPORT_API void SetCrop(const ValueRect& cropRect)

Set a new crop on the LiveView.

EXPORT_API void SetPreferredMaxDimension(const uint32_t maxDimensionValue)

Set the desired maximum dimension (width) of the LiveView’s output images.

EXPORT_API void SetWhiteBalancePoint(const ValuePoint& whitePoint)

Set the Custom C1 white balance, by the sampling a position in full image coordinates.

This method changes the cameras white balance property to Custom C1 setting. And the white balance vector for Custom C1 is changed to reflect the sample position provided by this method. This means the cameras white balance setting is changed!

Use the white balance property, to change white balance back to Auto or Daylight, etc.

EXPORT_API void SetLightness(const float lightness)

Set a exposure compensation -like value applied to the live view.