Hi all, I'm trying to do some simple image processing using DM642 EVM. Starting from the examples given in the CD, I now have:
while(1){/* loop forever */
/* copy data from capture buffer to array to display buffer */
for(i = 0; i < numLines; i++) {
DAT_copy(capFrameBuf->frame.iFrm.y1 + i * capLinePitch, Array1, disLinePitch);
/* IMG_thr_gt2max: pixels greater than threshold are set to 255 */
IMG_thr_gt2max(Array1, Array2, cols, rows, threshold);
DAT_copy(Array1, disFrameBuf->frame.rpFrm.buf + i * disLinePitch, disLinePitch);
}
FVID_exchange(capChan, &capFrameBuf);
FVID_exchange(disChan, &disFrameBuf);
frames ++;
}
What I'm trying to do is a thresholding procedure. The image from camera is stored in capFrameBuf and whatever in disFrameBuf is sent to the display. I introduced Array1 & Array2 (decalared as: unsigned char Array1[640 * 480], Array2[640 * 480];) to enable me to do some processing. The program compiles ok, but when I run it, nothing show up (the screen is blank). Can anyone help? Thanks. Hanief