Convert signal to image??

15 visualizzazioni (ultimi 30 giorni)
Tariq Nazzal
Tariq Nazzal il 5 Nov 2012
Commentato: Tariq Nazzal il 7 Feb 2021
Hy,
I read analog signal from external device "ECG" by serial rs232 connection, I need to cut this signal to stored as image by code in matlab because my m file program is depended of Image processing not signal processing and my project is about image processing, so I can't write my program by signal processing.
my problems is:
1- read the signal from serial port.
2- convert this signal to image, and stored this image in current folder of matlab.
3- Please, I need answers for the last problems as codes not as Block. because I work at M file.
thanks for everyone try to help me,

Risposte (2)

Image Analyst
Image Analyst il 5 Nov 2012
You could use reshape() to turn your 1D signal into a 2D image, though I don't know if that would help. Anyway, many or most functions in the Image Processing Toolbox work on 1D images (just a single row or column of "pixels") so you may not need to do anything at all with your 1D ECG signal..
  12 Commenti
Tariq Nazzal
Tariq Nazzal il 10 Nov 2012
one other question, Please
Is there a code work as snapshot automatically? I mean when I plot the signal I need code to work as snapshot, but automatically
Walter Roberson
Walter Roberson il 10 Nov 2012
getframe()

Accedi per commentare.


kh rezaee
kh rezaee il 6 Feb 2021
Use spectogram functions of signal to convert as an image. I guess you need this method to process images using deep learning. It should be noted that you must segment the signal before applying it to the network. Use these functions:
spectrogram(1DSignal)
pspectrum(1DSignal,FS,'spectrogram')
wvd(1DSignal,FS,'smoothedPseudo')
  4 Commenti
Walter Roberson
Walter Roberson il 7 Feb 2021
wvd() was introduced in R2018b, in the Signal Processing Toolbox. pspectrum needs R2017b (and so would not work in R2017a)
Tariq Nazzal
Tariq Nazzal il 7 Feb 2021
A lots happened since 2012. I graduated. I worked in different fields until I ended as a lift engineer. I got married. I moved to the UK and now still working as a lift engineer in the UK and had nothing to do with image processing and matlab in general. I even reset my password to write this comment. I remember I solved my issue at the time anyway and can’t remember how. Maybe the positive points now I have a good English not rubbish one. And I don’t use this picture as a profile picture anymore. I do have lots better lol.
Thanks guys it’s nice to have a notification for something you asked from a long time

Accedi per commentare.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by