Question: Help with histogram image processing on code composer studio. I need to modify the code for histogram effect: #include #define XSIZE 400 #define YSIZE 300
Help with histogram image processing on code composer studio.
I need to modify the code for histogram effect:
#include
#define XSIZE 400 #define YSIZE 300 #define NUM_PIXELS (XSIZE * YSIZE)
#pragma DATA_SECTION(imgBuffer, "myDDR2"); unsigned int imgBuffer[NUM_PIXELS]; unsigned int imgGray[NUM_PIXELS];
void main (void){ while(1); }
void ConvertGrayscale() { int x, y; unsigned char r, g, b, gray; for (y=0; y *(((unsigned char*)imgGray) + (((y * XSIZE) + x ) * 4) + 3) = gray ; *(((unsigned char*)imgGray) + (((y * XSIZE) + x ) * 4) + 2) = gray ; *(((unsigned char*)imgGray) + (((y * XSIZE) + x ) * 4) + 1) = gray ; } } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
