Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int width = 200, height = 100;
- uint8_t** INPUT;
- // generation of some test data
- INPUT = (uint8_t**)malloc(height * sizeof(uint8_t*));
- for (int i = 0; i < height; i++)
- {
- INPUT[i] = (uint8_t*)malloc(width * sizeof(uint8_t));
- }
- for (int i = 0; i < height; i++)
- for (int j = 0; j < width; j++)
- {
- if (j >= width / 2 - i && j < width / 2 + i && i > 0 && j != width / 2)
- INPUT[i][j] = 1;
- else INPUT[i][j] = 0;
- if (i > height /2 && i < height * 3 / 4 && j >= width / 4 && j < width * 3 / 4)
- INPUT[i][j] = 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement