[Scilab-users] Native managed Hypermatrices affect the Matplot functionality?

Tan Chin Luh chinluh at tritytech.com
Sun Mar 12 07:21:05 CET 2017


Thanks Samuel,

Before I make the report, just to clarify one more point.

The data extracted suppose to show white color plot, however:


a = uint8(zeros(480,640,3));
a(:,:,1) = uint8(255);
a(:,:,2) = uint8(180);
a(:,:,3) = uint8(60);
Matplot(a);
*// View the image first before running following lines, this will show 
orange color*
e = gce();
e.data = a;
*// **this will show 3 columns of image, left -> white, middle -> gray, 
right -> black*
b = e.data;
and(b==255)
*// this will show white image*
Matplot(b);


Any extra comments to add into bug report? Thanks again.

rgds,
CL

On 11/3/2017 9:53 PM, Samuel Gougeon wrote:
> Hello,
>
> Le 11/03/2017 à 12:59, Tan Chin Luh a écrit :
>> .../...
>>
>> 2.  To solve this in Scilab 5.5.2, we usually assign the data 
>> directly into the Matplot children data. However, in Scilab 6, when 
>> we run:
>>
>> a  =  uint8(zeros(480,640,3));
>> a(:,:,1)  =  uint8(255);
>> a(:,:,2)  =  uint8(180);
>> a(:,:,3)  =  uint8(60);
>> Matplot(a);
>> // View the image first before running following lines
>> h  =  gcf();
>> h.children.children.data  =  a;
>>
>> Even we assigned back the same variable, the orientation of the data 
>> is wrong and the image is wrongly plot on the figure. The above 
>> example will show orange color in the first plot, and after assigning 
>> the same data back into the Matplot children data, the 3 layers are 
>> arrange in wrong order resulting wrong display.
>>
>
> This is clearly a regression. Only the first layer is actually 
> assigned, others being ignored:
> e = gce();
> size(e.data)
> and(e.data==255)
>
> --> e = gce();
>
> --> size(e.data)
>  ans  =
>    480.   640.
>
> --> and(e.data==255)
>  ans  =
>   T
>
> You may post a report about it.
>
> Best regards
> Samuel
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170312/8f4cc8f1/attachment.htm>


More information about the users mailing list