libdart_openmvg/lib/openmvg_c_shim.dart

14 lines
488 B
Dart
Raw Normal View History

import 'dart:ffi';
import 'package:dart_openmvg/dynloader.dart';
import 'package:dart_openmvg/libdart_openmvg_generated.dart';
final _dylib = getArchimedesCLib();
final LibDartOpenMVG _bindings = LibDartOpenMVG(_dylib);
Pointer<ImageResult> getImageData(Pointer<Frame> frame) =>
_bindings.archimedes_get_image_data(frame);
Pointer<Frame> newFrame(
Pointer<Uint8> data, int dataLen, int w, int h, int depth) =>
_bindings.new_frame_from_data(data, dataLen, w, h, depth);