Ask Your Question

manef's profile - activity

2019-08-02 05:14:20 -0600 commented answer problem while load trained svm android

thanks @berak for your answear. i got that problem but a big problem is that the Loading the trained SVM RBF don't work

2019-07-30 06:57:49 -0600 edited question problem while load trained svm android

problem while load trained svm android hello guys, i'm working on regions detection, so i'm using SVM with opencv 3.4 on

2019-07-30 06:56:52 -0600 marked best answer problem while load trained svm android

hello guys, i'm working on regions detection, so i'm using SVM with opencv 3.4 on Android studio, i tried to save the trained model of SVM and loaded after but for some reasons that i don't know the load function didn't work in my case ( I'm using Blue stack 4 emulator connected to android studio).The SVM is working fine if i trained him each time ( without using save and load), in my code i used the "getAbsolutePath()" function to get the xml file path and give it to the load function but it don't works. the problem is in the opencv android or in my code please help

SVM svm = SVM.create();
svm.setType(SVM.C_SVC);
svm.setKernel(SVM.RBF);
svm.setC(10000);
svm.setGamma(0.00001);
svm.setTermCriteria(new TermCriteria(TermCriteria.MAX_ITER, 100, 1e-6));
svm.train(trainingDataMat, ROW_SAMPLE, labelsMat);

File datasetFile = new File(Environment.getExternalStorageDirectory(), "dataset.xml");
svm.save(datasetFile.getAbsolutePath());

for loading the trained SVM i used this lines of code

 SVM svm = SVM.create();
 String path = "/storage/emulated/0/dataset.xml";
 svm.load(path());
2019-07-30 06:56:52 -0600 commented answer problem while load trained svm android

thanks it worked, the problem was that i created the SVM using SVM.ceate() and then load my XML file. @berak instead of

2019-07-29 09:04:34 -0600 asked a question problem while load trained svm android

problem while load trained svm android hello guys, i'm working on regions detection, so i'm using SVM with opencv 3.4 on

2019-01-17 05:55:56 -0600 commented answer how to find optimal SVM parameters gamma and cost using grid search with 5-fold cross validation process?

I'm trying tio traing SVM , SVM always give my positive result, i tried to change somme param like using RGB with differ

2019-01-17 05:25:05 -0600 commented answer how to find optimal SVM parameters gamma and cost using grid search with 5-fold cross validation process?

hi @break, in training could i find a function or method to know if my training could give me good result or do i have t

2019-01-02 12:31:14 -0600 commented answer memory exception while training SVM

@break i verified that the svm is trained but the problem in the save function link text

2019-01-02 12:29:42 -0600 commented question Training SVM and saving data

mate did you fixed this problem ? i have the same issue and as you SVM is trained but the problem in saving.

2019-01-02 07:35:38 -0600 asked a question SVM training problem

SVM training problem while training SVM classifier i got this error while saving the result : OpenCV Error: Parsing erro

2019-01-02 07:23:01 -0600 commented answer memory exception while training SVM

the value returned for train ? how and what's is suppose to be like ?! sorry but i have no ideaaa

2019-01-02 06:20:29 -0600 edited answer memory exception while training SVM

ow i changed the trainingDataMat from Mat trainingDataMat (47, 27000, CV_32FC1) to only Mat trainingDataMat and it worke

2019-01-02 06:20:15 -0600 answered a question memory exception while training SVM

ow i changed the trainingDataMat from Mat trainingDataMat (47, 27000, CV_32FC1) to only Mat trainingDataMat and it worke

2019-01-02 05:35:34 -0600 commented question memory exception while training SVM

this is my first time with reshape and i know that reshape transform my Mat (1350,20) in my case to one row in other Ma

2019-01-02 05:05:19 -0600 commented question memory exception while training SVM

'm using the push_back(reshape(1,1)) to put all my features ( from files) in the same Mat, i looked in many tuto and i f

2019-01-02 04:59:10 -0600 commented question memory exception while training SVM

i changed the Labels Mat to integer and nothing i still have the same error. i have question, the training Mat and the L

2018-12-30 16:29:28 -0600 asked a question memory exception while training SVM

memory exception while training SVM to train SVM classifier i use features extracted from different images ( each image

2018-12-28 18:15:28 -0600 commented question reshape problem while training

@break I'm going to fill the trainData in my case with features extracted. but the cols of the trainData (is the number

2018-12-28 12:38:11 -0600 commented question reshape problem while training

yeah i know but the problem i can't use him with java (android-studio) :( shame .

2018-12-28 12:30:23 -0600 commented question reshape problem while training

and the eval function return the performznce of the training ?! and i'm going to use the features extracted for the trai

2018-12-28 12:28:24 -0600 commented question reshape problem while training

and the eval function return the performznce of the training ?!

2018-12-28 12:20:39 -0600 commented question reshape problem while training

and for adding the features in the Mat of training data i have a question, each image have different number of features

2018-12-28 12:16:10 -0600 commented question reshape problem while training

@break and the optic disk is going to be deleted from the result after classification

2018-12-28 11:56:58 -0600 commented question reshape problem while training

bu the way how long it takes you to write all this code !! i'm trying to understand it ;)

2018-12-28 11:53:22 -0600 commented question reshape problem while training

in each xml file there's 4 image cause the database contain 3 type of lesions of diabetic retinopathy : exudate, Haemorr

2018-12-28 11:45:21 -0600 commented question reshape problem while training

for your question about the groundtruth. if you download the data Base you will find the image of the groundtruth png ty

2018-12-27 13:01:29 -0600 asked a question using features extracted with SVM classifier

using features extracted with SVM classifier I'm developing a paper. in this paper i had to extract (20 features for eac

2018-12-27 11:40:23 -0600 commented question reshape problem while training

this file contain my features extraction from each image . So i for each image i apply some preprocessing treatment and

2018-12-27 11:15:37 -0600 commented question reshape problem while training

@break i found a good tuto of using SVM tuto but i can't find how to use my features extracted in the training + i found

2018-12-27 09:00:29 -0600 commented question reshape problem while training

@break sorry for wasting your time but in the training of the SVM. the training Data i have to give to the SVM the imag

2018-12-25 08:21:24 -0600 commented question reshape problem while training

i had some issue i fixed them and I'm back + i have a professor that want to develop all the paper function in a mobile

2018-12-25 02:52:12 -0600 commented question reshape problem while training

I found this answer it's your i think i'll try to correct my code using it answer

2018-12-25 02:49:24 -0600 commented question reshape problem while training

thanks for your replays. after applying the SLIC I extract the features so I have to give the classifier the images afte

2018-12-25 02:41:14 -0600 commented question reshape problem while training

thanks for your replays. after applying the SLIC I extract the features so I have to give the classifier the images afte

2018-12-24 15:22:15 -0600 asked a question reshape problem while training

reshape problem while training I want to train my classifier LDA. I followed this link. but my code is crushing with mem

2018-12-23 14:28:12 -0600 commented question LDA training opencv c++

@break sorry for this question but in my groundtruth i have images with value 00 or 255 . I have to change my graound tr

2018-12-21 08:45:41 -0600 answered a question how to use linear discriminant analysis algorithm in opencv with c++

see this link could help

2018-12-20 04:32:05 -0600 commented question LDA training opencv c++

yeah i'm looking to find if there is sign of DR in the image (exudates in my case). so the result of the classification

2018-12-20 03:52:08 -0600 commented question LDA training opencv c++

sure : link

2018-12-20 03:36:17 -0600 commented question LDA training opencv c++

@break please i want to repeat the training process 10 time. It's possible to put the training code in loop 10 time or h

2018-12-19 04:53:43 -0600 commented question LDA training opencv c++

yeah because I'm new in opencv andm dealing with classification for the first time sorry. so i have to put all images of

2018-12-19 04:47:11 -0600 commented question LDA training opencv c++

@break trainLabels it's my groundtruth ? that's mean if that pixel belong to the ROI pixels ? 1 or 0 ?! because i'm wor

2018-12-17 08:15:56 -0600 commented question LDA training opencv c++

i saw this example before but i couldn't understand do i have to resize all my image ? and for the trainig i have to put

2018-12-17 07:10:30 -0600 asked a question LDA training opencv c++

LDA training opencv c++ I'm working with retinal images and i' have to use LDA classifier with 2 classes. I have a data

2018-12-10 16:24:58 -0600 asked a question saving image using emulator

saving image using emulator I'm using android studio with opencv3.4.0, i'm looking to save image after applying some fun

2018-12-09 06:23:20 -0600 commented answer converting Lab to RGB

it worked thanks a lot, the problem was in the Lab.add(0,L); as you said it reference so I don't need to add it, if i a

2018-12-09 06:21:44 -0600 marked best answer converting Lab to RGB

I'm using opencv 3.4.0 and android-studio, I want to apply CLAHE on the L channel so i used the Lab color space, but after applying CLAHE on th L channel i and last i converted the image back to RGB color space but i got this error whil trying to display the image. this is the error :

CvException [org.opencv.core.CvException: cv::Exception: OpenCV(3.4.0-dev) ../../modules/imgproc/src/color.cpp:11207: error: (-215) scn == 3 && (dcn == 3 || dcn == 4) &&



L = new Mat(newImage.rows(), newImage.cols(), CvType.CV_8UC(1));
a = new Mat(newImage.rows(), newImage.cols(), CvType.CV_8UC(1));
b = new Mat(newImage.rows(), newImage.cols(), CvType.CV_8UC(1));

BGR_RGB = Utils.loadResource(getApplicationContext(), R.drawable.retinalimage, CvType.CV_32FC3); 
Imgproc.cvtColor(BGR_RGB, newImage, Imgproc.COLOR_BGR2RGB);
Imgproc.cvtColor(newImage,newImage,Imgproc.COLOR_RGB2Lab);
split(newImage,Lab);
L = Lab.get(0);
a = Lab.get(1);
b = Lab.get(2);

CLAHE ce = Imgproc.createCLAHE();
ce.setClipLimit(2);
ce.setTilesGridSize(new Size(8, 8));
ce.apply(L, L);

Lab.add(0,L);
Core.merge(Lab,newImage);
Imgproc.cvtColor(newImage,newImage,Imgproc.COLOR_Lab2RGB);
showImage(newImage);