This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function metrics = pr_eval(detectVol, truthVol) | |
| % W. Gray Roncal - 02.12.2015 | |
| % Feedback welcome and encouraged. Let's make this better! | |
| % Other options (size filters, morphological priors, etc. can be added. | |
| % z = rand(100,100); | |
| % t = z > 0.8; | |
| % | |
| tic | |
| %% params |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % whiteandgold | |
| img = imread('dress.jpg'); | |
| white_pt = [243, 210]; | |
| gold_pt = [537, 339]; | |
| white_rgb = squeeze(img(white_pt(1), white_pt(2), :)); | |
| gold_rgb = squeeze(img(gold_pt(1), gold_pt(2), :)); | |
| figure; subplot(1, 3, 1); | |
| imagesc(img); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % Adjusted Rand Index Example | |
| mu0 = [0, 0]; | |
| sigma0 = [1, 0; 0, 1]; | |
| h0 = mvnrnd(mu0, sigma0, 50); | |
| mu1 = [2, 3]; | |
| sigma1 = [2, 0; 0, 2 ]; | |
| h1 = mvnrnd(mu1,sigma1, 50); |