nn::camera::CTR::SetDetailSize Functionnn::Result SetDetailSize( CameraSelect select, s16 width , s16 height , s16 cropX0 = 0, s16 cropY0 = 0, s16 cropX1 = 639, s16 cropY1 = 479, Context context = CONTEXT_BOTH );
| Name | Description | |
|---|---|---|
| in | select | Specifies which camera to change settings for. |
| in | width | Specifies the image width. |
| in | height | Specifies the image width. |
| in | cropX0 | Specifies the x-coordinate of the upper-left corner of the crop region when the original 640x480 image is cropped internally by the camera module. Must be specified in the range [0, 639], regardless of the output size of the image. Specify a crop region width that is greater than or equal to the output image width. If omitted, the default value of 0 will be used. |
| in | cropY0 | Specifies the y-coordinate of the upper-left corner of the crop region when the original 640x480 image is cropped internally by the camera module. Must be specified in the range [0, 479], regardless of the output size of the image. Specify a crop region height that is greater than or equal to the output image height. If omitted, the default value of 0 will be used. |
| in | cropX1 | Specifies the x-coordinate of the lower-right corner of the crop region when the original 640x480 image is cropped internally by the camera module. Must be specified in the range [0, 639], regardless of the output size of the image. Specify a crop region width that is greater than or equal to the output image width. If omitted, the default value of 639 will be used. |
| in | cropY1 | Specifies the y-coordinate of the lower-right corner of the crop region when the original 640x480 image is cropped internally by the camera module. Must be specified in the range [0, 479], regardless of the output size of the image. Specify a crop region height that is greater than or equal to the output image height. If omitted, the default value of 479 will be used. |
| in | context | Specifies which context to change settings for. If omitted, the settings will be applied both to context A and context B. |
Result values listed below. | Value | Description |
|---|---|
ResultSuccess |
Process was successful. |
ResultIsSleeping |
Unusable because the system is closed. |
ResultFatalError |
There may be something physically wrong with the camera. |
Sets the resolution (in pixels).
This function can be used to specify the cropping region. The cropping region is the region to be output from within the 640 x 480 image captured by the camera module. For example, if an image size of 320 x 240 is specified, and the cropping region is specified as the full 640 x 480, the output image will be the 640 x 480 image resized to 320 x 240. Meanwhile, if an image size of 320 x 240 is specified, and the cropping region is specified as the 320 x 240 region in the center of the image, the cropping region will be output at the full size without shrinking. Consequently, change the cropping region size without changing the image size to produce a digital zoom effect. Or, move the cropping region to produce a pan or tilt effect. The cropping region size must be at least as big as the image size. You cannot produce a zoom effect by specifying an image size larger than the cropping region size. Doing so will cause this function to fail.
When the image size aspect ratio is not 4:3 and the cropping region is left as the default, the 640 x 480 image will be reduced to match the specified image size, causing distortions on output. We therefore recommend using the same aspect ratios for the cropping region and the image size.
Note: This function may block for an extended period if a camera is restarting.
CONFIDENTIAL