Have you managed to resolve the issue with the RGB planes? If not, see below.
Evert, Frits van wrote:
> As a newbie, I have managed to load an image with
> vil_image_view<vxl_byte> rgb_image;
> rgb_image = vil_load("corn.jpg");
> There are three planes in my image, as confirmed by
> vcl_cout << rgb_image.nplanes() << "\n";
> But in the following statement, no matter which plane I request, I always get the same plane (red, I think):
> vil_image_view<vxl_byte> p;
> p = vil_plane(rgb_image, 0); // or 1, or 2
This is the correct way. Is your image actually colour? (Silly
question, I know.) Try
vcl_cout << " r=" << rgb_image(0,0,0)
<< " g=" << rgb_image(0,0,1)
<< " b=" << rgb_image(0,0,2) << "\n";
and make sure the numbers are what you expect.
Also, try building and running the vxl test cases. To do so, set
"BUILD_TESTING" to "ON" in CMake, build vil/tests, and do a "make
Get latest updates about Open Source Projects, Conferences and News.