我现在有点脑放屁,但我需要帮助将图像从ARGB1555转换为RGB8888。
我已经有了遍历每个像素的循环(基本上是从文件中读取u16s),我想将它们存储为u32。我想我只需要使用一些二进制运算符来获得2-6、7-11和12-16位,然后使用另一个运算符以某种方式将每种颜色更改为它们各自的RGB8888值。。。但我真的不知道该怎么做。
我现在有点脑放屁,但我需要帮助将图像从ARGB1555转换为RGB8888。
我已经有了遍历每个像素的循环(基本上是从文件中读取u16s),我想将它们存储为u32。我想我只需要使用一些二进制运算符来获得2-6、7-11和12-16位,然后使用另一个运算符以某种方式将每种颜色更改为它们各自的RGB8888值。。。但我真的不知道该怎么做。
You didnt state what language you are writing it in but here is a C++ function for it: It takes the 16 bit integer in ARGB1555 and returns a 32 bit integer in ARGB8888
unsigned int ARGB1555toARGB8888(unsigned short c)
{
const unsigned int a = c&0x8000, r = c&0x7C00, g = c&0x03E0, b = c&0x1F;
const unsigned int rgb = (r << 9) | (g << 6) | (b << 3);
return (a*0x1FE00) | rgb | ((rgb >> 5) & 0x070707);
}
参考:http://cboard.cprogramming.com/c-programming/118698-color-conversion.html
I am looking for a recommendation for an introduction to image processing algorithms (face and shape recognition, etc.) and wondered if anyone had an good recommendations, either for books, ...
I m looking for the fastest and more efficient method of detecting an object in a moving video. Things to note about this video: It is very grainy and low resolution, also both the background and ...
I am learning digital image processing on my own and would like recomendations on good reference books. If you know of books to definately stay away from that would be useful as well. Thanks
I have this image: I want to read it to a string using python, which I didn t think would be that hard. I came upon tesseract, and then a wrapper for python scripts using tesseract. So I started ...
I m building a site for a client that needs to support image uploads (an artist) through the admin interface. Since most of the images are pretty high-res, I wanted to create thumb copies of the image ...
I have an image processing routine that I believe could be made very parallel very quickly. Each pixel needs to have roughly 2k operations done on it in a way that doesn t depend on the operations ...
I m currently working on writing a version of the MATLAB RegionProps function for GNU Octave. I have most of it implemented, but I m still struggling with the implementation of a few parts. I had ...
I ve been implementing an adaptation of Viola-Jones face detection algorithm. The technique relies upon placing a subframe of 24x24 pixels within an image, and subsequently placing rectangular ...