Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
neo3dot1415

Junior Member
Registered:
Posts: 29
Reply with quote  #1 

Hi Jaewon,

I'm using gray background for my experiments and am using photodiode signal, too.

The photodiode patch color is white which results in no good signal. Also, I've changed the experiment background to white and photodiode patch was still white! 

Would be great if there is a way to fix it.

Thanks.

0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #2 
Hi neo3dot1415,

It was my mistake. The photodiode patch should alternate between black and white, irrespective of the background color. However, I hard-coded black as the default transparent key color for bitmaps, so it became transparent when it was supposed to be black.  I will upload an update soon. Thanks for letting me know this.
0
neo3dot1415

Junior Member
Registered:
Posts: 29
Reply with quote  #3 
Thanks Jaewon for the new version. The photodiode patch is now working properly, although I've found another issue with using new version (Feb.06). 

contrast.jpg   


The oriented bar in the image above is inside the black square, although it was correct using previous ML versions (like the image below).

contrast_correct.jpg   

Do you have any suggestion? Thanks.

0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #4 
It is by design. You have exploited my mistake to make black-background images transparent. However, since the conditions file syntax does not provide a way to specify the color key, now you have to make them transparent with alpha blending and save them as the PNG format.

If you don't want to change your stimuli for now, modify monkeylogic.m & mgl\mgladdbitmap.m like the following.

----- monkeylogic.m -----
Line 1744:        imdata = cat(3,ones(sz,sz),zeros(sz, sz, 3));
Line 1746:        imdata = ones(sz, sz, 4);
----- end of modification -----

----- mgl\mgladdbitmap.m -----
Line 20: default_colorkey = [0 0 0];
-----end of modification -----
0
neo3dot1415

Junior Member
Registered:
Posts: 29
Reply with quote  #5 
Thanks Jaewon. It worked. 
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #6 
Actually your figure reminded me that I should have used the alpha channel for my button images as well. I updated the package, but you can download the file below and overwrite it on your mgl directory.

 
Attached Files
zip mglbitmapdata.zip (3.14 KB, 4 views)

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.