Cody

Solution 2228813

Submitted on 22 Apr 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
I = imread(fullfile(matlabroot,'toolbox','images','imdata','circles.png')); [centers,radii] = detectcircles(I,[18 20],13); c = [119 222; 185 218; 124 116; 37 37; 178 184; 93 167; 37 72; 71 38; 93 132; 122 186; 97 96; 71 74; 151 204]; r = 19*ones(13,1); d1 = squeeze(sqrt(sum(bsxfun(@minus,centers,permute(c,str2num('3 2 1'))).^2,2))); d2 = squeeze(sqrt(sum(bsxfun(@minus,radii,permute(r,str2num('3 2 1'))).^2,2))); mask = d1<5 & d2<5; Re = mean(any(mask)); Pr = sum(any(mask))/size(mask,1); assert(Pr>=0.5) assert(Re>=0.75)

ans = Columns 1 through 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 4 7 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 5 8 12 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 6 9 13 18 23 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 6 10 14 19 25 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 5 9 14 19 25 32 39 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 4 8 13 19 25 32 40 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 7 12 18 25 32 40 49 58 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 5 10 16 23 31 39 48 58 68 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 4 8 14 21 29 38 47 57 68 79 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 6 11 18 26 35 45 55 66 78 90 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 8 14 22 31 41 52 63 75 88 101 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 10 17 26 36 47 59 71 84 98 112 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 6 13 21 31 42 54 67 80 94 109 124 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 8 16 25 36 48 61 75 89 104 120 136 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 10 19 29 41 54 68 83 98 114 131 148 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 12 22 33 46 60 75 91 107 124 142 160 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 14 25 37 51 66 82 99 116 134 153 172 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 16 28 41 56 72 89 107 125 144 164 184 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 17 30 44 60 77 95 114 133 153 174 195 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 18 32 47 64 82 101 121 141 162 184 206 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 19 34 50 68 87 107 128 149 171 194 217 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 20 36 53 72 92 113 135 157 180 204 228 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 21 38 56 76 97 119 142 165 189 214 239 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 21 39 58 79 101 124 148 172 197 223 249 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 21 39 59 81 104 128 153 178 204 231 258 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 21 39 60 83 107 132 158 184 211 239 267 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 21 39 60 84 109 135 162 189 217 245 273 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 21 39 60 84 110 137 165 193 221 249 277 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 21 39 60 84 110 138 166 194 222 250 278 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 21 39 60 84 110 137 165 193 221 249 277 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 21 39 60 84 109 135 162 190 218 246 274 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 21 39 60 83 107 132 158 185 212 240 268 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 21 39 60 82 105 129 154 180 206 233 261 0 0 ...

Output argument "centers" (and maybe others) not assigned during call to "detectcircles". Error in Test1 (line 2) [centers,radii] = detectcircles(I,[18 20],13);

2   Fail
I = imread(fullfile(matlabroot,'toolbox','images','imdata','circlesBrightDark.png')); [centers,radii] = detectcircles(I,[32 64],6); c = [75 250; 100 100; 250 400; 300 120; 450 240; 330 370]; r = [35; 50; 60; 40; 50; 55]; d1 = squeeze(sqrt(sum(bsxfun(@minus,centers,permute(c,str2num('3 2 1'))).^2,2))); d2 = squeeze(sqrt(sum(bsxfun(@minus,radii,permute(r,str2num('3 2 1'))).^2,2))); mask = d1<5 & d2<5; Re = mean(any(mask)); Pr = sum(any(mask))/size(mask,1); assert(Pr>=0.5) assert(Re>=0.75)

