why my picture is 0s ?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Geoff Hayes
le 22 Avr 2019
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.
0 commentaires
Voir également
Catégories
En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!