09-22-2013 06:00 AM
The previous image shows what I am getting when I run the vi and if I click cancel or close the window that appears, the PC will immediately exit labview
09-22-2013 06:43 AM
Hello,
that is a strange error. I have never seen it before.
I cannot help you here, sorry.
I assume you installed OpenCV 2.4.5 (and added the proper folder to the system path), right?
What does it say if you look at the files that are generated with the error ("files that help describe the problem")?
Best regards,
K
09-22-2013 07:26 AM
09-22-2013 07:33 AM
When I open the file generated with the error this is what it looks like
09-22-2013 07:49 AM
11-29-2013 07:55 AM
you get an error from the Dell block that is called 1097, i get the same.
i got LV to crash but when i copyed the part and i copied the used files into my vi file path, the program did not crash anymore, but i do not detech anyone:-(
12-06-2013 02:42 AM
Hello,
I will try to take a look and report back.
Sorry for the late reply.
Best regards,
K
12-06-2013 07:41 AM - edited 12-06-2013 07:41 AM
Hello,
can you try the attached image (taken from online pedestrian database) with the following values:
and see if you get the same results:
Best regards,
K
01-06-2014 10:19 AM
Dear Klemen,
the labview vi worked perfectly but without specifying the image path,when i put any other image path i receive the same image you had posted (the first one)
any ideas?
Thank you
01-06-2014 10:44 AM
Hello,
this is how I have implemented HOG from opencv to LabView
typedef struct HogParams { /* win_size – Detection window size. Align to block size and block stride. block_size – Block size in pixels. Align to cell size. Only (16,16) is supported for now. block_stride – Block stride. It must be a multiple of cell size. cell_size – Cell size. Only (8, 8) is supported for now. nbins – Number of bins. Only 9 bins per cell are supported for now. win_sigma – Gaussian smoothing window parameter. threshold_L2hys – L2-Hys normalization method shrinkage. gamma_correction – Flag to specify whether the gamma correction preprocessing is required or not. nlevels – Maximum number of detection window increases. derivAperture - size of extended sobel kernel (1, 3, 5, 7), for size 1 kernel 1,3 and 3,1 is used, no gaussian smoothing is done */ int32_t cellsize_width; int32_t cellsize_height; int32_t blocksize_width; int32_t blocksize_height; int32_t winsize_width; int32_t winsize_height; int32_t blockstride_x; int32_t blockstride_y; int32_t nBins; double win_sigma; double threshold_L2hys; int32_t gammaCorrection; int32_t derivAperture; int32_t winstride_x; int32_t winstride_y; } HogParams; typedef struct Arr1D_float { int32_t dimSize; float Arr[1]; } Arr1D_float, **Arr1D_floatHdl; int GetHOGFeatures(Arr1D_floatHdl FeatArrHdl, IMAQ_Image *img, HogParams *Params) //returns -1 on HOG window parameters missmatch { ImageInfo *Info = NULL; Info = (ImageInfo*)img->address; CheckImage(Info, Info); cv::Mat GREYimg; GREYimg = cv::Mat(Info->yRes, Info->xRes, CV_8U, (char*)Info->imageStart, sizeof(uint8_t)*Info->pixelsPerLine); //cv::cvtColor(BGRAimg, GREYimg, CV_BGRA2GRAY); //set params into hog object cv::HOGDescriptor hog; hog.winSize = cv::Size(Params->winsize_width, Params->winsize_height); hog.blockSize = cv::Size(Params->blocksize_width, Params->blocksize_height); hog.blockStride = cv::Size(Params->blockstride_x, Params->blockstride_y); hog.cellSize = cv::Size(Params->cellsize_width, Params->cellsize_height); hog.nbins = Params->nBins; hog.derivAperture = Params->derivAperture; hog.winSigma = Params->win_sigma; hog.L2HysThreshold = Params->threshold_L2hys; hog.gammaCorrection = (Params->gammaCorrection != 0); MgErr error = mgNoErr; cv::vector<float> ders; cv::vector<cv::Point> locations; try { //winstride - step of window //padding - borderpadding //raises exception with incorrect params ... todo replace trycatch with paramchecking hog.compute(GREYimg, ders, cv::Size(Params->winstride_x, Params->winstride_y), cv::Size(0,0), locations); } catch(...) { return -1; } //copy out the data into LabView error = DSSetHandleSize(FeatArrHdl, sizeof(int32_t) + ders.size()*sizeof(float)); memcpy((*FeatArrHdl)->Arr, ders.data(), sizeof(float)*ders.size()); (*FeatArrHdl)->dimSize = ders.size(); return error; }
it works allright, the checkimage function only checks some formal image parameters and sets bordersize to 0. The input image must be uchar8 bit