ans = Columns 1 through 15 63 148 238 328 418 508 598 688 778 868 958 1048 1138 1228 1318 148 347 558 769 980 1191 1402 1613 1824 2035 2246 2457 2668 2879 3090 238 558 897 1236 1575 1914 2253 2592 2931 3270 3609 3948 4287 4626 4965 328 769 1236 1703 2170 2637 3104 3571 4038 4505 4972 5439 5906 6373 6840 418 980 1575 2170 2765 3360 3955 4550 5145 5740 6335 6930 7525 8120 8715 508 1191 1914 2637 3360 4083 4806 5529 6252 6975 7698 8421 9144 9867 10590 598 1402 2253 3104 3955 4806 5657 6508 7359 8210 9061 9912 10763 11614 12465 688 1613 2592 3571 4550 5529 6508 7487 8466 9445 10424 11403 12382 13361 14340 778 1824 2931 4038 5145 6252 7359 8466 9573 10680 11787 12894 14001 15108 16215 868 2035 3270 4505 5740 6975 8210 9445 10680 11915 13150 14385 15620 16855 18090 958 2246 3609 4972 6335 7698 9061 10424 11787 13150 14513 15876 17239 18602 19965 1048 2457 3948 5439 6930 8421 9912 11403 12894 14385 15876 17367 18858 20349 21840 1138 2668 4287 5906 7525 9144 10763 12382 14001 15620 17239 18858 20477 22096 23715 1228 2879 4626 6373 8120 9867 11614 13361 15108 16855 18602 20349 22096 23843 25590 1318 3090 4965 6840 8715 10590 12465 14340 16215 18090 19965 21840 23715 25590 27465 1408 3301 5304 7307 9310 11313 13316 15319 17322 19325 21328 23331 25334 27337 29340 1498 3512 5643 7774 9905 12036 14167 16298 18429 20560 22691 24822 26953 29084 31215 1588 3723 5982 8241 10500 12759 15018 17277 19536 21795 24054 26313 28572 30831 33090 1678 3934 6321 8708 11095 13482 15869 18256 20643 23030 25417 27804 30191 32578 34965 1768 4145 6660 9175 11690 14205 16720 19235 21750 24265 26780 29295 31810 34325 36840 1858 4356 6999 9642 12285 14928 17571 20214 22857 25500 28143 30786 33429 36072 38715 1948 4567 7338 10109 12880 15651 18422 21193 23964 26735 29506 32277 35048 37819 40590 2038 4778 7677 10576 13475 16374 19273 22172 25071 27970 30869 33768 36667 39566 42465 2128 4989 8016 11043 14070 17097 20124 23151 26178 29205 32232 35259 38286 41313 44340 2218 5200 8355 11510 14665 17820 20975 24130 27285 30440 33595 36750 39905 43060 46215 2308 5411 8694 11977 15260 18543 21826 25109 28392 31675 34958 38241 41524 44807 48090 2398 5622 9033 12444 15855 19266 22677 26088 29499 32910 36321 39732 43143 46554 49965 2488 5833 9372 12911 16450 19989 23528 27067 30606 34145 37684 41223 44762 48301 51840 2578 6044 9711 13378 17045 20712 24379 28046 31713 35380 39047 42714 46381 50048 53715 2668 6255 10050 13845 17640 21435 25230 29025 32820 36615 40410 44205 48000 51795 55590 2758 6466 10389 14312 18235 22158 26081 30004 33927 37850 41773 45696 49619 53542 57465 2848 6677 10728 14779 18830 22881 26932 30983 35034 39085 43136 47187 51238 55289 59340 2938 6888 11067 15246 19425 23604 27783 31962 36141 40320 44499 48678 52857 57036 61215 3028 7099 11406 15713 20020 24327 28634 32941 37248 41555 45862 50169 54476 58783 63090 3118 7310 11745 16180 20615 25050 29485 33920 38355 42790 47225 51660 56095 60530 64965 3208 7521 12084 16647 21210 25773 30336 34899 39462 44025 48588 53151 57714 62277 66840 3298 7732 12423 17114 21805 26496 31187 35878 40569 45260 49951 54642 59333 64024 68715 3388 7943 12762 17581 22400 27219 32038 36857 41676 46495 51314 56133 60952 65771 70590 3478 8154 13101 18048 22995 27942 32889 37836 42783 47730 52677 57624 62571 67518 72465 3568 8365 13440 18515 23590 28665 33740 38815 43890 48965 54040 59115 64190 69265 74340 3658 8576 13779 18982 24185 29388 34591 39794 44997 50200 55403 60606 65809 71012 76215 3748 8787 14118 19449 24780 30111 35442 40773 46104 51435 56766 62097 67428 72759 78090 3838 8998 14457 19916 25375 30834 36293 41752 47211 52670 58129 63588 69047 74506 79965 3928 9209 14796 20383 25970 31557 37144 42731 48318 53905 59492 65079 70666 76253 81840 4018 9420 15135 20850 26565 32280 37995 43710 49425 55140 60855 66570 72285 78000 83715 4108 9631 15474 21317 27160 33003 38846 44689 50532 56375 62218 68061 73904 79747 85590 4198 9842 15813 21784 27755 33726 39697 45668 51639 57610 63581 69552 75523 81494 87465 4288 10053 16152 22251 28350 34449 40548 46647 52746 58845 64944 71043 77142 83241 89340 4378 10264 16491 22718 28945 35172 41399 47626 53853 60080 66307 72534 78761 84988 91215 4468 10475 16830 23185 29540 35895 42250 48605 54960 61315 67670 74025 80380 86735 93090 4558 10686 17169 23652 30135 36618 43101 49584 56067 62550 69033 75516 81999 88482 94965 4648 10897 17508 24119 30730 37341 43952 50563 57174 63785 70396 77007 83618 90229 96840 4738 11108 17847 24586 31325 38064 44803 51542 58281 65020 71759 78498 85237 91976 98715 4828 11319 18186 25053 31920 38787 45654 52521 59388 66255 73122 79989 86856 93723 100590 4918 11530 18525 25520 32515 39510 46505 53500 60495 67490 74485 81480 88475 95470 102465 5008 ...

Output argument "centers" (and maybe others) not assigned during call to "detectcircles". Error in Test2 (line 2) [centers,radii] = detectcircles(I,[32 64],6);

3   Fail
I = imread(fullfile(matlabroot,'toolbox','images','imdata','coins.png')); [centers,radii] = detectcircles(I,[24 30],10); c = [236 174; 149 35; 56 50; 266 103; 217 71; 120 209; 110 85; 175 120; 96 146; 37 107]; r = [25; 29; 25; 24; 29; 29; 24; 29; 29; 29]; d1 = squeeze(sqrt(sum(bsxfun(@minus,centers,permute(c,str2num('3 2 1'))).^2,2))); d2 = squeeze(sqrt(sum(bsxfun(@minus,radii,permute(r,str2num('3 2 1'))).^2,2))); mask = d1<5 & d2<5; Re = mean(any(mask)); Pr = sum(any(mask))/size(mask,1); assert(Pr>=0.5) assert(Re>=0.75)

ans = Columns 1 through 15 49 99 147 196 244 292 341 391 441 491 541 590 639 687 737 96 193 290 387 485 582 681 779 878 977 1076 1174 1271 1367 1466 144 289 435 581 728 874 1022 1169 1317 1466 1614 1762 1909 2055 2203 192 387 582 776 971 1167 1364 1561 1759 1956 2154 2351 2548 2744 2941 240 483 725 967 1212 1457 1703 1950 2197 2442 2689 2935 3181 3426 3671 288 579 870 1162 1457 1753 2049 2346 2644 2938 3233 3527 3821 4116 4410 336 676 1018 1361 1706 2052 2398 2744 3093 3436 3779 4122 4465 4810 5154 387 777 1167 1558 1953 2349 2744 3138 3537 3930 4322 4714 5107 5503 5896 437 877 1315 1755 2198 2643 3088 3531 3980 4423 4865 5306 5749 6196 6639 488 979 1467 1956 2449 2944 3439 3932 4430 4921 5413 5904 6396 6893 7386 538 1077 1613 2152 2695 3240 3785 4326 4871 5410 5950 6491 7033 7579 8123 585 1172 1756 2344 2935 3529 4123 4712 5305 5893 6482 7072 7663 8259 8853 634 1271 1905 2541 3181 3823 4465 5103 5745 6383 7021 7661 8302 8949 9595 684 1370 2053 2739 3428 4119 4810 5496 6187 6875 7562 8250 8940 9637 10335 734 1469 2201 2937 3675 4415 5155 5891 6631 7368 8106 8844 9584 10329 11076 784 1568 2350 3137 3925 4715 5505 6292 7083 7869 8656 9445 10236 11031 11827 833 1666 2498 3336 4173 5013 5854 6691 7532 8368 9203 10041 10882 11727 12573 882 1765 2646 3534 4419 5307 6196 7082 7971 8855 9739 10626 11515 12409 13303 931 1865 2796 3733 4667 5604 6542 7477 8416 9350 10285 11223 12162 13105 14048 982 1967 2949 3937 4922 5909 6897 7882 8870 9854 10840 11828 12818 13811 14804 1032 2067 3099 4139 5175 6212 7250 8284 9320 10353 11389 12426 13466 14508 15551 1083 2168 3251 4344 5432 6520 7609 8693 9778 10860 11946 13032 14122 15213 16306 1134 2270 3404 4549 5688 6826 7965 9099 10234 11367 12505 13641 14782 15922 17064 1183 2370 3554 4750 5939 7128 8318 9503 10688 11871 13060 14247 15438 16627 17819 1232 2469 3703 4949 6189 7429 8670 9906 11142 12376 13614 14852 16094 17333 18575 1282 2570 3854 5150 6441 7731 9022 10307 11593 12877 14165 15452 16743 18031 19323 1333 2671 4006 5352 6692 8032 9374 10710 12047 13382 14721 16058 17399 18737 20081 1383 2772 4158 5555 6945 8335 9728 11115 12503 13889 15278 16667 18059 19449 20844 1434 2873 4310 5759 7201 8641 10085 11523 12963 14399 15838 17277 18719 20161 21607 1484 2974 4461 5961 7452 8942 10437 11926 13417 14904 16395 17885 19378 20872 22369 1535 3076 4613 6164 7705 9246 10792 12332 13873 15411 16953 18494 20038 21583 23130 1585 3178 4766 6369 7962 9554 11151 12743 14334 15922 17515 19106 20700 22295 23892 1636 3280 4920 6575 8219 9861 11509 13153 14795 16434 18080 19723 21369 23015 24663 1688 3384 5075 6781 8476 10169 11868 13563 15258 16950 18648 20342 22040 23737 25436 1741 3488 5230 6987 8733 10477 12227 13972 15718 17463 19212 20956 22704 24453 26204 1792 3591 5385 7194 8993 10789 12591 14387 16184 17981 19783 21578 23378 25178 26981 1844 3695 5541 7402 9253 11101 12954 14802 16652 18502 20357 22204 24056 25907 27762 1895 3797 5694 7606 9508 11408 13314 15213 17115 19017 20925 22825 24729 26631 28539 1947 3901 5850 7814 9769 11723 13683 15634 17588 19541 21501 23454 25411 27366 29325 1999 4005 6005 8020 10028 12035 14048 16051 18057 20061 22073 24079 26090 28098 30110 2050 4107 6159 8224 10284 12342 14407 16462 18521 20579 22645 24704 26768 28828 30895 2103 4214 6319 8435 10547 12657 14774 16883 18994 21105 23224 25336 27452 29563 31683 2107 4221 6332 8451 10566 12680 14800 16912 19026 21139 23261 25376 27495 29611 31735 2111 4231 6346 8471 10589 12705 14826 16942 19060 21177 23303 25422 27547 29670 31799 2115 4238 6354 8482 10605 12725 14850 16970 19090 21209 23338 25460 27588 29714 31846 2120 4245 6364 8495 10622 12745 14873 16996 19119 21242 23372 25497 27627 29754 31889 2124 4253 6378 8514 10642 12768 14900 17025 19150 21277 23410 25538 27670 29802 31941 2129 4263 6391 8530 10661 12788 14923 17050 19175 21304 23441 25572 27707 29842 31986 2135 4273 6403 8543 10677 12806 14943 17073 19198 21329 23469 25604 27743 29881 32028 2136 4274 6407 8550 10685 12815 14954 17088 19215 21348 23492 25631 27773 29914 32065 2138 4277 6414 8560 10700 12833 14973 17109 19239 21374 23520 25661 27806 29950 32105 2140 4281 6421 8570 10713 12848 14990 17128 19263 21404 23553 25698 27847 29995 32155 2143 4291 6437 8589 10734 12873 15019 17161 19302 21449 23604 25752 27904 30056 32219 2149 4303 6455 8611 10761 12905 15055 17202 19349 21500 23659 25812 27967 30123 32290 2153 4309 6463 8624 10777 12926 15081 17233 19385 21539 23702 25860 28019 30179 32348 2157 ...

Output argument "centers" (and maybe others) not assigned during call to "detectcircles". Error in Test3 (line 2) [centers,radii] = detectcircles(I,[24 30],10);

4   Fail
I = imread(fullfile(matlabroot,'toolbox','images','imdata','coloredChips.png')); [centers,radii] = detectcircles(I,[20 28],26); c = [83 177; 304 336; 420 88; 434 165; 244 166; 327 297; 273 53; 130 44; 271 281; 408 265; 312 192; 420 346; 146 199; 228 232; 329 135; 175 297; 366 224; 150 258; 217 107; 345 119; 445 68; 372 293; 150 342; 251 8; 259 217; 198 107]; r = [23; 24; 23; 23; 23; 23; 23; 23; 23; 23; 23; 24; 23; 23; 23; 24; 23; 24; 23; 23; 23; 24; 25; 23; 23; 25]; d1 = squeeze(sqrt(sum(bsxfun(@minus,centers,permute(c,str2num('3 2 1'))).^2,2))); d2 = squeeze(sqrt(sum(bsxfun(@minus,radii,permute(r,str2num('3 2 1'))).^2,2))); mask = d1<5 & d2<5; Re = mean(any(mask)); Pr = sum(any(mask))/size(mask,1); assert(Pr>=0.5) assert(Re>=0.75)

Error using conv2 N-D arrays are not supported. Error in detectcircles (line 19) conv2(I,isinside) Error in Test4 (line 2) [centers,radii] = detectcircles(I,[20 28],26);

5   Fail
I = imread(fullfile(matlabroot,'toolbox','images','imdata','eight.tif')); [centers,radii] = detectcircles(I,[35 40],4); c = [198 189; 247 72; 62 141; 124 58]; r = [37; 37; 38; 37]; d1 = squeeze(sqrt(sum(bsxfun(@minus,centers,permute(c,str2num('3 2 1'))).^2,2))); d2 = squeeze(sqrt(sum(bsxfun(@minus,radii,permute(r,str2num('3 2 1'))).^2,2))); mask = d1<5 & d2<5; Re = mean(any(mask)); Pr = sum(any(mask))/size(mask,1); assert(Pr>=0.5) assert(Re>=0.75)

