char * getAlbumPicture(const QString &audioName) { int len, dwFrame = 0, tempi = 0; QFile *pFile = getAudioLabelHeaderLen(audioName, len); if (pFile == NULL) return NULL; bool bRet = getPicInfo(pFile, dwFrame, len, tempi); if (!bRet) return NULL; return getPicRGB(pFile, dwFrame, tempi); }
vector<QImage> EKGImageP::HSegmentation(QImage input) { vector<ImageInfo> imageSum = getPicInfo(input); //Ghate ghate kardan Signal int start = 0,end = 0; vector<QImage> ghataat; bSignal = vector<double> (0); for(int row = 0 ; row < input.height() ; row++) { if(BlackPixel(imageSum[row])) { start = row; int Mmax = 0; while(BlackPixel(imageSum[row]) && row < input.height() ) { if(imageSum[row].count > imageSum[Mmax].count) Mmax = row; row++; } end = row - start; ghataat.push_back(input.copy(0,start,input.width(),end)); maxCount.push_back(Mmax - start); //Check Vertical Count QImage imageBuffer = ghataat[ghataat.size()-1]; vector<QImage> vseg = VSegmentation(imageBuffer); if (!HavaWidth(vseg ,imageBuffer.width() / 2)) { ghataat.pop_back(); maxCount.pop_back(); } } end = 0; } //End Ghate ghate kardan Signal return ghataat; }