@Namespace(value="dai::node") @NoOffset @Properties(inherit=depthai.class) public class Camera extends CameraPropertiesNode
Node.Connection, Node.DatatypeHierarchy, Node.Input, Node.InputMap, Node.Output, Node.OutputMap
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
Camera(PipelineImpl par,
long nodeId)
Constructs Camera node.
|
Camera(PipelineImpl par,
long nodeId,
CameraProperties props) |
Camera(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
Node.Output |
frameEvent()
Outputs metadata-only ImgFrame message as an early indicator of an incoming frame.
|
depthai.CameraBoardSocket |
getBoardSocket()
Retrieves which board socket to use
|
FloatOptional |
getCalibrationAlpha()
Get calibration alpha parameter that determines FOV of undistorted frames
|
BytePointer |
getCamera()
Retrieves which camera to use by name
|
float |
getFps()
Get rate at which camera should produce frames
|
int |
getHeight()
Get sensor resolution height
|
depthai.CameraImageOrientation |
getImageOrientation()
Get camera image orientation
|
CameraProperties.WarpMeshSource |
getMeshSource()
Gets the source of the warp mesh
|
Pointer |
getMeshStep()
Gets the distance between mesh points
|
int |
getPreviewHeight()
Get preview height
|
Pointer |
getPreviewSize()
Get preview size as tuple
|
int |
getPreviewWidth()
Get preview width
|
Pointer |
getSize()
Get sensor resolution as size
|
int |
getStillHeight()
Get still height
|
Pointer |
getStillSize()
Get still size as tuple
|
int |
getStillWidth()
Get still width
|
int |
getVideoHeight()
Get video height
|
Pointer |
getVideoSize()
Get video size as tuple
|
int |
getVideoWidth()
Get video width
|
int |
getWidth()
Get sensor resolution width
|
CameraControl |
initialControl()
Initial control options to apply to sensor
|
Node.Input |
inputConfig()
Input for ImageManipConfig message, which can modify crop parameters in runtime
Default queue is non-blocking with size 8
|
Node.Input |
inputControl()
Input for CameraControl message, which can modify camera parameters in runtime
Default queue is blocking with size 8
|
Node.Output |
isp()
Outputs ImgFrame message that carries YUV420 planar (I420/IYUV) frame data.
|
void |
loadMeshFile(Path warpMesh)
Specify local filesystem paths to the undistort mesh calibration files.
|
static BytePointer |
NAME() |
Node.Output |
preview()
Outputs ImgFrame message that carries BGR/RGB planar/interleaved encoded frame data.
|
Node.Output |
raw()
Outputs ImgFrame message that carries RAW10-packed (MIPI CSI-2 format) frame data.
|
void |
setBoardSocket(depthai.CameraBoardSocket boardSocket)
Specify which board socket to use
|
void |
setBoardSocket(int boardSocket) |
void |
setCalibrationAlpha(float alpha)
Set calibration alpha parameter that determines FOV of undistorted frames
|
void |
setCamera(ByteBuffer name) |
void |
setCamera(BytePointer name)
Specify which camera to use by name
|
void |
setCamera(String name) |
void |
setFps(float fps)
Set rate at which camera should produce frames
|
void |
setImageOrientation(depthai.CameraImageOrientation imageOrientation)
Set camera image orientation
|
void |
setImageOrientation(int imageOrientation) |
void |
setIsp3aFps(int isp3aFps)
Isp 3A rate (auto focus, auto exposure, auto white balance, camera controls etc.).
|
void |
setMeshSource(CameraProperties.WarpMeshSource source)
Set the source of the warp mesh or disable
|
void |
setMeshStep(int width,
int height)
Set the distance between mesh points.
|
void |
setPreviewSize(int width,
int height)
Set preview output size
|
void |
setPreviewSize(Pointer size)
Set preview output size, as a tuple
|
void |
setRawOutputPacked(boolean packed)
Configures whether the camera
raw frames are saved as MIPI-packed to memory. |
void |
setSize(int width,
int height)
Set desired resolution.
|
void |
setSize(Pointer size)
Set desired resolution.
|
void |
setStillSize(int width,
int height)
Set still output size
|
void |
setStillSize(Pointer size)
Set still output size, as a tuple
|
void |
setVideoSize(int width,
int height)
Set video output size
|
void |
setVideoSize(Pointer size)
Set video output size, as a tuple
|
Node.Output |
still()
Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data.
|
Node.Output |
video()
Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data.
|
clone, getName, properties, properties
assetManager, getAssetManager, getInputRefs, getInputs, getOutputRefs, getOutputs, getParentPipeline, getProperties, getRequiredOpenVINOVersion, id, inputMapRefs, inputRefs, outputMapRefs, outputRefs, propertiesHolder, setInputMapRefs, setInputRefs, setOutputMapRefs, setOutputRefs
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public Camera(Pointer p)
Pointer(Pointer)
.public Camera(@SharedPtr PipelineImpl par, @Cast(value="int64_t") long nodeId)
public Camera(@SharedPtr PipelineImpl par, @Cast(value="int64_t") long nodeId, @UniquePtr CameraProperties props)
@MemberGetter @Cast(value="const char*") public static BytePointer NAME()
@MemberGetter @ByRef public CameraControl initialControl()
@MemberGetter @ByRef public Node.Input inputConfig()
@MemberGetter @ByRef public Node.Input inputControl()
@MemberGetter @ByRef public Node.Output video()
@MemberGetter @ByRef public Node.Output preview()
@MemberGetter @ByRef public Node.Output still()
@MemberGetter @ByRef public Node.Output isp()
@MemberGetter @ByRef public Node.Output raw()
@MemberGetter @ByRef public Node.Output frameEvent()
public void setBoardSocket(depthai.CameraBoardSocket boardSocket)
boardSocket
- Board socket to usepublic depthai.CameraBoardSocket getBoardSocket()
public void setCamera(@StdString BytePointer name)
name
- Name of the camera to usepublic void setCamera(@StdString ByteBuffer name)
public void setCamera(@StdString String name)
@StdString public BytePointer getCamera()
public void setImageOrientation(depthai.CameraImageOrientation imageOrientation)
public void setImageOrientation(@Cast(value="dai::CameraImageOrientation") int imageOrientation)
public depthai.CameraImageOrientation getImageOrientation()
public void setSize(@ByVal @Cast(value="std::tuple<int,int>*") Pointer size)
public void setSize(int width, int height)
public void setPreviewSize(int width, int height)
public void setPreviewSize(@ByVal @Cast(value="std::tuple<int,int>*") Pointer size)
public void setVideoSize(int width, int height)
public void setVideoSize(@ByVal @Cast(value="std::tuple<int,int>*") Pointer size)
public void setStillSize(int width, int height)
public void setStillSize(@ByVal @Cast(value="std::tuple<int,int>*") Pointer size)
public void setFps(float fps)
fps
- Rate in frames per secondpublic void setIsp3aFps(int isp3aFps)
public float getFps()
@ByVal @Cast(value="std::tuple<int,int>*") public Pointer getPreviewSize()
public int getPreviewWidth()
public int getPreviewHeight()
@ByVal @Cast(value="std::tuple<int,int>*") public Pointer getVideoSize()
public int getVideoWidth()
public int getVideoHeight()
@ByVal @Cast(value="std::tuple<int,int>*") public Pointer getStillSize()
public int getStillWidth()
public int getStillHeight()
@ByVal @Cast(value="std::tuple<int,int>*") public Pointer getSize()
public int getWidth()
public int getHeight()
public void setMeshSource(@ByVal CameraProperties.WarpMeshSource source)
@ByVal public CameraProperties.WarpMeshSource getMeshSource()
public void loadMeshFile(@Const @ByRef Path warpMesh)
setMeshStep
.
With a 1280x800 resolution and the default (16,16) step, the required mesh size is:
width: 1280 / 16 + 1 = 81
height: 800 / 16 + 1 = 51public void setMeshStep(int width, int height)
@ByVal @Cast(value="std::tuple<int,int>*") public Pointer getMeshStep()
public void setCalibrationAlpha(float alpha)
@ByVal public FloatOptional getCalibrationAlpha()
public void setRawOutputPacked(@Cast(value="bool") boolean packed)
raw
frames are saved as MIPI-packed to memory.
The packed format is more efficient, consuming less memory on device, and less data
to send to host: RAW10: 4 pixels saved on 5 bytes, RAW12: 2 pixels saved on 3 bytes.
When packing is disabled (false
), data is saved lsb-aligned, e.g. a RAW10 pixel
will be stored as uint16, on bits 9..0: 0b0000'00pp'pppp'pppp.
Default is auto: enabled for standard color/monochrome cameras where ISP can work
with both packed/unpacked, but disabled for other cameras like ToF.Copyright © 2024. All rights reserved.