ans = Columns 1 through 15 225 450 675 901 1127 1353 1579 1805 2031 2257 2483 2709 2935 3163 3389 450 900 1350 1802 2254 2706 3157 3609 4061 4512 4964 5416 5868 6322 6770 676 1352 2027 2705 3383 4061 4738 5416 6094 6771 7449 8127 8807 9489 10163 902 1804 2704 3608 4512 5416 6319 7223 8127 9030 9933 10837 11743 12651 13551 1127 2255 3380 4509 5639 6769 7898 9028 10158 11287 12415 13545 14677 15811 16937 1352 2705 4054 5409 6765 8121 9475 10831 12187 13542 14895 16251 17608 18968 20320 1578 3156 4730 6311 7893 9475 11055 12639 14221 15802 17381 18963 20548 22136 23714 1804 3608 5407 7214 9022 10830 12636 14446 16254 18061 19866 21674 23487 25303 27107 2030 4060 6085 8118 10152 12186 14218 16256 18290 20323 22354 24388 26429 28471 30503 2256 4512 6763 9022 11282 13542 15800 18064 20324 22583 24840 27102 29371 31641 33901 2482 4964 7440 9925 12411 14897 17381 19873 22359 24844 27327 29817 32314 34812 37300 2708 5416 8118 10829 13541 16253 18963 21683 24395 27106 29815 32533 35258 37984 40698 2934 5868 8796 11733 14671 17609 20545 23493 26431 29368 32303 35247 38200 41154 44096 3160 6320 9474 12637 15801 18965 22127 25301 28465 31628 34789 37959 41138 44320 47490 3386 6772 10152 13541 16931 20321 23709 27109 30499 33888 37275 40671 44076 47486 50884 3612 7224 10830 14445 18061 21677 25291 28917 32533 36148 39761 43383 47014 50652 54278 3838 7676 11508 15349 19191 23033 26873 30725 34567 38408 42247 46097 49954 53820 57674 4064 8128 12186 16253 20321 24391 28457 32535 36603 40670 44735 48811 52896 56990 61072 4290 8580 12864 17157 21451 25747 30039 34345 38639 42932 47223 51527 55840 60162 64472 4516 9032 13542 18061 22583 27105 31623 36155 40675 45194 49711 54243 58784 63334 67872 4742 9484 14220 18965 23713 28463 33207 37965 42711 47456 52199 56959 61728 66506 71270 4968 9936 14898 19871 24845 29823 34793 39779 44751 49722 54691 59679 64676 69682 74674 5194 10388 15576 20775 25975 31181 36377 41589 46787 51986 57181 62397 67622 72856 78076 5420 10842 16256 21683 27109 32543 37965 43405 48831 54256 59677 65121 70574 76036 81484 5646 11294 16934 22589 28243 33905 39553 45221 50873 56524 62171 67843 73524 79214 84890 5872 11746 17612 23495 29377 35267 41141 47035 52913 58792 64665 70565 76474 82392 88296 6098 12198 18290 24401 30511 36627 42727 48847 54953 61060 67159 73287 79424 85570 91702 6326 12652 18970 25307 31643 37987 44313 50661 56993 63328 69653 76009 82374 88748 95108 6552 13104 19648 26211 32773 39343 45895 52471 59029 65592 72143 78727 85320 91922 98510 6778 13556 20326 27115 33905 40701 47479 54283 61069 67858 74635 81445 88266 95096 101912 7004 14008 21004 28019 35037 42061 49065 56097 63109 70126 77129 84167 91216 98272 105316 7230 14460 21682 28923 36167 43417 50647 57907 65147 72390 79621 86887 94164 101448 108720 7456 14914 22362 29831 37303 44779 52235 59723 67191 74662 82119 89611 97116 104628 112128 7682 15366 23040 30737 38435 46139 53821 61537 69231 76928 84611 92331 100064 107804 115532 7908 15818 23718 31643 39569 47501 55411 63355 71277 79200 87109 95057 103018 110986 118942 8134 16272 24398 32551 40705 48865 57001 65173 73323 81474 89609 97785 105974 114170 122354 8360 16724 25076 33457 41837 50223 58587 66987 75365 83744 92105 100509 108926 117350 125762 8586 17176 25754 34363 42971 51585 60175 68803 77409 86014 94601 103233 111878 120530 129170 8812 17628 26432 35269 44105 52947 61763 70619 79453 88286 97101 105961 114834 123714 132582 9040 18082 27114 36179 45243 54313 63355 72439 81499 90560 99603 108691 117792 126900 135996 9268 18536 27796 37089 46379 55677 64947 74259 83547 92836 102107 111423 120752 130088 139412 9494 18990 28476 37997 47515 57041 66539 76079 85595 95112 104611 114155 123712 133276 142828 9720 19442 29154 38901 48647 58401 68125 77891 87635 97378 107105 116877 126662 136454 146234 9948 19896 29834 39809 49781 59763 69713 79707 89679 99650 109605 119605 129618 139638 149646 10176 20350 30514 40717 50915 61125 71301 81523 91723 101922 112105 122333 132574 142822 153058 10402 20802 31192 41621 52045 62483 72885 83335 93761 104188 114599 125055 135524 146000 156464 10628 21254 31870 42527 53179 63845 74473 85151 95803 106458 117095 127779 138476 149180 159872 10856 21708 32550 43435 54315 65209 76063 86969 97847 108730 119593 130505 141430 152362 163282 11084 22162 33230 44341 55449 66571 77651 88785 99891 111002 122093 133233 144386 155546 166694 11312 22616 33910 45249 56583 67931 79239 90601 101935 113274 124593 135961 147342 158730 170106 11538 23070 34590 46157 57717 69293 80827 92417 103979 115546 127091 138687 150296 161912 173516 11764 23524 35270 47065 58853 70657 82417 94233 106021 117816 129587 141411 153248 165092 176924 11992 23978 35950 47971 59987 72019 84005 96049 108065 120088 132087 144139 156204 168276 180336 12218 24430 36628 48877 61121 73381 85593 97865 110107 122356 134583 146863 159156 171456 183744 12444 24882 37306 49783 62253 74741 87179 99679 112149 124626 137079 149587 162108 174636 187152 12670 ...

Output argument "centers" (and maybe others) not assigned during call to "detectcircles". Error in Test5 (line 2) [centers,radii] = detectcircles(I,[35 40],4);

