[Scilab-users] IPCV imread

classic Classic list List threaded Threaded
3 messages Options
der_Phil der_Phil
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] IPCV imread

Dear Experts,

please improve my understanding of the IPCV function imread for following context:

I have an image which is told to be a 3-channel image.
At least with IrfanView I get a bit depth of 24 ... so I expect it to be an RBG image.

However: The image contains - on purpose - only 2 colors.

Now:

img = imread(imPath);       // reads image as boolean

img = double(img);            // convert to double.


Question:        Why does the imread-function read the image as a boolean image and not as a 3-channel image?

Note:              I am totally fine with the result of imread..just being curious.

Thank you,
Philipp

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Tan Chin Luh Tan Chin Luh
Reply | Threaded
Open this post in threaded view
|

Re: IPCV imread

Hi, 

These was a part in the code to check if the image read into Scilab only consist of 2 values, min and max, and it will be automatically converted to binary image. 

If you're using Windows, consider to download version 4.1.2.3 from https://github.com/tanchinluh/IPCV/tags and use the extra input to force reading in 3 layers. 

img = imread(imPath, IMREAD_COLOR = 1);

Hope this helps.

Regards,
Chin Luh


---- On Wed, 11 Nov 2020 20:20:18 +0800 P M <[hidden email]> wrote ----

Dear Experts,


please improve my understanding of the IPCV function imread for following context:

I have an image which is told to be a 3-channel image.

At least with IrfanView I get a bit depth of 24 ... so I expect it to be an RBG image.


However: The image contains - on purpose - only 2 colors.

Now:

img = imread(imPath);       // reads image as boolean

img = double(img);            // convert to double.


Question:        Why does the imread-function read the image as a boolean image and not as a 3-channel image?

Note:              I am totally fine with the result of imread..just being curious.

Thank you,
Philipp
_______________________________________________
users mailing list



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
der_Phil der_Phil
Reply | Threaded
Open this post in threaded view
|

Re: IPCV imread

Quote:

[...] These was a part in the code to check if the image read into Scilab only consist of 2 values, min and max, and it will be automatically converted to binary image.

Quote End

I thought about this, but did not expect it to be true.  :-)

Thanks for clarification.

Philipp





Am Do., 12. Nov. 2020 um 12:32 Uhr schrieb Chin Luh Tan <[hidden email]>:
Hi, 

These was a part in the code to check if the image read into Scilab only consist of 2 values, min and max, and it will be automatically converted to binary image. 

If you're using Windows, consider to download version 4.1.2.3 from https://github.com/tanchinluh/IPCV/tags and use the extra input to force reading in 3 layers. 

img = imread(imPath, IMREAD_COLOR = 1);

Hope this helps.

Regards,
Chin Luh


---- On Wed, 11 Nov 2020 20:20:18 +0800 P M <[hidden email]> wrote ----

Dear Experts,


please improve my understanding of the IPCV function imread for following context:

I have an image which is told to be a 3-channel image.

At least with IrfanView I get a bit depth of 24 ... so I expect it to be an RBG image.


However: The image contains - on purpose - only 2 colors.

Now:

img = imread(imPath);       // reads image as boolean

img = double(img);            // convert to double.


Question:        Why does the imread-function read the image as a boolean image and not as a 3-channel image?

Note:              I am totally fine with the result of imread..just being curious.

Thank you,
Philipp
_______________________________________________
users mailing list



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users