Best practice: CWT image generating for Deep Learning images
Hi,
I am looking some advice/best practice for genrating, formating and saving CWT images.
The task: I have ~5000 hours of EEG data recorded with lables at each thirty second interval. I would like to generate the CWT image of each 30 second window and save it. The image, should be devoide of a border, tics, axis lables and titles (i.e. just the spectogram image).
The Problem: I can generate an image with cwt(sig,fs), which is square, however includes all the extra bits I don’t want, like borders:
load mtlb
w = cwt(mtlb);
cwt(mtlb,"bump",Fs)
I could extract the image out with a handle and save that way:
load mtlb
w = cwt(mtlb);
fig = cwt(mtlb,"bump",Fs); % Hide the output as it’s quite long.
However, it quicly becomes apparent that the image data is not square, but rectangular.
load mtlb
w = cwt(mtlb);
fig = cwt(mtlb,"bump",Fs);
imshow(abs(fig)) % here’s the same image in grayscale.
While I understand that the image is fundamentally rectangular, the skeewed aspect ratio becomes an unknown when ingested by a DL algoritum, to that end I would like to have all my images processed and "squared up" before being ingested. I wanted to know if anyone had any suggestions as to the best way to generate these CWT images in a manner that is easily ingested by DL networks, not disimilar to this paper, however the detail are light.Hi,
I am looking some advice/best practice for genrating, formating and saving CWT images.
The task: I have ~5000 hours of EEG data recorded with lables at each thirty second interval. I would like to generate the CWT image of each 30 second window and save it. The image, should be devoide of a border, tics, axis lables and titles (i.e. just the spectogram image).
The Problem: I can generate an image with cwt(sig,fs), which is square, however includes all the extra bits I don’t want, like borders:
load mtlb
w = cwt(mtlb);
cwt(mtlb,"bump",Fs)
I could extract the image out with a handle and save that way:
load mtlb
w = cwt(mtlb);
fig = cwt(mtlb,"bump",Fs); % Hide the output as it’s quite long.
However, it quicly becomes apparent that the image data is not square, but rectangular.
load mtlb
w = cwt(mtlb);
fig = cwt(mtlb,"bump",Fs);
imshow(abs(fig)) % here’s the same image in grayscale.
While I understand that the image is fundamentally rectangular, the skeewed aspect ratio becomes an unknown when ingested by a DL algoritum, to that end I would like to have all my images processed and "squared up" before being ingested. I wanted to know if anyone had any suggestions as to the best way to generate these CWT images in a manner that is easily ingested by DL networks, not disimilar to this paper, however the detail are light. Hi,
I am looking some advice/best practice for genrating, formating and saving CWT images.
The task: I have ~5000 hours of EEG data recorded with lables at each thirty second interval. I would like to generate the CWT image of each 30 second window and save it. The image, should be devoide of a border, tics, axis lables and titles (i.e. just the spectogram image).
The Problem: I can generate an image with cwt(sig,fs), which is square, however includes all the extra bits I don’t want, like borders:
load mtlb
w = cwt(mtlb);
cwt(mtlb,"bump",Fs)
I could extract the image out with a handle and save that way:
load mtlb
w = cwt(mtlb);
fig = cwt(mtlb,"bump",Fs); % Hide the output as it’s quite long.
However, it quicly becomes apparent that the image data is not square, but rectangular.
load mtlb
w = cwt(mtlb);
fig = cwt(mtlb,"bump",Fs);
imshow(abs(fig)) % here’s the same image in grayscale.
While I understand that the image is fundamentally rectangular, the skeewed aspect ratio becomes an unknown when ingested by a DL algoritum, to that end I would like to have all my images processed and "squared up" before being ingested. I wanted to know if anyone had any suggestions as to the best way to generate these CWT images in a manner that is easily ingested by DL networks, not disimilar to this paper, however the detail are light. image processing, image analysis, cwt MATLAB Answers — New Questions