6   Fail
I = imread(fullfile(matlabroot,'toolbox','images','imdata','moon.tif')); [centers,radii] = detectcircles(I,[200 210],1); c = [253 287]; r = [205]; d1 = squeeze(sqrt(sum(bsxfun(@minus,centers,permute(c,str2num('3 2 1'))).^2,2))); d2 = squeeze(sqrt(sum(bsxfun(@minus,radii,permute(r,str2num('3 2 1'))).^2,2))); mask = d1<5 & d2<5; Re = mean(any(mask)); Pr = sum(any(mask))/size(mask,1); assert(Pr>=0.5) assert(Re>=0.75)

ans = Columns 1 through 15 1 4 11 16 18 21 25 30 39 45 47 53 58 61 64 4 14 24 32 38 46 57 65 80 90 94 103 112 119 126 10 24 40 53 61 76 95 104 121 134 140 151 164 176 186 17 36 59 79 92 114 138 149 171 189 199 213 229 245 258 19 43 69 95 115 140 168 184 212 233 247 266 285 303 318 26 53 92 133 159 189 222 244 276 301 321 348 372 392 409 34 70 119 167 202 239 276 304 339 371 400 435 463 490 510 39 81 139 190 229 272 312 345 384 420 454 494 526 560 582 49 97 161 219 266 314 357 394 439 478 516 563 599 638 664 53 110 181 242 297 352 401 444 494 535 575 627 667 709 742 59 123 202 268 330 392 447 497 550 597 644 700 744 789 832 64 140 227 301 370 439 499 560 619 672 728 786 839 897 946 66 153 250 327 399 478 542 617 683 739 806 871 935 1011 1070 73 168 272 357 435 524 593 672 741 803 878 949 1017 1098 1160 78 176 285 378 460 555 632 713 786 854 934 1010 1081 1167 1232 82 186 307 404 490 590 671 764 846 916 1006 1092 1166 1258 1329 90 200 329 430 523 627 710 811 901 974 1071 1163 1240 1336 1413 92 208 340 445 545 652 742 847 941 1019 1118 1214 1302 1402 1482 97 216 353 465 569 682 782 892 990 1072 1173 1272 1370 1475 1559 104 227 370 493 607 727 831 943 1045 1131 1235 1338 1442 1552 1638 110 240 385 512 632 754 860 974 1081 1170 1278 1388 1497 1612 1700 119 256 407 539 663 791 901 1018 1132 1225 1339 1456 1567 1689 1779 123 267 425 561 687 822 936 1056 1179 1276 1394 1520 1635 1765 1864 128 285 450 590 717 854 971 1093 1222 1322 1441 1571 1689 1821 1924 133 298 467 614 745 883 1005 1131 1262 1364 1487 1623 1749 1888 1995 136 310 483 636 774 916 1042 1172 1307 1414 1542 1683 1815 1960 2073 140 330 510 667 811 958 1087 1220 1362 1474 1606 1751 1885 2033 2152 143 345 528 687 835 986 1121 1260 1413 1528 1668 1824 1964 2116 2241 145 351 539 702 853 1008 1150 1296 1453 1570 1713 1875 2025 2181 2310 148 360 555 723 877 1034 1181 1338 1502 1623 1767 1931 2090 2250 2387 152 367 564 734 890 1053 1206 1369 1539 1665 1814 1982 2148 2311 2452 158 382 589 765 923 1091 1250 1414 1587 1719 1874 2044 2214 2380 2523 165 398 612 792 952 1125 1288 1457 1637 1772 1933 2104 2276 2446 2592 168 407 631 822 989 1166 1332 1507 1695 1834 2001 2175 2349 2523 2673 173 421 654 851 1023 1205 1376 1554 1747 1892 2063 2241 2418 2597 2751 178 432 672 873 1048 1236 1414 1597 1792 1938 2113 2295 2476 2660 2816 187 443 687 896 1078 1273 1456 1646 1846 1995 2175 2361 2545 2734 2893 191 453 701 913 1099 1299 1486 1680 1883 2036 2225 2422 2611 2802 2963 195 467 720 935 1128 1332 1522 1718 1926 2086 2282 2487 2685 2882 3045 200 476 734 958 1156 1363 1558 1762 1978 2141 2343 2556 2759 2961 3126 203 484 748 979 1179 1391 1594 1806 2028 2194 2401 2620 2826 3030 3198 206 496 765 1001 1206 1422 1633 1850 2075 2248 2458 2680 2889 3096 3267 209 506 778 1022 1235 1454 1671 1894 2121 2299 2514 2741 2954 3164 3338 212 513 787 1038 1256 1479 1702 1930 2161 2342 2561 2794 3011 3225 3402 216 521 802 1060 1281 1516 1748 1978 2214 2401 2625 2862 3082 3301 3482 222 532 825 1089 1314 1559 1797 2030 2272 2468 2699 2938 3163 3392 3577 226 544 849 1116 1346 1598 1839 2078 2332 2532 2765 3006 3234 3468 3656 237 559 877 1153 1385 1650 1903 2144 2409 2615 2852 3097 3331 3569 3762 245 571 896 1180 1419 1691 1951 2196 2470 2679 2923 3176 3419 3661 3859 247 577 908 1196 1443 1721 1985 2236 2516 2727 2976 3235 3491 3737 3937 250 586 922 1215 1466 1751 2020 2274 2558 2775 3028 3292 3557 3807 4013 259 605 943 1246 1503 1790 2061 2318 2606 2827 3084 3354 3623 3875 4089 270 622 967 1282 1543 1833 2109 2374 2668 2893 3156 3432 3704 3958 4180 275 631 987 1310 1574 1871 2151 2426 2729 2958 3227 3507 3781 4037 4262 279 640 1008 1335 1605 1911 2194 2474 2782 3015 3289 3577 3859 4121 4354 284 ...

