I am a newbie in opencv and I try to use function Imgcodecs.imread of opencv in android to load image which is located in drawable folder, but when i check data of this image, i see nothing, data is null
This is my simple code to load image
public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
mImageRGBA = inputFrame.rgba();
img_object = Imgcodecs.imread("D:\Project_Android\Car_Tracking_1\app\src\main\res\drawable\rear_of_car.png");
Log.i("aaa2", img_object.dump());
return mImageRGBA;
}
Data of image that i get is null:
06-26 00:27:15.056 24939-25059/com.example.bruce.car_tracking_1 I/aaa2: []
I don't know why is Mat of my image don't have data or i load image wrong (i sure path of image right)

Aucun commentaire:
Enregistrer un commentaire