Skip to content
On this page

Images

The application can receive the camera image stream data from the SDK by using useImages hook, and then pass it to the session builder when creating a session.

The SDK sends an ImageData object that contains:

  • The face or finger detection coordinates, as calculated by the SDK.
  • The image validity - whether the image is processed by the SDK or not.
TypeScript
import { 
    useImages,
    ImageData
} from 'binah-react-native-sdk';

const imageData = useImages();

React.useEffect(() => {
    // imageData.imageWidth -       The image's width
    // imageData.imageHeight -      The image's height
    // imageData.roi -              A geometry.Rect object
    // imageData.imageValidity -    An integer with a value from ImageValidity class
}, [imageData]);

By default, the SDK processes camera images in a portrait orientation, regardless of the device orientation. Instructions on how to process the camera stream in other orientations can be found at Device Orientation Setup.