Package org.robwork.sdurw_sensor
Class ImageUtilPtr
- java.lang.Object
-
- org.robwork.sdurw_sensor.ImageUtilPtr
-
public class ImageUtilPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description ImageUtilPtr()Default constructor yielding a NULL-pointer.ImageUtilPtr(long cPtr, boolean cMemoryOwn)ImageUtilPtr(ImageUtil ptr)Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageUtil__ref__()Dereferencing operator.ImageUtilCPtrcptr()voiddelete()ImageUtilderef()The pointer stored in the object.booleanequals(ImageUtil p)voidflipX(Image img)flips the image around the x-axis (horizontal)voidflipY(Image img)flips the image around the y-axis (vertical)static longgetCPtr(ImageUtilPtr obj)ImageUtilgetDeref()Member access operator.booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownershipImagePtrmakeDepthImage(PointCloud cloud)Conditional comment:
End of conditional comment.
convert pointcloud to a depth image.ImagePtrmakeDepthImage(PointCloud cloud, float min, float max)convert pointcloud to a depth image.voidreset(Image img)sets the value of all channels of an image to
color.voidreset(Image img, int color)sets the value of all channels of an image to
color.voidRGB2GRAY(Image src, Image dst)converts an image of RGB type into an image of
GRAY type.
-
-
-
Constructor Detail
-
ImageUtilPtr
public ImageUtilPtr(long cPtr, boolean cMemoryOwn)
-
ImageUtilPtr
public ImageUtilPtr()
Default constructor yielding a NULL-pointer.
-
ImageUtilPtr
public ImageUtilPtr(ImageUtil ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(ImageUtilPtr obj)
-
delete
public void delete()
-
deref
public ImageUtil deref()
The pointer stored in the object.
-
__ref__
public ImageUtil __ref__()
Dereferencing operator.
-
getDeref
public ImageUtil getDeref()
Member access operator.
-
equals
public boolean equals(ImageUtil p)
-
isShared
public boolean isShared()
check if this Ptr has shared ownership or none
ownership- Returns:
- true if Ptr has shared ownership, false if it has no ownership.
-
isNull
public boolean isNull()
checks if the pointer is null- Returns:
- Returns true if the pointer is null
-
cptr
public ImageUtilCPtr cptr()
-
RGB2GRAY
public void RGB2GRAY(Image src, Image dst)
converts an image of RGB type into an image of
GRAY type.
-
reset
public void reset(Image img, int color)
sets the value of all channels of an image to
color.
-
reset
public void reset(Image img)
sets the value of all channels of an image to
color.
-
flipX
public void flipX(Image img)
flips the image around the x-axis (horizontal)- Parameters:
img-
-
flipY
public void flipY(Image img)
flips the image around the y-axis (vertical)- Parameters:
img-
-
makeDepthImage
public ImagePtr makeDepthImage(PointCloud cloud)
Conditional comment:
End of conditional comment.
convert pointcloud to a depth image. Colors are scaled to min and ax distance of
points.- Parameters:
cloud- [in] cloud to convert to image- Returns:
- image showing the pointcloud as a depth image
-
makeDepthImage
public ImagePtr makeDepthImage(PointCloud cloud, float min, float max)
convert pointcloud to a depth image. Colors are scaled to min and max distance
specified by user- Parameters:
cloud- [in] cloud to convert to imagemin- [in] the minimum distance corresponding to blackmax- [in] the maximum distance corresponding to white- Returns:
- image showing the pointcloud as a depth image
-
-