Bekhtaoui - you say that the function "my_sct" takes an image like input(image2 result from another program). What does this other program do? Your screen shot shows that the data type of image2 is double. Does that perhaps mean that the elements of this matrix are in the interval [0 1] instead of [0 255] which is maybe what your code is assuming? I think that when you say that you use image2=imread('image2.jpg') to read the first output and that this works, it could be because the units/data type is uint8.
why my picture is 0s ?
1 次查看(过去 30 天)
显示 更早的评论
I work on my project I have a problem
this is my program at the beginning i did it without the function structure then i wanted to put the function structure
as you see my function "my_sct" takes an image like input(image2 result from another program) and must give me an image (look workspace)
the problem is
when I run the program I see 0s and the picture result (output) is black
but when i use image2=imread('image2.jpg') to read the first output picture and i call my fonction "ma_sct(image2)" in commande window i have the correct result
so how to take the image from the first program without going through imread (from workspace)?
0 个评论
回答(1 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!