This work describes new techniques to improve VF detection and its separation from Ventricular Tachycarida (VT) and other rhythms. It is based on time-frequency representation of the ECG and its use as input in an automatic classifier (K-nearest neighbours - KNN) without any further signal parameter extraction or additional characteristics. For comparison purposes, three time-frequency variants are analysed: pseudo Wigner-Ville representation (RTF), grey-scale image obtained from RTF (IRTF), and reduced image from IRTF (reduced IRTF). Four types of rhythms (classes) are defined: ’Normal’ for sinus rhythm, ’VT’ for ventricular tachycardia, ’VF’ for ventricular fibrillation and ’Others’ for the rest of rhythms. Classification results for VF detection in case of reduced IRTF are 88.27% sensitivity and 98.22% specificity. In case of VT, 88.31% sensitivity and 98.80% specificity is obtained, 98.14% sensitivity and 96.82% specificity for normal rhythms, and 96.91% sensitivity and 99.06% specificity for other rhythms. Finally, results are compared with other authors.