const int img_size = 1843200;
const int all_size = img_size*4;
ap_uint<PIXEL_BLOCK> * pixel_in;
pixel_in = (ap_uint<PIXEL_BLOCK>*)malloc(all_size);
std::ifstream fp[4];
fp[0].open("../../data/out/out_front.bin", std::ios::in | std::ios::binary);
fp[1].open("../../data/out/out_right.bin", std::ios::in | std::ios::binary);
fp[2].open("../../data/out/out_rear.bin", std::ios::in | std::ios::binary);
fp[3].open("../../data/out/out_left.bin", std::ios::in | std::ios::binary);
for(int i=0;i<4;i++){
if (fp[i].is_open()) {
char* buffer = new char[img_size];
fp[i].read(buffer, img_size);
memcpy(&pixel_in[i*img_size/4], buffer, img_size);
}
else{
std::cout << "cannt open out" << std::endl;
}
}
std::cout << std::hex << pixel_in[0] << std::endl;
std::cout << std::hex << pixel_in[1] << std::endl;