Output argument "centers" (and maybe others) not assigned during call to "detectcircles". Error in Test6 (line 2) [centers,radii] = detectcircles(I,[200 210],1);

7   Fail
I = imread(fullfile(matlabroot,'toolbox','images','imdata','pillsetc.png')); [centers,radii] = detectcircles(I,[15 55],4); c = [103 240; 252 326; 119 130; 319 84]; r = [17; 17; 50; 37]; d1 = squeeze(sqrt(sum(bsxfun(@minus,centers,permute(c,str2num('3 2 1'))).^2,2))); d2 = squeeze(sqrt(sum(bsxfun(@minus,radii,permute(r,str2num('3 2 1'))).^2,2))); mask = d1<5 & d2<5; Re = mean(any(mask)); Pr = sum(any(mask))/size(mask,1); assert(Pr>=0.5) assert(Re>=0.75)

Error using conv2 N-D arrays are not supported. Error in detectcircles (line 19) conv2(I,isinside) Error in Test7 (line 2) [centers,radii] = detectcircles(I,[15 55],4);

8   Fail
I = imread(fullfile(matlabroot,'toolbox','images','imdata','tape.png')); [centers,radii] = detectcircles(I,[75 85],1); c = [236 172]; r = [80]; d1 = squeeze(sqrt(sum(bsxfun(@minus,centers,permute(c,str2num('3 2 1'))).^2,2))); d2 = squeeze(sqrt(sum(bsxfun(@minus,radii,permute(r,str2num('3 2 1'))).^2,2))); mask = d1<5 & d2<5; Re = mean(any(mask)); Pr = sum(any(mask))/size(mask,1); assert(Pr>=0.5) assert(Re>=0.75)

Error using conv2 N-D arrays are not supported. Error in detectcircles (line 19) conv2(I,isinside) Error in Test8 (line 2) [centers,radii] = detectcircles(I,[75 85],1);

9   Fail
I = imread(fullfile(matlabroot,'toolbox','images','imdata','testpat1.png')); [centers,radii] = detectcircles(I,[110 120],1); c = [128 128]; r = [116]; d1 = squeeze(sqrt(sum(bsxfun(@minus,centers,permute(c,str2num('3 2 1'))).^2,2))); d2 = squeeze(sqrt(sum(bsxfun(@minus,radii,permute(r,str2num('3 2 1'))).^2,2))); mask = d1<5 & d2<5; Re = mean(any(mask)); Pr = sum(any(mask))/size(mask,1); assert(Pr>=0.5) assert(Re>=0.75)

