nn::camera::CTR Namespace

Description

The namespace of the CTR camera library.
(This namespace can also be written without the ::CTR portion.)

Regardless of the sleep state, the camera operations now stop when the cover of the system is closed.
When the system is closed during capture, capture resumes when the system is opened. Be aware that because a process equivalent to the nn::camera::CTR::Activate(SELECT_NONE) function is performed internally when the system is closed, there is a period of instability for the images that were written with the nn::camera::CTR::Activate reference immediately after starting.
In addition, according to the timing when the cover is closed, it is possible that the nn::camera::CTR::IsBusy function written to the nn::camera::CTR::IsBusy reference will enter a state where true is always returned. This state is canceled when the cover is opened, but when a process to transition to sleep when the cover is closed is implemented, exercise caution to keep the nn::camera::CTR::IsBusy function from entering an infinite polling loop.

The camera functions are not all thread-safe, so they must not be called simultaneously from multiple threads. Note also that the camera functions must not be called during applet transitions.

Note: When shutting down the application, if the nn::camera::CTR::Finalize function is not called after stopping capture with the nn::camera::CTR::StopCapture function and stopping the cameras with the nn::camera::CTR::Activate(SELECT_NONE) function, there may be audible noise while on the HOME Menu.

Classes

nn::camera::CTR::ResultIsSleeping Indicates that the function you attempted to call cannot be used because the system cover is closed.
nn::camera::CTR::ResultFatalError Indicates that the camera failed to reboot. There may be something physically wrong with the camera.
nn::camera::CTR::ResultAlreadyInitialized Indicates that the camera library has already been initialized.
nn::camera::CTR::ResultUsingOtherProcess Indicates that this process cannot use the cameras because another process is currently using them.

Structures

nn::camera::CTR::StereoCameraCalibrationData Structure that gives calibration information for the stereo cameras.
nn::camera::CTR::PackageParameterCameraSelect Structure for batch-configuring parameters without context but with cameras specified.
nn::camera::CTR::PackageParameterContext Structure for batch-configuring parameters with context and with cameras specified. Use this structure when you specify the size with SetSize.
nn::camera::CTR::PackageParameterContextDetail Structure for batch-configuring parameters with context and with cameras specified. Use when specifying the size with SetDetailSize.

Enumerated Types

CameraSelect Enumerated type that represents combinations of cameras.
Port Enumerated type that indicates a camera's connection target port.
Context Enumerated type that indicates the camera context.
Flip Enumerated type that indicates flipping types.
Size Enumerated type that indicates resolutions.
FrameRate Enumerated type that indicates framerates.
WhiteBalance Enumerated type that indicates white balance.
PhotoMode Enumerated type that indicates the photo mode.
Effect Enumerated type that indicates effects.
Contrast Enumerated type that indicates contrast (gamma curve) patterns.
LensCorrection Enumerated type that indicates the degree of lens correction to apply.
ShutterSoundType Enumerated type that indicates the types of shutter sounds.

Functions

Other
Initialize Initializes the CAMERA library and makes the cameras available for use.
Finalize Shuts down the CAMERA library.
StartCapture Starts capturing.
StopCapture Stops capturing.
IsBusy Gets whether the camera is currently capturing image data.
ClearBuffer Clears the buffer and the error flags.
GetVsyncInterruptEvent Gets the event used to detect camera V-Sync interrupts.
GetBufferErrorInterruptEvent Gets the event used to detect camera buffer error interrupts and reboots.
SetReceiving Configures loading of image data. Only a single frame is received, so this function must be set once per each camera frame.
IsFinishedReceiving Gets whether image data transfer is complete.
SetTransferLines Sets the number of lines to save in the buffer.
GetMaxLines Gets the maximum number of lines that can be saved in the buffer.
SetTransferBytes Sets the number of bytes to save in the buffer.
GetTransferBytes Gets the current setting for the number of bytes to save to the buffer.
GetMaxBytes Gets the maximum number of bytes that can be saved in the buffer.
GetLineBytes Gets the number of bytes in one line.
GetFrameBytes Gets the number of bytes in one frame.
SetTrimming Enables or disables trimming.
IsTrimming Determines whether trimming is enabled.
SetTrimmingParams Sets the positions to which to trim.
GetTrimmingParams Gets the positions to which to trim.
SetTrimmingParamsCenter Sets the trimming positions relative to the center of the camera image.
Activate Activates a camera.
SwitchContext Switches the context of camera settings.
SetExposure Sets the exposure.
SetWhiteBalance Sets the white balance.
SetSharpness Sets the sharpness.
SetAutoExposure Enables or disables the auto exposure function.
IsAutoExposure Gets whether the auto exposure function is enabled.
SetAutoWhiteBalance Enables or disables automatic white balance.
IsAutoWhiteBalance Gets whether automatic white balance is enabled.
FlipImage Configures flipping of images.
SetDetailSize Sets the resolution (in pixels).
SetSize Sets the resolution.
SetFrameRate Sets the framerate.
SetPhotoMode Sets the photo mode.
SetEffect Sets an image effect.
SetContrast Sets the image contrast (gamma curve).
SetLensCorrection Sets the degree of lens correction.
SetAutoExposureWindow Sets the region within the view to use as the basis for calculating auto exposure (the response frame).
SetAutoWhiteBalanceWindow Sets the region within the view to use as the basis for calculating auto white balance (the response frame).
SetNoiseFilter Sets the noise filter.
SynchronizeVsyncTiming Synchronizes the camera V-Sync signal timing. However, this function can never perfectly synchronize timing so that there is absolutely no discrepancy.
GetLatestVsyncTiming Gets the timing history of camera V-Sync signal inputs.
SetBrightnessSynchronization Configures the start and end of brightness synchronization.
GetStereoCameraCalibrationData Gets calibration data for the stereo camera positions.
GetParallaxOnChart Calculates the parallax in the measurement chart when the calibration data of stereo cameras is measured.
GetParallax Calculates the parallax at a specific distance from the stereo camera.
GetStereoCameraCalibrationMatrix Calculates a correction matrix to match the left-camera image to the right-camera image in 3D space.
GetStereoCameraCalibrationMatrixEx Calculates a correction matrix to match the left-camera image to the right-camera image in 3D space.
SetPackageParameterWithoutContext Batch-configures settings for a camera with no context specified.
SetPackageParameterWithContext Batch-configures settings for a camera with context specified. Use when configuring resolution with an enumerated type.
GetSuitableY2rStandardCoefficient Gets the Y2R conversion coefficient applied to the data output by the camera.
PlayShutterSound Plays back the shutter sound and temporarily turns off the camera LED.

Revision History

2011/04/06
Added an explanation about noise that might be generated in the HOME Menu depending on the shutdown procedure.
2010/12/27
Added an explanation about calling camera functions during applet transitions.
2010/11/01
Added an explanation about functionality when the cover is closed.
2010/10/04
Added an explanation about functionality when the camera recovers from sleep.
2010/01/07
Initial version.

CONFIDENTIAL