Skip to content

Apply Threshold to Limit Line Curvature #6

@pavloshargan

Description

@pavloshargan

Hi!
First of all, love your paper, I'm surprised I've found it only today.

I'm experimenting with your work and would like to apply it for shuttlecock tracking in badminton. I'm trying to find a way to add a constraint for the line direction change (in other words, to add a threshold for the maximum derivative).

I tried changing the -angle argument to limit the angle between points in a triplet, but it doesn't seem to provide the desired results. Changing the smoothing parameter didn't help either.

I would like the algorithm to split this yellow line into three different parts, and I believe it's possible to achieve this with parameter tuning alone.

I have an idea of iterating over the points within the cluster with a window of size 3, measuring the angle between the 3 points, and cutting the line where the angle is too large. However, I am not sure how to order the points within the cluster and in general, this seems like overkill for such a need.

image

P.S leaving the data from the picture in case this issue escalates further:

-2.26280779 -0.21403752 -1.95762679
-1.07309878 2.01661876 -1.95762679
-2.25976894 -0.21890794 -1.89096342
-2.25824952 -0.22377837 -1.82430005
0.10141599 -0.39424337 -1.75763668
-2.25521067 -0.23351923 -1.75763668
-1.00016643 -0.14098109 -1.75763668
0.84897262 -1.63133222 -1.69097331
0.09989657 -0.39424337 -1.69097331
-2.25065240 -0.23351923 -1.69097331
-0.99712758 -0.18481494 -1.69097331
0.10445484 -0.39911380 -1.62430994
-0.99408873 -0.18968537 -1.62430994
-2.25673010 -0.00947952 -1.62430994
-0.89076790 2.11889776 -1.62430994
0.84593377 -1.63133222 -1.55764657
-2.25824952 -0.04357252 -1.55764657
-0.85278229 2.12376819 -1.55764657
-0.81935497 2.12376819 -1.49098320
-1.93917047 -0.09714723 -1.42431983
-2.25521067 -0.04357252 -1.42431983
-0.78136937 2.12376819 -1.42431983
-1.93917047 -0.12149937 -1.35765645
-0.74794204 2.11889776 -1.35765645
1.01003156 -1.11993723 -1.29099308
-0.71147586 2.11402733 -1.29099308
1.00851214 -1.13941894 -1.22432971
0.99787617 -0.96895394 -1.22432971
-0.67652911 2.09454561 -1.22432971
1.00091502 -1.08097380 -1.15766634
1.05409486 -0.32118694 -1.15766634
-1.90878199 -0.26274180 -1.15766634
-0.64006293 2.07993433 -1.15766634
0.99787617 -1.11993723 -1.09100297
-1.91941796 -0.26274180 -1.09100297
-2.24609413 -0.05331337 -1.09100297
-0.60511618 2.06045261 -1.09100297
0.99331790 -1.12480765 -1.02433960
-1.93765105 -0.26274180 -1.02433960
-2.24457470 -0.04357252 -1.02433960
-0.57016943 2.03610047 -1.02433960
0.98724020 -1.11993723 -0.95767623
-2.24153586 -0.04844295 -0.95767623
-0.53522267 2.01174833 -0.95767623
0.98268193 -1.12967808 -0.89101286
1.04345889 -0.39424337 -0.89101286
-0.50027592 1.97765533 -0.89101286
0.73045754 -1.54366451 -0.82434949
0.97508481 -1.12480765 -0.82434949
1.03738120 -0.37963209 -0.82434949
-2.23849701 -0.02409080 -0.82434949
-0.46532917 1.94356233 -0.82434949
0.97052654 -1.13941894 -0.75768612
1.02826465 -0.36989123 -0.75768612
-0.43038241 1.90459890 -0.75768612
0.96140999 -1.14915980 -0.69102275
-2.23545816 -0.02409080 -0.69102275
-0.39543566 1.86076504 -0.69102275
0.95837115 -1.19786408 -0.62435938
0.71070503 -0.98843565 -0.62435938
-0.36200833 1.81693119 -0.62435938
0.95229345 -1.21247537 -0.55769600
-0.97585564 -0.07766552 -0.55769600
-0.32706158 1.76335647 -0.55769600
0.66968058 -1.16864151 -0.49103263
0.94317691 -1.18325280 -0.49103263
1.00851214 -0.75952551 -0.49103263
0.98875963 -0.39911380 -0.49103263
-0.29363425 1.71465219 -0.49103263
0.66056404 -1.17838237 -0.42436926
0.93406036 -1.17351194 -0.42436926
0.93557979 -0.31144609 -0.42436926
-0.97281679 -0.06792466 -0.42436926
-0.25868750 1.65620705 -0.42436926
0.64840864 -1.33423608 -0.35770589
0.93254094 -1.20273451 -0.35770589
0.65144749 -1.18325280 -0.35770589
-0.22526017 1.59776190 -0.35770589
0.61194247 -1.46573765 -0.29104252
0.92494382 -1.20760494 -0.29104252
0.63473383 -1.27579094 -0.29104252
0.97204596 -0.38450251 -0.29104252
-0.19031342 1.53444633 -0.29104252
0.91126900 -1.16864151 -0.22437915
0.62105901 -1.27092051 -0.22437915
0.97052654 -0.38937294 -0.22437915
0.90974958 0.08792905 -0.22437915
-0.15688609 1.46626033 -0.22437915
0.90215246 -1.13454851 -0.15771578
0.61194247 -1.27579094 -0.15771578
0.96596827 -0.38450251 -0.15771578
0.90974958 0.09279948 -0.15771578
-0.12345876 1.39807433 -0.15771578
0.90063303 -1.15890065 -0.09105241
0.60282592 -1.28553180 -0.09105241
0.90367188 -0.12149937 -0.09105241
-0.96370025 -0.05818380 -0.09105241
-0.09003143 1.32014748 -0.09105241
0.59370938 -1.28553180 -0.02438904
0.88088052 -0.11175852 -0.02438904
0.90215246 -0.13611066 -0.02438904
-0.96218082 -0.06305423 -0.02438904
-0.05660410 1.24222062 -0.02438904
0.58307341 -1.30014308 0.04227433
0.88391937 -0.16533323 0.04227433
-0.96066140 -0.05331337 0.04227433
-0.02317678 1.15942333 0.04227433
0.57395687 -1.32449522 0.10893770
0.87328340 -0.18481494 0.10893770
0.66968058 0.39476605 0.10893770
0.01025055 1.07175562 0.10893770
0.56635975 -1.33910651 0.17560107
0.59826765 -1.15403022 0.17560107
0.86720570 -0.19942623 0.17560107
0.04367788 0.98895833 0.17560107
0.57243744 -1.20273451 0.24226445
0.59218996 -1.06149208 0.24226445
0.85808916 -0.21890794 0.24226445
-2.20810853 -0.11662894 0.24226445
0.07710521 0.89642019 0.24226445
0.96140999 -1.24656837 0.30892782
0.55572378 -1.27092051 0.30892782
0.56939860 -1.14915980 0.30892782
-2.20355025 -0.18481494 0.30892782
0.11053254 0.79901162 0.30892782
0.95685172 -1.26117965 0.37559119
0.55420436 -1.16864151 0.37559119
0.57243744 -1.06149208 0.37559119
-2.20051141 -0.20429666 0.37559119
0.14395987 0.69673262 0.37559119
0.54812666 -1.16864151 0.44225456
-2.20506968 0.01487263 0.44225456
0.60282592 0.30222791 0.44225456
0.17890662 0.59445362 0.44225456
0.54052954 -1.27092051 0.50891793
0.54052954 -1.11993723 0.50891793
-0.94546716 -0.23351923 0.50891793
-2.20506968 0.00513177 0.50891793
0.58611226 0.31196877 0.50891793
0.20929510 0.49704505 0.50891793
0.53749069 -1.16864151 0.57558130
0.24120301 0.38502520 0.57558130
0.57091802 0.30709834 0.57558130
0.53445184 -1.16377108 0.64224467
0.27311091 0.26813491 0.64224467
0.55724320 0.29248705 0.64224467
0.79123450 -1.16377108 0.70890804
0.36275693 -0.05331337 0.70890804
0.30653824 0.15124462 0.70890804
0.54356839 0.29735748 0.70890804
0.77907911 -1.15890065 0.77557141
0.34908211 0.00513177 0.77557141
0.53293242 0.30222791 0.77557141
0.76692372 -1.13454851 0.84223478
0.34148499 0.07331777 0.84223478
0.28982457 0.19020805 0.84223478
0.36427635 0.21456020 0.84223478
0.51925760 0.30709834 0.84223478
0.75932660 -1.11993723 0.90889815
-2.19291429 0.02461348 0.90889815
0.35819866 0.22917148 0.90889815
0.25487782 0.29248705 0.90889815
0.51014106 0.32170962 0.90889815
0.35667923 0.26326448 0.97556152
0.50406336 0.31196877 0.97556152
0.22145049 0.38989562 0.97556152
-2.19139486 0.01487263 1.04222489
0.35667923 0.31683920 1.04222489
0.49798567 0.32658005 1.04222489
0.18650374 0.47756334 1.04222489
0.36427635 0.36554348 1.10888827
0.49190797 0.32658005 1.10888827
0.15307641 0.56523105 1.10888827
0.48583027 0.33145048 1.17555164
0.36427635 0.39476605 1.17555164
0.11964908 0.65289877 1.17555164
0.48431085 0.34119134 1.24221501
0.35971808 0.42885905 1.24221501
0.08622175 0.73082562 1.24221501
0.70766618 -0.91537923 1.30887838
0.48127200 0.38502520 1.30887838
0.35212096 0.45808162 1.30887838
0.05279443 0.80388205 1.30887838
0.70614676 -0.90076794 1.37554175
0.47823315 0.40450691 1.37554175
0.34452384 0.49704505 1.37554175
0.01936710 0.87693848 1.37554175
0.69854964 -0.87154537 1.44220512
-2.07895748 -0.20429666 1.44220512
0.33540730 0.51652677 1.44220512
-0.01254081 0.94025405 1.44220512
0.69399137 -0.85693408 1.50886849
-2.07439921 -0.18968537 1.50886849
0.33388787 0.53113805 1.50886849
-0.04596814 1.00356962 1.50886849
0.69551079 -0.85206366 1.57553186
-0.07787604 1.06201476 1.57553186
0.47671373 0.44834077 1.64219523
-0.10978394 1.12045991 1.64219523
-0.14321127 1.16916419 1.70885860
-0.17511918 1.21786848 1.77552197
-0.20854651 1.26170233 1.84218534
-0.24045441 1.29579533 1.90884872
0.46911661 0.28274620 1.97551209
-0.27084289 1.33475876 1.97551209

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions