MATLAB: Problem with image processing using edge detection

edge detection

I am trying to do image processing using edge detection on several images. But it's working for all the images except the one I cropped and edited. Please help me. I really need to get this done.

Best Answer

%Change the file name, save as some different name.
% Close Matlab and Restart it again
% Nothing wrong in the following code
clc; clear all; close all;
% Display the original Image
image=imread('safety night.jpg');
% Read Colour Image and convert it to a grey level Image
myimage=rgb2gray(image);
imshow(myimage);
title('Gray Scale Image');