Frank from Italy  [1 posts]
25 days

i'm working with RoboRealm and a linear Basler camera.

What I want to do, is send to RoboRealm the image I take with the camera.

Without save into the hdd and taking to send, camera gives me a byte array with the result.
The format is Mono 8.

I'm trying to do in this way:

rr.SetImage("source", grabResult.PixelData(), widthImage, heightImage, "BINARY")

widthImage and heightImage are 2 variables with the measure.
grabResult.PixelData() is the array.

Dim grabResult As IGrabResult = camera.StreamGrabber.RetrieveResult(800, TimeoutHandling.Return)

In documentation, grabResult.PixelData() tells: The pixel data buffer. The type of the object containing the buffer depends on the class implementing this interface. The pixel data buffer is provided as a byte array for a grab result.

The problem is RoboRealm receive an empty image and I'm sure that grabResult is not empty.

Steven Gentner from United States  [1410 posts] 24 days
Instead of "BINARY" (which is a black and white image) you probably mean "GRAY" or "FBGR" (flipped RGB image where 1 byte for each channel).

All images are "binary" so the use here is the strict use of 0 or 1 (black and white) values instead of "Binary" versus "Text" sometimes used in network transmission protocols.

Note, this isn't easy. You will need to really understand what the format is. Sometimes if you write out what the actual values are for the first 10 values of the image its possible to determine what format it is.


 Reply  New Post   Forum Index