Digitizing a black and white Electrocardiogram scan
I’m trying to digitize a black-and-white scanned image of an electrocardiogram (BW_ECG.png is an example image with the scale bar for the vertical grid lines). I have already performed edge detection and dilated the image to isolate the prominent features (BW_ECG_dilated.png):
% Detect edges within the region of interest
bw_image = im2gray(roi_image);
edge_image = edge(bw_image, ‘sobel’);
% Display the edge image
figure;
imshow(edge_image);
title(‘Edge detected image’);
% Dilate the edge detected image
background_dots_size = 7;
dilated_image = imdilate(edge_image, strel(‘disk’, background_dots_size));
figure;
imshow(dilated_image);
title(‘Dilated image’);
How can I now:
Remove the background grid dots
Extract a numerical vector representing the ECG signalI’m trying to digitize a black-and-white scanned image of an electrocardiogram (BW_ECG.png is an example image with the scale bar for the vertical grid lines). I have already performed edge detection and dilated the image to isolate the prominent features (BW_ECG_dilated.png):
% Detect edges within the region of interest
bw_image = im2gray(roi_image);
edge_image = edge(bw_image, ‘sobel’);
% Display the edge image
figure;
imshow(edge_image);
title(‘Edge detected image’);
% Dilate the edge detected image
background_dots_size = 7;
dilated_image = imdilate(edge_image, strel(‘disk’, background_dots_size));
figure;
imshow(dilated_image);
title(‘Dilated image’);
How can I now:
Remove the background grid dots
Extract a numerical vector representing the ECG signal I’m trying to digitize a black-and-white scanned image of an electrocardiogram (BW_ECG.png is an example image with the scale bar for the vertical grid lines). I have already performed edge detection and dilated the image to isolate the prominent features (BW_ECG_dilated.png):
% Detect edges within the region of interest
bw_image = im2gray(roi_image);
edge_image = edge(bw_image, ‘sobel’);
% Display the edge image
figure;
imshow(edge_image);
title(‘Edge detected image’);
% Dilate the edge detected image
background_dots_size = 7;
dilated_image = imdilate(edge_image, strel(‘disk’, background_dots_size));
figure;
imshow(dilated_image);
title(‘Dilated image’);
How can I now:
Remove the background grid dots
Extract a numerical vector representing the ECG signal image processing, image analysis MATLAB Answers — New Questions