diff --git a/NeuralDetector/Camera.cpp b/NeuralDetector/Camera.cpp index 79e08a5..47b3265 100644 --- a/NeuralDetector/Camera.cpp +++ b/NeuralDetector/Camera.cpp @@ -8,8 +8,11 @@ Camera::Camera(int port) Camera::port = port; capture = VideoCapture(port); + cameraAvailable = true; + if (!capture.isOpened()) { + cameraAvailable = false; cout << "Failed to open camera on port " << port << endl; } @@ -31,6 +34,9 @@ Camera::~Camera() bool Camera::Calibrate() { + cout << "Hold a 9x7 chessboard below the camera" << endl; + cout << "Press space bar to take a picture" << endl; + // The number of boards you want to capture, the number of internal corners horizontally // and the number of internal corners vertically (That's just how the algorithm works). int numBoards = 10; @@ -156,23 +162,43 @@ bool Camera::Calibrate() fs.release(); destroyAllWindows(); + cout << "Calibration finished, press enter to exit" << endl; + cin.ignore(); + return true; } Mat Camera::getImage() { - Mat imageUndistorted; Mat image; - Mat RGB_img; - capture >> image; + if (!cameraAvailable) + { + vector files; + string dir = "training/"; + read_directory(dir, files); - undistort(image, imageUndistorted, intrinsic, distCoeffs); - - Rect region_of_interest = Rect(10, 10, image.cols - 20, image.rows - 20); - Mat image_roi = imageUndistorted(region_of_interest); + string file = files[rand() % files.size()]; - return image_roi; + cout << file << endl; + + image = imread("training/" + file, CV_LOAD_IMAGE_COLOR); + return image; + } + else + { + Mat imageUndistorted; + Mat RGB_img; + + capture >> image; + + undistort(image, imageUndistorted, intrinsic, distCoeffs); + + Rect region_of_interest = Rect(10, 10, image.cols - 20, image.rows - 20); + Mat image_roi = imageUndistorted(region_of_interest); + + return image_roi; + } } Mat Camera::takeImage() @@ -181,9 +207,13 @@ Mat Camera::takeImage() bool finished = false; + if (!cameraAvailable) + image = getImage(); + while (!finished) { - image = getImage(); + if(cameraAvailable) + image = getImage(); imshow("Live feed", image); @@ -196,3 +226,18 @@ Mat Camera::takeImage() return image; } + + +void Camera::read_directory(const string& name, vector &v) +{ + string pattern = name; + pattern.append("\\*"); + WIN32_FIND_DATA data; + HANDLE hFind; + if ((hFind = FindFirstFile(pattern.c_str(), &data)) != INVALID_HANDLE_VALUE) { + do { + v.push_back(data.cFileName); + } while (FindNextFile(hFind, &data) != 0); + FindClose(hFind); + } +} \ No newline at end of file diff --git a/NeuralDetector/Camera.h b/NeuralDetector/Camera.h index 0b3d396..522670d 100644 --- a/NeuralDetector/Camera.h +++ b/NeuralDetector/Camera.h @@ -5,6 +5,7 @@ #include #include #include +#include #include "avansvisionlib20.h" @@ -21,5 +22,7 @@ private: int port = 0; VideoCapture capture; Mat intrinsic, distCoeffs; + bool cameraAvailable; + void read_directory(const string& name, vector &v); }; diff --git a/NeuralDetector/FeatureExtractor.cpp b/NeuralDetector/FeatureExtractor.cpp index ab6909c..501aef3 100644 --- a/NeuralDetector/FeatureExtractor.cpp +++ b/NeuralDetector/FeatureExtractor.cpp @@ -16,6 +16,7 @@ FeatureExtractor::~FeatureExtractor() void FeatureExtractor::Extract(Mat &ref) { + //Bepaal verschillende features double ar = AspectRatio(); double cr = Circularity(); double bendingEnergy = getBendingEnergy(); @@ -24,10 +25,10 @@ void FeatureExtractor::Extract(Mat &ref) double perimeter = getPerimeter(); double numDefects = convexDefects(); - //ref = (Mat_(1, 7) << 1.0, convexHullBendingEnergy / 100.0, ar, cr, bendingEnergy / 10000.0, , perimeter / 10000.0); ref = (Mat_(1, 5) << 1.0, ar, cr / 10.0, convexHullBendingEnergy / 100.0, numDefects / 100.0); } +//Rotatie onafhankelijke aspect ratio double FeatureExtractor::AspectRatio() { double ar = 0; @@ -40,6 +41,8 @@ double FeatureExtractor::AspectRatio() return ar; } + +//Oppervlakte van de minimale circle gedeeld door het oppervlakte van de bounding box double FeatureExtractor::Circularity() { double radius = getMinEnclosingCircleRadius(); @@ -50,11 +53,13 @@ double FeatureExtractor::Circularity() return cir; } +//Rotated bounding box om het object RotatedRect FeatureExtractor::Rectangle() { return rect; } +//De radius van de minimale circle double FeatureExtractor::getMinEnclosingCircleRadius() { float radius; @@ -66,6 +71,7 @@ double FeatureExtractor::getMinEnclosingCircleRadius() return rad; } +//De lengte van het contour double FeatureExtractor::getPerimeter() { double per = arcLength(contour, true); @@ -73,6 +79,7 @@ double FeatureExtractor::getPerimeter() return per; } +//De bending energy van de contour double FeatureExtractor::getBendingEnergy() { double energy = 0; @@ -92,6 +99,7 @@ double FeatureExtractor::getBendingEnergy() return energy; } +//De bending energy van de convex hull double FeatureExtractor::getConvexHullBendingEnergy() { vector convex; @@ -113,6 +121,7 @@ double FeatureExtractor::getConvexHullBendingEnergy() { return energy; } +//Bending energy support methode, zoekt naar de hoek tussen twee pixels volgens de freeman code int FeatureExtractor::discoverNextRelativeDirection(const cv::Point &pos, const cv::Point &target) { for (int i = 0; i < 8; i++) { @@ -128,6 +137,7 @@ int FeatureExtractor::discoverNextRelativeDirection(const cv::Point &pos, const return -1; } +//Het aantal defecten die in de convexhull zitten double FeatureExtractor::convexDefects() { vector hullsI(contour.size()); // Indices to contour points @@ -138,6 +148,7 @@ double FeatureExtractor::convexDefects() return (double)defects.size(); } +//Statische help functie om het contour te bepalen in een plaatje void FeatureExtractor::findContour(Mat &image, vector &contour) { Mat canny_output; diff --git a/NeuralDetector/Main.cpp b/NeuralDetector/Main.cpp index 051b9bb..1c0bf02 100644 --- a/NeuralDetector/Main.cpp +++ b/NeuralDetector/Main.cpp @@ -17,30 +17,41 @@ int main(int argc, char** argv) Training tr; cout << "Welcome to Jarvis" << endl; - cout << "Would you like to calibrate the camera (c), take pictures (p), train the network (t) or run the neural network (r)?" << endl; - char c; - cin >> c; + bool running = true; - switch (c) { - case 'c': - cam.Calibrate(); - break; - case 'p': - tr.CreateTrainingSet(); - break; - case 't': - tr.LoadTrainingSet(); - break; - case 'r': - run(); - break; - default: - return 0; + while (running) + { + cout << endl << "What would you like to do?" << endl; + cout << "Calibrate the camera (c), take pictures (p), train the network (t), run the neural network (r) or exit (e)?" << endl; + + char c; + cin >> c; + + cout << endl; + + switch (c) { + case 'c': + cam.Calibrate(); + break; + case 'p': + tr.CreateTrainingSet(); + break; + case 't': + tr.LoadTrainingSet(); + break; + case 'r': + run(); + break; + case 'e': + running = false; + break; + default: + return 0; + } } - cout << "The program has finished, press enter to exit" << endl; - cin.ignore(); + cout << "The program has finished" << endl; return 0; } @@ -51,7 +62,13 @@ int run() NeuralNetwork bpn; bpn.Read(); - while (true) + cout << "The neural network is ready to be used" << endl; + cout << "Please place an item below the camera and press the spacebar" << endl << endl; + + + bool running = true; + + while (running) { //Take picture and pre-process Mat image, gray_image, binaryImage; @@ -92,41 +109,17 @@ int run() vector> contours; contours.push_back(contour); drawContours(image, contours, -1, CV_RGB(0, 255, 0), 4); - putText(image, cls, cvPoint(15, 30), - FONT_HERSHEY_COMPLEX, 1.0, cvScalar(0, 0, 0), 1, CV_AA); + putText(image, cls, cvPoint(15, 30), FONT_HERSHEY_COMPLEX, 1.0, cvScalar(0, 0, 0), 1, CV_AA); imshow("Neural detection", image); - waitKey(0); + auto c = waitKey(0); + + if (c == 27) + { + running = false; + } destroyAllWindows(); } -} - - -/* -// Creeer een witte image -IplImage* iplimage = cvCreateImage(cvSize(binaryImage.cols, binaryImage.rows), IPL_DEPTH_8U, 3); -Mat contourImage = cvarrToMat(iplimage); -contourImage = Scalar(255, 255, 255); - -// teken de contouren op de witte image -vector> contours; -contours.push_back(contour); - -Point2f vertices2f[4]; -ext.Rectangle().points(vertices2f); - -// Convert them so we can use them in a fillConvexPoly -Point vertices[4]; -for (int i = 0; i < 4; ++i) { - vertices[i] = vertices2f[i]; -} - -// Now we can fill the rotated rectangle with our specified color -fillConvexPoly(contourImage, vertices, 4, Scalar(0, 255, 0)); -drawContours(contourImage, contours, -1, CV_RGB(255, 0, 0)); - -imshow("Features", contourImage); -waitKey(0); -*/ \ No newline at end of file +} \ No newline at end of file diff --git a/NeuralDetector/NeuralNetwork.cpp b/NeuralDetector/NeuralNetwork.cpp index a81442c..a2df8c2 100644 --- a/NeuralDetector/NeuralNetwork.cpp +++ b/NeuralDetector/NeuralNetwork.cpp @@ -4,6 +4,8 @@ #include "NeuralNetwork.h" +using namespace chrono; + NeuralNetwork::NeuralNetwork() { V0 = Mat(); @@ -40,11 +42,18 @@ Mat NeuralNetwork::Train(Mat& ITset, Mat& OTset) // outputError1: error on output for the current input and new calculated // weighfactors, i.e. V1, W1 double outputError0, outputError1, sumSqrDiffError = MAX_OUTPUT_ERROR + 1; + double lowestError = 10; + Mat V0l, W0l; Mat V1, W1; - cout << endl << "Starting neural training..." << endl; + cout << endl << "Starting neural training, this might take a while..." << endl; int runs = 0; + + milliseconds lasttime = timestamp(); + milliseconds starttime = timestamp(); + bool shown = false; + while ((sumSqrDiffError > MAX_OUTPUT_ERROR) && (runs < MAXRUNS)) { sumSqrDiffError = 0; @@ -67,16 +76,40 @@ Mat NeuralNetwork::Train(Mat& ITset, Mat& OTset) sumSqrDiffError += (outputError1 - outputError0) * (outputError1 - outputError0); + if (sumSqrDiffError < lowestError) + { + lowestError = sumSqrDiffError; + V0l = V0; + W0l = W0; + } + V0 = V1; W0 = W1; } runs++; - if (runs % 1000 == 0) - cout << "Completed " << runs << " runs, still working on it.. (" << sumSqrDiffError << ")" << endl; + if (timestamp() > lasttime + milliseconds(15000) && !shown) + { + cout << "We are still working on it, hold on..." << endl; + shown = true; + } + + if (runs % 500 == 0) + { + shown = false; + auto runtime = (timestamp() - lasttime) / 1000; + cout << "Completed " << runs << " runs, still working on it.. (" << sumSqrDiffError << ")(" << runtime.count() << "s)" << endl; + + lasttime = timestamp(); + } } - cout << "Training complete in " << runs << " runs" << endl; + V0 = V0l; + W0 = W0l; + + auto totalduration = (timestamp() - starttime) / 1000; + cout << "Training finished in " << runs << " runs, it took " << totalduration.count() << "s" << endl; + cout << "The lowest error rate was " << lowestError << ", we are savind the matching factors" << endl; Mat inputVectorTrainingSet, outputVectorTrainingSet, outputVectorBPN; @@ -116,9 +149,6 @@ void NeuralNetwork::Read() void NeuralNetwork::write() { - for (pair p : classes) - cout << p.first << " - " << p.second << endl; - FileStorage fs("factors.yml", FileStorage::WRITE); fs << "W0" << W0 << "V0" << V0; fs.release(); @@ -218,5 +248,13 @@ void NeuralNetwork::mat_class(Mat& ref, string& name) } } - name = classes[index] + " " + to_string(maxvalue*100) + "%"; + name = classes[index] + " - " + to_string(maxvalue*100) + "%"; +} + +milliseconds NeuralNetwork::timestamp() +{ + milliseconds ms = duration_cast( + system_clock::now().time_since_epoch()); + + return ms; } \ No newline at end of file diff --git a/NeuralDetector/NeuralNetwork.h b/NeuralDetector/NeuralNetwork.h index 3277282..9563111 100644 --- a/NeuralDetector/NeuralNetwork.h +++ b/NeuralDetector/NeuralNetwork.h @@ -6,6 +6,7 @@ #include #include #include +#include #include "avansvisionlib20.h" // versie 2.0 (!) @@ -31,4 +32,6 @@ private: void save_class(const string& name, Mat& ref); void class_mat(int index, Mat& ref); void mat_class(Mat& ref, string& name); + + chrono::milliseconds timestamp(); }; \ No newline at end of file diff --git a/NeuralDetector/Training.cpp b/NeuralDetector/Training.cpp index 218dd2f..62fbe92 100644 --- a/NeuralDetector/Training.cpp +++ b/NeuralDetector/Training.cpp @@ -1,7 +1,7 @@ #include "Training.h" -using namespace cv; using namespace std; +using namespace cv; Training::Training() @@ -32,6 +32,8 @@ void Training::CreateTrainingSet() break; } + cout << "Press space to take a picture, fill in a new category (n) or stop (esc)" << endl; + bool takingPhotos = true; int i = 0; @@ -78,6 +80,7 @@ void Training::LoadTrainingSet() read_directory(dir, files); cout << "Found " << files.size()-2 << " files in " << dir << endl; + cout << "Please wait while they are being processed..." << endl; random_shuffle(files.begin(), files.end()); @@ -91,7 +94,7 @@ void Training::LoadTrainingSet() if (!image.data) continue; - cout << "Loaded " << file << endl; + //cout << "Loaded " << file << endl; string classname; class_name(file, classname); @@ -120,8 +123,6 @@ void Training::LoadTrainingSet() bpn.Train(ITset, OTset); - cout << "Training complete" << endl; - cin.ignore(); } diff --git a/NeuralDetector/calibration.yml b/NeuralDetector/calibration.yml index 905b231..e965e24 100644 --- a/NeuralDetector/calibration.yml +++ b/NeuralDetector/calibration.yml @@ -4,12 +4,12 @@ intrinsic: !!opencv-matrix rows: 3 cols: 3 dt: d - data: [ 7.7102786562030786e+04, 0., 3.2013752810898518e+02, 0., - 1.1313075108780187e+05, 2.4041984682542122e+02, 0., 0., 1. ] + data: [ 1.9751044074930709e+04, 0., 3.1998804311606534e+02, 0., + 1.8502329761413108e+04, 2.3996853716247819e+02, 0., 0., 1. ] distCoeffs: !!opencv-matrix rows: 1 cols: 5 dt: d - data: [ -1.6033489811253014e+02, -3.6422783919263818e-02, - -2.9072693275266626e-02, -3.5312598551078556e-01, - -6.9187392701624002e-07 ] + data: [ -8.1460191784170419e+00, -3.9067690989523931e+03, + 1.4768943058283386e-02, 1.2753528858688477e-03, + -2.8023335779025366e-01 ] diff --git a/NeuralDetector/factors.yml b/NeuralDetector/factors.yml index cbe62c7..fd375a5 100644 --- a/NeuralDetector/factors.yml +++ b/NeuralDetector/factors.yml @@ -4,67 +4,67 @@ W0: !!opencv-matrix rows: 8 cols: 10 dt: d - data: [ -4.8813774957793505e+00, -1.4851964864258784e+01, - -4.5483958882918500e+00, 2.3423976029083846e+01, - -2.7036296416086123e+00, -5.9289881679629190e+01, - -3.6879635531940997e+00, -3.3153545804030564e+01, - -1.4020142561256883e+00, -7.0336731756450614e+00, - 8.8357037082684666e+00, 1.2314510070259121e+01, - -3.4472596296194356e+00, -1.1923745474347557e+01, - -4.4282540281508034e+00, 2.4457028473557347e+01, - 3.6136991577659492e+00, -2.5827572663987759e+01, - -1.3892967734397374e+01, -8.4284128215643772e-01, - -1.5656959650996116e+01, -4.7792720274921949e+00, - 2.2975802354552862e+01, -6.2055876498801723e+00, - -5.7482437173820735e+01, -4.6866402386216075e+00, - -3.0466706366866589e+01, -7.0842282146302944e+00, - -6.2597171792574171e+00, -7.2087129758066659e+00, - -1.5425205894698555e+01, 4.3120273767387673e+01, - -5.5453766803160338e+00, -3.9096843912958307e-01, - -1.0403409583426930e+01, 2.5070656273447195e+01, - -1.2109893602230631e+01, 2.9945425250036301e+01, - -5.6642091074608834e+00, -3.0840158943557448e+01, - 2.5513648309284322e+00, -1.7087631494600185e+01, - -1.4015650118577094e+01, -3.3031333903438806e+01, - -1.7294407183796434e+00, -3.2643739919895147e+01, - -1.9333188145064401e+01, -6.3934782960318515e+00, - -1.8871662520667233e+01, -1.5080559598577183e+01, - 5.2874934032701137e-01, 2.5826625216358101e+00, - 8.3597510472828951e+00, -2.0854574479392202e-01, - -1.0790385094292049e+01, -4.8203290529982112e+00, - 2.3059664039490269e+01, -1.5713643646359962e+01, - -2.1086899521790972e+01, -6.1737512017926734e+00, - -1.6040305572556772e+01, -3.1420416546297179e+01, - -9.6651877009273299e+00, -9.3255536054811716e-01, - -8.7417385800329424e+00, 1.4584107173942127e+00, - -1.9611038941263057e+01, -6.9351624096848574e-01, - -3.8496653692305358e+01, 3.1842200474091559e+01, - -1.2903254663541592e+01, -1.4547573929553105e+01, - -9.2829295697875889e+00, -1.0087144923614213e+01, - 2.0960410041424829e+01, -2.1442616606862913e+01, - 2.0254590030822840e+01, -2.9413976475212888e+00, - 3.4350620310034941e+01, -2.0392084844460520e+01 ] + data: [ 1.1336092031696420e+01, 4.5907964608485772e+00, + -9.8170853293097267e+00, 2.8290762007773935e+00, + -1.7922242361752613e+01, 1.4612031964113379e+01, + -4.0479882311598461e+00, -2.7888173455852517e+01, + -1.0401357548127409e+01, -1.9997698224895021e+01, + 1.6526407101734485e+01, -2.5048019194677259e+01, + -1.4599545059796050e+01, -1.0705176170531191e+01, + 1.5591483974571350e+01, -6.2472867926201886e+01, + 2.3716769265461965e-01, -2.4142327639797266e+01, + 4.8956994474556854e+00, -2.0633207709322686e+01, + -1.1954114270472544e+01, -2.1070255286769200e+01, + -5.8841854904753843e+00, 1.1692359784513217e+01, + -3.4386970253466039e+01, -1.2121202433389728e+01, + 1.8539709079086894e+01, -6.6924667544118632e-01, + 2.9549921775562402e+00, -2.8001963902932808e+01, + -1.8422012716016877e+01, -5.1406650430909764e+00, + 2.1360238044988655e+01, -6.1169687658900331e+00, + -4.0230184634597009e+01, -4.5605232444954469e+00, + -3.2840261827923982e+01, -5.4461743522092156e+00, + 2.2158992201314216e+01, -1.0335417208286332e+01, + -1.9828009946150743e+01, 1.4979778939442804e+01, + -5.8343261113808511e+00, 5.7316262652977938e+00, + -6.9994299506424893e+00, -2.6043598644624605e+01, + -4.5790456193267133e+00, -2.7580122152065578e+00, + -4.1716120383476198e+00, -5.7935627689640441e+01, + -3.0543934912013349e+00, -5.0496516841592891e+00, + -1.4040028354202876e+01, -6.6120192400826427e+00, + -3.2379386343661118e+01, 1.6893970327319945e+00, + -2.1038153994851378e+01, 1.3627286069725903e+01, + -5.5299790069242924e+01, 2.0892336998499403e+01, + -9.6072131281893702e-01, 4.2199808448514640e+00, + 8.5745421903391374e+00, -4.7419793494694629e+00, + -1.5332908558713877e+01, -1.2415689661794444e+01, + 1.7861523825076929e+01, -9.3359096106336636e+00, + -2.5532297643346457e+01, -1.6237550846084872e+01, + -1.8541642217263320e+01, -8.4468379830802434e+00, + -2.6841963906955240e+00, -2.9503409603204791e+01, + 3.3671318957004903e+00, 2.8247645228394909e+00, + -7.7324538168255534e+00, 9.5172262300931063e+00, + -9.6252020838806605e+00, 1.2226400714330984e+01 ] V0: !!opencv-matrix rows: 5 cols: 8 dt: d - data: [ -6.5636286541558171e+00, 4.5330404221912382e+01, - -1.1149842067895429e+01, 7.5086888359720900e+00, - 2.8132961939742511e+00, -3.2716268982804380e+01, - 2.4073267678846292e+01, -1.5426805055872450e+01, - -2.3447511567066414e+01, -7.1071961568313483e+01, - 2.4376431377296260e+01, -5.2835959692878383e+01, - 1.5962714728971601e+01, 3.5537070580189244e+01, - -2.9387489075397973e+01, 2.7081013867840458e+01, - 4.3302753434844213e+01, -1.0978817742962482e+02, - -4.2383027486121954e+01, 6.8440729304108856e+01, - -9.6243156066355802e+00, 2.9979769994501602e+01, - -3.7724179920359870e+00, 9.9776059105303023e+00, - 5.0426955715121640e+00, -5.7015329865766313e+00, - 7.6021476153135108e+00, 1.4119669046625256e+00, - -1.3832537537011591e+01, -7.8448492545467206e+00, - -1.8009846302065957e+00, 4.3426637435861783e+00, - 1.6086554490069808e+01, 4.4710323658171866e+01, - -8.9095095711932455e+00, -4.1369158011178691e+00, - -9.9794096446219829e+00, 2.2801143768856548e+01, - -4.2606068131615935e+01, -1.7282938175700217e+01 ] + data: [ 4.0645841804918390e+01, -2.6309456335199283e+01, + -3.2021561992823422e+01, -1.1361589664601377e+01, + -6.2952730506159709e+00, 3.1551765345114354e+01, + -3.3894177485144908e+01, 8.0393818637955405e+00, + -7.0086508010827856e+01, 7.3142485753157672e+01, + 3.3192664589631597e+01, 2.6415090050447283e+01, + -2.8098333741102422e+01, -5.2361784379137518e+01, + 3.4116941209466439e+01, 9.9507452703944796e+00, + -8.1604249037583784e+01, -2.2549578961533932e+01, + 8.5279452974783325e+01, -4.4229283926043621e+01, + 8.1355987392899749e+01, -9.4980076038844263e+00, + 3.6541118219404311e+01, -2.2631072532220497e+01, + -1.5721950954653123e+00, -1.7752668479393374e+00, + 2.6087120719774060e+00, 7.7168135306142345e+00, + -1.9471502823906410e+00, -5.8323043064098918e+00, + -1.0878110969855500e+01, -1.4068980041580041e+01, + 3.5184273457694218e+01, 8.2166133609647263e-01, + -1.7608154171677800e+01, -1.3846806695752736e+01, + -2.9004559923798547e+00, -2.1241811956562779e+00, + 2.6836608163694095e+01, -1.0923774621771331e+01 ] diff --git a/calibration.yml b/calibration.yml new file mode 100644 index 0000000..905b231 --- /dev/null +++ b/calibration.yml @@ -0,0 +1,15 @@ +%YAML:1.0 +--- +intrinsic: !!opencv-matrix + rows: 3 + cols: 3 + dt: d + data: [ 7.7102786562030786e+04, 0., 3.2013752810898518e+02, 0., + 1.1313075108780187e+05, 2.4041984682542122e+02, 0., 0., 1. ] +distCoeffs: !!opencv-matrix + rows: 1 + cols: 5 + dt: d + data: [ -1.6033489811253014e+02, -3.6422783919263818e-02, + -2.9072693275266626e-02, -3.5312598551078556e-01, + -6.9187392701624002e-07 ] diff --git a/classes.yml b/classes.yml new file mode 100644 index 0000000..482918c --- /dev/null +++ b/classes.yml @@ -0,0 +1,4 @@ +%YAML:1.0 +--- +classes: { e0:weerstand, e1:irtrans, e2:switch, e3:reflsens, e4:irsens, + e5:reedsens, e6:card, e7:led, e8:button, e9:rgbled } diff --git a/factors.yml b/factors.yml new file mode 100644 index 0000000..cbe62c7 --- /dev/null +++ b/factors.yml @@ -0,0 +1,70 @@ +%YAML:1.0 +--- +W0: !!opencv-matrix + rows: 8 + cols: 10 + dt: d + data: [ -4.8813774957793505e+00, -1.4851964864258784e+01, + -4.5483958882918500e+00, 2.3423976029083846e+01, + -2.7036296416086123e+00, -5.9289881679629190e+01, + -3.6879635531940997e+00, -3.3153545804030564e+01, + -1.4020142561256883e+00, -7.0336731756450614e+00, + 8.8357037082684666e+00, 1.2314510070259121e+01, + -3.4472596296194356e+00, -1.1923745474347557e+01, + -4.4282540281508034e+00, 2.4457028473557347e+01, + 3.6136991577659492e+00, -2.5827572663987759e+01, + -1.3892967734397374e+01, -8.4284128215643772e-01, + -1.5656959650996116e+01, -4.7792720274921949e+00, + 2.2975802354552862e+01, -6.2055876498801723e+00, + -5.7482437173820735e+01, -4.6866402386216075e+00, + -3.0466706366866589e+01, -7.0842282146302944e+00, + -6.2597171792574171e+00, -7.2087129758066659e+00, + -1.5425205894698555e+01, 4.3120273767387673e+01, + -5.5453766803160338e+00, -3.9096843912958307e-01, + -1.0403409583426930e+01, 2.5070656273447195e+01, + -1.2109893602230631e+01, 2.9945425250036301e+01, + -5.6642091074608834e+00, -3.0840158943557448e+01, + 2.5513648309284322e+00, -1.7087631494600185e+01, + -1.4015650118577094e+01, -3.3031333903438806e+01, + -1.7294407183796434e+00, -3.2643739919895147e+01, + -1.9333188145064401e+01, -6.3934782960318515e+00, + -1.8871662520667233e+01, -1.5080559598577183e+01, + 5.2874934032701137e-01, 2.5826625216358101e+00, + 8.3597510472828951e+00, -2.0854574479392202e-01, + -1.0790385094292049e+01, -4.8203290529982112e+00, + 2.3059664039490269e+01, -1.5713643646359962e+01, + -2.1086899521790972e+01, -6.1737512017926734e+00, + -1.6040305572556772e+01, -3.1420416546297179e+01, + -9.6651877009273299e+00, -9.3255536054811716e-01, + -8.7417385800329424e+00, 1.4584107173942127e+00, + -1.9611038941263057e+01, -6.9351624096848574e-01, + -3.8496653692305358e+01, 3.1842200474091559e+01, + -1.2903254663541592e+01, -1.4547573929553105e+01, + -9.2829295697875889e+00, -1.0087144923614213e+01, + 2.0960410041424829e+01, -2.1442616606862913e+01, + 2.0254590030822840e+01, -2.9413976475212888e+00, + 3.4350620310034941e+01, -2.0392084844460520e+01 ] +V0: !!opencv-matrix + rows: 5 + cols: 8 + dt: d + data: [ -6.5636286541558171e+00, 4.5330404221912382e+01, + -1.1149842067895429e+01, 7.5086888359720900e+00, + 2.8132961939742511e+00, -3.2716268982804380e+01, + 2.4073267678846292e+01, -1.5426805055872450e+01, + -2.3447511567066414e+01, -7.1071961568313483e+01, + 2.4376431377296260e+01, -5.2835959692878383e+01, + 1.5962714728971601e+01, 3.5537070580189244e+01, + -2.9387489075397973e+01, 2.7081013867840458e+01, + 4.3302753434844213e+01, -1.0978817742962482e+02, + -4.2383027486121954e+01, 6.8440729304108856e+01, + -9.6243156066355802e+00, 2.9979769994501602e+01, + -3.7724179920359870e+00, 9.9776059105303023e+00, + 5.0426955715121640e+00, -5.7015329865766313e+00, + 7.6021476153135108e+00, 1.4119669046625256e+00, + -1.3832537537011591e+01, -7.8448492545467206e+00, + -1.8009846302065957e+00, 4.3426637435861783e+00, + 1.6086554490069808e+01, 4.4710323658171866e+01, + -8.9095095711932455e+00, -4.1369158011178691e+00, + -9.9794096446219829e+00, 2.2801143768856548e+01, + -4.2606068131615935e+01, -1.7282938175700217e+01 ]