Hi, guys!
I'm back! After half of a month's busy work on my schoolwork, I'm
free again to work for SIP. I debug the Windows SIP today, and find the
crash of Transmogrify Demo may be caused by Scilab Graphics. The source
code of mogrify_int.c is bug-free. I tested it by typing the following
commands:
[x,mapx]=imread('lena.jpg');
imshow(x,mapx); <====OK
[y,mapy]=mogrify(x,mapx,'-equalize'); <====no crash
imshow(y,mapy); <====OK, equalized
Everything seems all right, the picture Lena is equalized correctly.
However, when I try the Transmogrify Demo, Scilab crashes as soon as the
function mogrify() is called. I noticed that if I closed the Scilab
Graphics window before next drawing, the crash wouldn't happen:
// EXAMPLE 1 -- Basics
[im,map] = imread('plate.gif');
xbasc(), imshow(im,map); <===Scilab Graphics window pops up, let's
close it
halt()
// Histogram Equalization
// This makes the image features more visible
[im2,map2] = mogrify(im,map, '-equalize');
xbasc(), imshow(im2,map2); <===all right! the annoying crash disappears
halt()
clrscr()
However, closing these graphics windows will cause Scilab crashes very
easily. Now I wonder where the bugs lie...Anyone has ideas?
Zhang Cheng
|