I am a new Stack Overflow user and haven’t used to how things work here. So please be patient with me if I do anything wrong. So, I had a homework test for job-hunting. I did it but apparently my result was not good enough and I did not pass. However, I don’t know what I did wrong. Please review my code so that I understand what I did wrong.
Homework Test Background
Consider the following two interfaces:
- IFrameCallBack
public interface IFrameCallback
{
public void FrameReceived( IntPtr pFrame, int width, int height );
}
- FrameReceived is a callback method that will be called by a native library every time a new frame is available from an image capture device i.e. a camera.
- pFrame is the pointer to the raw bytes of the frame, width and height denotes the size of the frame in pixels.
- pFrame is reused by the native library to store the next frame as soon as the callback completes.
- This callback method is guaranteed to be called periodically depending on the frame rate configured on the capture device, in this case it is 30FPS.
- IValueReporter
public interface IValueReporter
{
public void Report( double value );
}
- Report is a callback method that is implemented by an external library that will plot the given
value in a real-time chart.
Homework Test Instruction
Write a program to fetch the frame from the camera, calculate the average pixel value, and stream back the calculated value.
My Code
https://github.com/MEvanAW/FrameValueReporter
Please and thank you.
I coded according to the homework test background and instruction, but the result wasn’t good enough for the potential employer.
M. Evan Anindya W. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.