-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we use 16-bit RGB image as input without converting into 8-bit RGB(by libpng)? #93
Comments
The PNG loading code is written such that it always tries to convert the file's format to the format of the However, to actually use 16-bit RGB images in the SLAM algorithm would require adjusting other places in the code. As a start, this definition has
And then any potential other places that might assume that the color is 8 bits per channel need to be adjusted. For example, the color storage in keyframes:
|
I adjusted a lot of places that assume the color image is 8-bit RGB along the dirction of data flow, but I got stuck here: badslam/libvis/src/libvis/cuda/cuda_buffer.cu Line 154 in c66bdc8
Once I extend the " ""Invalid operands to binary expression ('ushort4' and 'float')" " occurs at :
How do you think I should adjust this? |
No, look here instead: badslam/libvis/src/libvis/cuda/cuda_buffer.cu Line 124 in c66bdc8
This list contains an entry for badslam/libvis/src/libvis/cuda/cuda_buffer.cu Line 132 in c66bdc8
So it probably makes sense to add an entry for |
Hi, I think the code here:
" image->SetSize(width, height);
png_bytep* row_pointers = new png_bytep[height];
for (u32 y = 0; y < height; ++ y) {
row_pointers[y] = reinterpret_cast<png_bytep>(image->row(y));
}
png_read_image(png_ptr, row_pointers);
"
will convert 16-bit RGB image into 8-bit RGB right?
The libpng api: void PNGAPI
png_read_image(png_structrp png_ptr, png_bytepp image) require png_bytepp( uchar pointer pointer).
Is there any easy way to change the above code so that it supports 16-bit RGB image as input?
The text was updated successfully, but these errors were encountered: