I'm confused about the structure the circle is being stored in. I've looked up the definitions of CVMemStorage and CVMemBlock, and both appear to have no room for data.
Here is CVMemBlock and you've already posted CVMemStorage:
1 2 3 4 5
|
typedef struct CvMemBlock
{
struct CvMemBlock* prev;
struct CvMemBlock* next;
} CvMemBlock;
|
It's a doubly linked list, but there's no pointer to the data of each node.. Just a pointer to the previous and next node.. where's the data supposed to go?
Usually images are arrays of pixel information. For instance bytes are typically used to represent colors.
Usually 4 bytes ( a long integer, or int) is used to describe a single pixel.
RGBA is a typical format, where R represents Red color, G represents green, B represents blue, and A represents alpha.
An entire picture is then composed out of an array of these pixels.
int picture [WIDTH][HEIGHT];
where picture[0]0] would be the first pixel on the top left and
picture[WIDTH-1][HEIGHT-1] would be the last pixel on the bottom right.
Is there a way to get the image data in a array like this?
A 1D array would be fine, but we need the pixel information in order to work on any sort of transformation.