ans = Columns 1 through 15 255 510 765 1020 1275 1530 1785 2040 2295 2550 2805 3060 3315 3570 3825 510 1020 1530 2040 2550 3060 3570 4080 4531 4949 5459 5968 6370 6851 7361 765 1530 2295 3060 3825 4590 5355 6120 6696 7175 7940 8689 9119 9785 10550 1020 2040 3060 4080 5100 6120 7140 8160 8865 9411 10431 11421 11886 12740 13760 1275 2550 3825 5100 6375 7650 8925 10200 11034 11647 12922 14153 14653 15695 16970 1530 3060 4590 6120 7650 9180 10710 12240 13203 13883 15413 16885 17420 18650 20180 1785 3570 5355 7140 8925 10710 12495 14280 15372 16119 17904 19617 20187 21605 23390 2040 4080 6120 8160 10200 12240 14280 16320 17546 18360 20400 22354 22959 24571 26611 2295 4531 6696 8865 11034 13203 15372 17546 18832 19713 22008 24203 24837 26541 28713 2550 4949 7175 9411 11647 13883 16119 18360 19713 20724 23274 25714 26447 28218 30457 2805 5459 7940 10431 12922 15413 17904 20400 22008 23274 26079 28774 29762 31788 34282 3060 5968 8689 11421 14153 16885 19617 22354 24203 25714 28774 31723 32954 35221 37956 3315 6370 9119 11886 14653 17420 20187 22959 24837 26447 29762 32954 34248 36547 39317 3570 6851 9785 12740 15695 18650 21605 24571 26541 28218 31788 35221 36547 38983 41944 3825 7361 10550 13760 16970 20180 23390 26611 28713 30457 34282 37956 39317 41944 45160 4080 7871 11315 14780 18245 21710 25175 28651 30882 32693 36773 40688 42084 44899 48370 4335 8381 12080 15800 19520 23240 26960 30691 33051 34929 39264 43420 44851 47854 51580 4590 8891 12845 16820 20795 24770 28745 32731 35220 37165 41755 46152 47618 50809 54790 4845 9401 13610 17840 22070 26300 30530 34771 37389 39401 44246 48884 50385 53764 58000 5100 9911 14375 18860 23345 27830 32315 36811 39558 41637 46737 51616 53152 56718 61209 5355 10421 15140 19880 24620 29360 34100 38851 41817 44097 49452 54582 56310 60112 64858 5610 10931 15905 20900 25895 30890 35885 40891 44112 46647 52257 57642 59625 63682 68683 5865 11441 16670 21920 27170 32420 37670 42931 46407 49197 55062 60702 62940 67252 72508 6120 11951 17435 22940 28445 33950 39455 44971 48702 51747 57867 63762 66255 70822 76333 6375 12461 18200 23960 29720 35480 41240 47011 50997 54297 60672 66822 69570 74392 80158 6630 12971 18965 24980 30995 37010 43025 49051 53292 56847 63477 69882 72885 77962 83983 6885 13481 19730 26000 32270 38540 44810 51091 55587 59397 66282 72942 76200 81532 87808 7140 13991 20495 27020 33545 40070 46595 53131 57882 61947 69087 76002 79515 85102 91633 7395 14501 21260 28040 34820 41600 48380 55171 60177 64497 71892 79062 82830 88672 95458 7650 15011 22025 29060 36095 43130 50165 57211 62472 67047 74697 82122 86145 92242 99283 7905 15521 22790 30080 37370 44660 51950 59251 64767 69597 77502 85182 89460 95812 103108 8160 16031 23555 31100 38645 46190 53735 61291 67062 72147 80307 88242 92775 99382 106933 8415 16541 24320 32120 39920 47720 55520 63331 69357 74697 83112 91302 96090 102952 110758 8670 17051 25085 33140 41195 49250 57305 65371 71652 77247 85917 94362 99405 106522 114583 8925 17561 25850 34160 42470 50780 59090 67411 73947 79797 88722 97422 102720 110092 118408 9180 18071 26615 35180 43745 52310 60875 69451 76242 82347 91527 100482 106035 113662 122233 9435 18581 27380 36200 45020 53840 62660 71491 78537 84897 94332 103542 109350 117232 126058 9690 19091 28145 37220 46295 55370 64445 73531 80832 87447 97137 106602 112665 120802 129883 9945 19601 28910 38240 47570 56900 66230 75571 83127 89997 99942 109662 115980 124372 133708 10200 20111 29675 39260 48845 58430 68015 77611 85422 92547 102747 112722 119295 127942 137533 10455 20621 30440 40280 50120 59960 69800 79651 87717 95097 105552 115782 122610 131512 141358 10710 21131 31205 41300 51395 61490 71585 81691 90012 97647 108357 118842 125925 135082 145183 10965 21641 31970 42320 52670 63020 73370 83731 92307 100197 111162 121902 129240 138652 149008 11220 22151 32735 43340 53945 64550 75155 85771 94602 102747 113967 124962 132555 142222 152833 11475 22661 33500 44360 55220 66080 76940 87811 96897 105297 116772 128022 135870 145792 156658 11730 23171 34265 45380 56495 67610 78725 89851 99192 107847 119577 131082 139185 149362 160483 11985 23681 35030 46400 57770 69140 80510 91891 101487 110397 122382 134142 142500 152932 164308 12240 24191 35795 47420 59045 70670 82295 93931 103782 112947 125187 137202 145815 156502 168133 12495 24701 36560 48440 60320 72200 84080 95971 106077 115497 127992 140262 149130 160072 171958 12750 25211 37325 49460 61595 73730 85865 98011 108372 118047 130797 143322 152445 163642 175783 13005 25721 38090 50480 62870 75260 87650 100051 110667 120597 133602 146382 155760 167212 179608 13260 26231 38855 51500 64145 76790 89435 102091 112962 123147 136407 149442 159075 170782 183433 13515 26741 39620 52520 65420 78320 91220 104131 115257 125697 139212 152502 162390 174352 187258 13770 27251 40385 53540 66695 79850 93005 106171 117552 128247 142017 155562 165705 177922 191083 14025 27761 41150 54560 67970 81380 94790 108211 119847 130797 144822 158622 169020 181492 194908 14280 ...

Output argument "centers" (and maybe others) not assigned during call to "detectcircles". Error in Test9 (line 2) [centers,radii] = detectcircles(I,[110 120],1);

10   Fail
I = imread(fullfile(matlabroot,'toolbox','images','imdata','toysnoflash.png')); [centers,radii] = detectcircles(I,[90 100],1); c = [267 506]; r = [94]; d1 = squeeze(sqrt(sum(bsxfun(@minus,centers,permute(c,str2num('3 2 1'))).^2,2))); d2 = squeeze(sqrt(sum(bsxfun(@minus,radii,permute(r,str2num('3 2 1'))).^2,2))); mask = d1<5 & d2<5; Re = mean(any(mask)); Pr = sum(any(mask))/size(mask,1); assert(Pr>=0.5) assert(Re>=0.75)

Error using conv2 N-D arrays are not supported. Error in detectcircles (line 19) conv2(I,isinside) Error in Test10 (line 2) [centers,radii] = detectcircles(I,[90 100],1);