Hi @George_Soloupis ,
Thanks for your response. We use OpenCV extensively in Python for a multistage classification project (using prerecorded videos as input) to take advantage of its simplicity in matrix manipulation. We are in the phase of porting the code to an Android device. The example I put together is a simplified version for the first stage, and the algorithm does require each input video frame to be turned into gray scale with a single channel and then normalized so pixel values are between 0.0 and 1.0.  I see your code example was written in Kotlin, which I am not familiar with, but I was able to turn that code into Java (included below so you can review).
String path = "/storage/emulated/0/Pictures/test_img.png"
try {
        InputStream inputStream = new FileInputStream(path);
        Bitmap loadedBitmap = BitmapFactory.decodeStream(inputStream);
        Bitmap scaledBitmap = Bitmap.createScaledBitmap(loadedBitmap, 256, 256, true);
        TensorImage tensorImage = new TensorImage(DataType.FLOAT32);
        MappedByteBuffer tfliteModel = FileUtil.loadMappedFile(this, "test_model.tflite");
        Interpreter tflite = new Interpreter(tfliteModel);
        TensorBuffer outputBuffer = TensorBuffer.createFixedSize(new int[]{1, 4}, DataType.FLOAT32);
        tflite.run(tensorImage.getBuffer(), outputBuffer.getBuffer());
        ...

Two follow-up questions:

tensorImage contains 3 channels, but I need to turn that into grayscale and get just one channel before feeding the input to the model. What’s the correct way of doing that? The execution of the last line as is currently results in the following exception:
java.lang.IllegalArgumentException: Cannot convert between a TensorFlowLite buffer with 262144 bytes and a Java Buffer with 786432 bytes.
Note that we haven’t divided the pixel values by 255.0 before feeding that into the last line. How can I do that as required by the model, once the above error is fixed?

Thanks again and look forward to your followup.
George