算法思路:
1、Dae文件有多重坐标系,但所有坐标体系最终归于一个顶级坐标系,因此可以使用偏移值计算各点实际XY值;
2、因阿里云关键点不存在深度,忽略Dae文件的z坐标不做处理;
3、阿里云导出数据点原始坐标以照片左上角为原点,XY均无负值;
4、算法已根据两眼尖点判断照片是否旋转90°;
5、算法以鼻子尖点-眼睛内尖点之间的距离作为基准值与Dae模型进行整体缩放处理,缩放需要考虑原始照片大小;
6、算法已加入左右镜像处理;
7、取点需求json: needed,用于告知算法需要取哪些点,以及每个点的偏移值,最终限定值;
8、算法入口【change()】;
在线预览:http://sandbox.runjs.cn/show/zil65cnt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 |
<html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <title>阿里云人脸关键点转换 JS</title> <style> body{ margin: 0; padding: 0; } </style> <script id="jquery_183" type="text/javascript" class="library" src="http://apps.bdimg.com/libs/jquery/1.8.3/jquery.min.js"></script> </head> <body> <a href="https://data.aliyun.com/ai?spm=a2c0j.8207365.813079.898989114.270a249dxoJxNH#/face-attribute" target=_blank>拿数据</a> 阿里云response数据原文(在线接口直接返回) <textarea class=ali> {"isError":false,"code":null,"message":null,"data":"{\"face_num\":1,\"face_rect\":[450,56,271,375],\"face_prob\":[1.0],\"pose\":[-1.9420808553695679,-7.966123104095459,1.3440889120101929],\"landmark_num\":105,\"landmark\":[481.1868591308594,192.1466064453125,557.916015625,184.88897705078125,515.7514038085938,164.93067932128906,519.3195190429688,186.20449829101562,487.95086669921875,177.77584838867188,500.17034912109375,167.70346069335938,531.318603515625,167.98121643066406,545.6124267578125,174.84439086914062,493.78619384765625,189.28128051757812,506.4016418457031,186.49017333984375,532.0901489257812,184.25411987304688,544.9972534179688,184.64761352539062,601.1273193359375,182.71737670898438,681.369384765625,189.6868438720703,643.9542236328125,165.242919921875,641.6524658203125,183.63316345214844,613.3355102539062,172.57098388671875,628.205078125,167.07232666015625,659.5584716796875,167.95635986328125,673.0067749023438,176.26197814941406,614.6646728515625,182.5886688232422,628.1947021484375,182.16087341308594,655.1759033203125,183.11215209960938,668.4251708984375,185.73199462890625,490.6137390136719,203.59783935546875,543.968994140625,210.25094604492188,496.1848449707031,197.87091064453125,502.8193664550781,193.4248504638672,510.55987548828125,191.47409057617188,518.5280151367188,192.0426025390625,526.1112060546875,194.55477905273438,532.8075561523438,198.91189575195312,538.9132690429688,204.0650634765625,494.9947814941406,209.47373962402344,500.97137451171875,213.68734741210938,508.0364074707031,215.6209716796875,515.356201171875,216.03746032714844,522.67333984375,215.56280517578125,529.9097900390625,214.37318420410156,537.0371704101562,212.64659118652344,615.8743286132812,209.5872039794922,667.3082275390625,205.06640625,620.6119384765625,203.54147338867188,626.4539794921875,198.5570831298828,633.1123046875,194.7288818359375,640.5873413085938,192.96173095703125,648.2689819335938,193.08145141601562,655.6587524414062,195.17105102539062,661.986328125,199.52569580078125,622.0869140625,213.25021362304688,628.7507934570312,216.0059814453125,635.7415771484375,217.77328491210938,642.9403076171875,218.18280029296875,650.0884399414062,217.2373504638672,656.8668823242188,214.77439880371094,662.822265625,210.7135467529297,579.8157958984375,210.10809326171875,577.001708984375,289.9973449707031,578.4644775390625,250.12181091308594,577.8956909179688,305.40789794921875,540.810791015625,300.5191345214844,616.716552734375,300.369384765625,534.0982055664062,353.22412109375,620.18017578125,350.78228759765625,540.2473754882812,353.40386962890625,612.8482055664062,351.4158630371094,578.075439453125,337.22332763671875,566.9115600585938,333.2672119140625,588.9468383789062,333.1346130371094,549.390625,341.5438232421875,605.021728515625,341.166015625,541.086669921875,346.5450134277344,558.0044555664062,337.0943908691406,597.0601196289062,336.998291015625,612.8035278320312,345.6592712402344,575.8104248046875,384.5810852050781,549.895751953125,376.0168762207031,602.3419189453125,373.8505554199219,541.2920532226562,365.1113586425781,562.0418090820312,382.7151794433594,590.087646484375,381.6968994140625,611.7411499023438,362.6891784667969,577.6726684570312,350.2848205566406,576.2798461914062,359.9858703613281,558.7822875976562,350.11572265625,557.8558959960938,358.9555969238281,595.293701171875,349.94683837890625,595.0768432617188,357.9466247558594,549.3785400390625,350.9784851074219,548.9730224609375,356.43756103515625,568.2252197265625,350.21844482421875,567.0416259765625,359.93084716796875,586.4886474609375,350.3289489746094,585.7337036132812,359.4627685546875,604.104248046875,350.27777099609375,604.0457153320312,354.90771484375,444.1617431640625,190.41688537597656,728.8128662109375,194.3751678466797,569.876708984375,447.9565734863281,462.74652099609375,333.20294189453125,696.1551513671875,341.9966735839844,449.1292419433594,261.6750793457031,718.1129150390625,268.23980712890625,504.6239318847656,404.2813720703125,642.7210693359375,412.2025146484375],\"iris\":[515.0765991210938,202.7382049560547,10.447031021118164,640.6373291015625,203.28053283691406,10.447031021118164],\"gender\":[0],\"age\":[31],\"expression\":[0],\"glass\":[0],\"dense_fea_len\":1024,\"dense_fea\":[-0.01401805691421032,-0.017203062772750854,-7.957577472552657E-4,0.012726863846182823,-0.007119269110262394,0.02113637700676918,0.005964828655123711,-0.034708958119153976,0.021655302494764328,0.025120113044977188,0.043826255947351456,-0.04036707431077957,0.0215604230761528,-0.003984039183706045,-0.0073219770565629005,0.05235069617629051,0.0016305523458868265,0.0028063468635082245,-0.043439991772174835,0.03781977668404579,0.051895078271627426,0.02455431967973709,0.02579818107187748,0.025050530210137367,-0.0051971725188195705,-0.01901315525174141,-0.005046364851295948,-0.011171085759997368,0.038413017988204956,0.0013674289220944047,0.03967113047838211,-0.01590631529688835,-0.04209782928228378,0.02255888283252716,-0.015743426978588104,-0.010687530040740967,-0.013363569043576717,-0.025090951472520828,-0.06443899124860764,0.0272113848477602,-0.009184048511087894,-0.023485392332077026,-0.0586085170507431,-0.03035588189959526,0.025806590914726257,0.023220064118504524,-0.016137050464749336,0.03676380217075348,0.010896123945713043,-0.08534088730812073,0.03413888439536095,-0.011030370369553566,-0.0011271520052105188,-0.020731858909130096,0.01802992634475231,-0.04014616832137108,-0.06964932382106781,-0.0055540623143315315,0.02366257831454277,-0.017674975097179413,-0.03639577701687813,0.012926414608955383,0.023930249735713005,0.007416262291371822,-0.03617693856358528,-0.012536519207060337,-0.040412332862615585,0.027912462130188942,0.04425647109746933,-0.032993920147418976,0.0030473482329398394,-0.014824047684669495,-0.004681183956563473,-0.022907283157110214,0.06296312063932419,-0.07118190079927444,0.021024737507104874,0.04900827631354332,0.02766522765159607,0.048375241458415985,-0.0011751629645004869,-0.009451993741095066,0.03670457378029823,-0.015310493297874928,0.004641416948288679,0.011193165555596352,-0.05501799285411835,0.03305460885167122,-0.03941177949309349,0.05263447016477585,-0.05735649913549423,0.017962176352739334,-0.016709189862012863,-0.02485482580959797,0.03657970950007439,-0.019360419362783432,-0.020373709499835968,0.04300708696246147,-0.005768365692347288,0.05670374631881714,-0.04040386527776718,-0.03411980718374252,0.0012216906761750579,0.012069428339600563,-0.018391665071249008,-0.030125586315989494,0.015282885171473026,-0.020396221429109573,-0.050541456788778305,-0.0010071302531287074,0.0425250306725502,-0.02301362156867981,0.00704774959012866,0.0015321760438382626,0.00676316861063242,-0.006219517905265093,-0.051916640251874924,0.01136000920087099,-0.061342816799879074,-0.03534777835011482,0.004842784721404314,-0.033025793731212616,7.822166080586612E-4,0.03470982611179352,0.03660321608185768,0.020710328593850136,-0.010214477777481079,-0.021972576156258583,-0.0067683556117117405,0.028848852962255478,-0.003050593426451087,-0.054717909544706345,0.0033505798783153296,-0.009558168239891529,0.029956726357340813,-0.0052662999369204044,-0.003283966798335314,-0.008591708727180958,-0.0390196293592453,0.03614693135023117,-0.03740816190838814,-0.0013875490985810757,0.03161029890179634,0.05064460262656212,-0.021697159856557846,-0.038362011313438416,-0.07412531971931458,0.006011915393173695,-0.021427316591143608,0.024750301614403725,0.03817533701658249,0.011429144069552422,-0.06652877479791641,-0.03586849942803383,-0.014725655317306519,0.07630796730518341,-0.020728034898638725,0.005777818150818348,6.514323758892715E-4,0.025377526879310608,0.002648130990564823,-0.0361742228269577,0.027010004967451096,-0.031835898756980896,0.03827636316418648,0.005835112649947405,-0.007412273436784744,-0.08857211470603943,-0.017527105286717415,-0.004430199973285198,-0.00150130910333246,0.012727408669888973,-0.0405719093978405,0.030588218942284584,-0.02050042897462845,-0.016793690621852875,0.04335770010948181,0.0203888937830925,-0.003336430061608553,-0.008282295428216457,-0.012415946461260319,0.04859181493520737,-0.03298910707235336,0.0069328797981143,0.0018679789500311017,0.023331232368946075,0.004661998245865107,0.02745291218161583,0.0021519786678254604,-0.013166256248950958,-0.0014927280135452747,-0.02048245258629322,-0.032490119338035583,0.013793409802019596,0.03455616906285286,0.04881919175386429,-0.016785908490419388,0.026733171194791794,0.002458967035636306,-0.00827440433204174,-0.0021076241973787546,0.009561496786773205,0.008564821444451809,-0.0372353121638298,-0.034367844462394714,0.02806953527033329,0.04930374026298523,0.004385946784168482,-0.05870708078145981,0.0690271183848381,0.017142243683338165,-0.01051105372607708,0.04751709848642349,0.03755219280719757,0.01943477988243103,-0.005341582931578159,-0.013991906307637691,-0.02425789088010788,-0.015443404205143452,-0.02877434529364109,-0.007222091779112816,-0.020882071927189827,0.01426660642027855,-0.01260056160390377,0.022729238495230675,0.012709551490843296,0.006672210060060024,5.562013830058277E-4,-0.06116042286157608,0.021440686658024788,0.03876786679029465,-0.060329314321279526,-0.03548993542790413,-0.06445642560720444,-0.014155490323901176,0.05075512453913689,-0.002322668209671974,0.004838031250983477,-0.009320552460849285,0.020142467692494392,0.010335099883377552,0.06461784988641739,-0.0202972199767828,-0.024039940908551216,-0.048543479293584824,-0.007366215344518423,-0.023575443774461746,-0.025637507438659668,0.003651759121567011,0.025948019698262215,-0.07073027640581131,0.018610481172800064,-0.004323582164943218,-0.016408320516347885,-0.04237687587738037,-0.02804127149283886,0.003534691408276558,-0.00935234036296606,-3.0810091993771493E-4,-0.05001299828290939,-0.038333892822265625,-0.01701545901596546,0.007838360033929348,-0.01879679411649704,0.00773585494607687,-0.015544823370873928,0.018406011164188385,0.03328170254826546,0.07987517863512039,-0.013560104183852673,-0.027034852653741837,0.03611688315868378,-0.028233030810952187,0.03364842012524605,0.030058279633522034,0.005194709170609713,0.0020364790689200163,0.02134750224649906,0.01258237287402153,0.03695572167634964,0.02706952393054962,-0.04059915989637375,-0.01880979724228382,0.0039925421588122845,0.013780255801975727,-0.013729437254369259,-0.011035406030714512,0.03037373162806034,0.008227590471506119,-0.0373525433242321,-0.017668716609477997,-0.02854606695473194,-0.025771144777536392,-0.03129180893301964,-0.00865208264440298,0.017441926524043083,0.022148901596665382,-0.02717951312661171,-0.04453064128756523,0.043860793113708496,0.03463566675782204,-0.011513355188071728,-0.05755394324660301,-0.00991507526487112,-0.008177762851119041,0.016276482492685318,0.014659912325441837,0.021056972444057465,-0.02754669077694416,0.01732640527188778,-0.031497590243816376,-0.023633701726794243,0.0192278940230608,-0.05063691362738609,0.04478595033288002,-0.021978357806801796,-0.046555254608392715,0.05465145409107208,0.027402589097619057,0.003463718807324767,0.021707821637392044,0.026044277474284172,0.06081462651491165,-0.028189538046717644,-0.008387320674955845,0.011871451511979103,0.008339823223650455,0.0088301170617342,-0.008257158100605011,-0.0068739308044314384,-0.00686597777530551,-0.004752041306346655,0.005600419826805592,-0.04822906479239464,-0.05494774132966995,0.015585764311254025,0.026926398277282715,0.0023112217895686626,-0.02463115006685257,0.018618978559970856,-0.029648499563336372,-0.023223061114549637,-0.06013365089893341,-0.02303316444158554,-0.020537836477160454,0.006812230683863163,-0.02470114827156067,-0.09647281467914581,-0.003994546830654144,-0.06126412749290466,4.081216175109148E-4,0.003648687619715929,-0.02511459030210972,-0.01746385172009468,0.02481815405189991,-0.02730088122189045,0.017433786764740944,0.02787737362086773,-0.010324467904865742,-0.011520247906446457,0.016603022813796997,0.03731928765773773,-0.03152092918753624,0.035176053643226624,-0.00650137709453702,0.019487174227833748,-0.006896344944834709,-0.05922923982143402,0.06645329296588898,-0.017785103991627693,0.0032423879019916058,-0.04417795687913895,0.0372517928481102,0.00798876490443945,-0.0797746330499649,-0.03172328323125839,-0.017914051190018654,0.012016305699944496,-0.012695781886577606,0.01409083791077137,-0.01729627512395382,-0.004318781662732363,0.03333701565861702,-0.008493373170495033,0.004933178424835205,-0.014727816917002201,0.019369645044207573,-0.02528100460767746,0.016363758593797684,-0.07029261440038681,-0.015514938160777092,0.0016681782435625792,0.041506584733724594,0.017129428684711456,-0.08477873355150223,-0.003856995142996311,0.0845194011926651,-0.04246656596660614,-0.006706486456096172,0.025514014065265656,-0.019525550305843353,0.07965109497308731,-0.04252957925200462,0.014310476370155811,0.002429988468065858,-0.048264019191265106,0.03537949547171593,0.003387831151485443,-0.05195106938481331,-0.03971003368496895,0.04930631443858147,0.021143555641174316,-0.01140297669917345,0.04447716474533081,0.0152156176045537,0.013945389539003372,-0.014799795113503933,0.017787598073482513,-0.0017960164695978165,-0.011557645164430141,0.03158339485526085,-0.030842846259474754,0.022838817909359932,-0.0017554846126586199,-6.16088043898344E-4,-0.005157961510121822,-0.03913358971476555,-0.09400462359189987,-0.015084216371178627,-0.010771826840937138,0.010608479380607605,-0.011550312861800194,0.008922116830945015,-0.00890389271080494,0.05730540677905083,0.030903317034244537,0.010864770039916039,-0.024614432826638222,-0.001375392428599298,-0.00264772423543036,-0.012701389379799366,-0.019552160054445267,0.004531575366854668,0.014109359122812748,-0.06534732133150101,-0.007262237370014191,-0.013760373927652836,0.03820478916168213,0.03774876520037651,0.028843382373452187,0.041455622762441635,0.05079611390829086,0.07893752306699753,-0.031919367611408234,0.03789302334189415,0.019053298979997635,0.013323592022061348,-0.035919107496738434,0.07609635591506958,0.029064800590276718,-0.0153002655133605,-0.039991047233343124,-0.021667955443263054,-0.03625810146331787,7.242286810651422E-4,0.02795669063925743,0.034656114876270294,-0.01938585937023163,-0.0486120842397213,0.001193532720208168,0.03473642095923424,0.057959504425525665,7.057937909848988E-4,-7.279129349626601E-4,-0.008027862757444382,-0.015222621150314808,0.006249149329960346,0.026595432311296463,-0.033697858452796936,0.018619397655129433,0.04090692102909088,0.03208516538143158,0.05270923674106598,0.03406498581171036,0.0013010230613872409,0.03218751400709152,0.014282962307333946,-0.0062924958765506744,-6.069695809856057E-4,-0.05225706100463867,-0.029509933665394783,0.008925126865506172,-0.012471627444028854,0.040854379534721375,-0.028307361528277397,0.0012690695002675056,0.038319725543260574,-0.01768462546169758,0.031221261247992516,-0.025224821642041206,0.01749645732343197,-0.0025368512142449617,-0.013737342320382595,0.04240081086754799,-0.016286129131913185,0.00872004684060812,0.011233103461563587,-0.002518711145967245,-0.012270917184650898,0.006320679560303688,0.04704119265079498,-0.017620785161852837,0.0312054380774498,0.034012824296951294,0.012872224673628807,0.017184097319841385,0.016342738643288612,-0.0385156124830246,0.053991734981536865,0.00633900985121727,0.07887297868728638,-0.021475747227668762,0.012675190344452858,0.019061671569943428,0.021331772208213806,-0.002887994283810258,-0.028707008808851242,0.059488631784915924,0.0036185216158628464,-0.035589251667261124,-0.07919871807098389,0.003035804023966193,-0.0075208754278719425,0.014369321055710316,0.03384464234113693,0.0024118172004818916,-0.01363921444863081,0.02044629491865635,-0.034420665353536606,-0.04188105836510658,-0.005954429041594267,-0.012319555506110191,0.04744291305541992,0.021050062030553818,-0.022438950836658478,0.005160487722605467,0.03080885484814644,-0.007890020497143269,0.010762444697320461,0.02795417048037052,-0.02756553515791893,-0.01134087797254324,0.04677892103791237,0.006705101579427719,3.238361969124526E-4,0.008415883406996727,-0.022694135084748268,0.016833551228046417,-0.0341443233191967,-0.019744595512747765,-0.036648306995630264,-0.019660022109746933,0.03701545298099518,-0.049298495054244995,-0.03955181688070297,0.036449410021305084,0.009406686760485172,-0.042351674288511276,-0.03361723944544792,-0.048733387142419815,-0.02334366738796234,-0.045696016401052475,0.0038594543002545834,0.022869758307933807,-0.003500793594866991,-0.00256786635145545,-0.047830305993556976,-0.0011532007483765483,-0.009506028145551682,-0.029058504849672318,0.06454531103372574,-0.03734586760401726,0.008284498006105423,-0.016916129738092422,-0.03688321262598038,-0.005771100986748934,0.042007915675640106,0.004010035190731287,0.004798640962690115,0.010778592899441719,0.061143048107624054,0.007008363027125597,-0.03381931036710739,0.026561912149190903,-0.046506233513355255,0.01104985736310482,0.02165120840072632,0.01862954907119274,-0.001913836575113237,0.06045923009514809,-0.008003457449376583,-0.0013972367160022259,-0.012568519450724125,-0.04099131003022194,-0.009877033531665802,0.004113737028092146,0.016556957736611366,-0.021255476400256157,0.005851224530488253,0.025873254984617233,-0.03386204317212105,0.03830314055085182,-0.023132776841521263,-0.020665954798460007,0.05816645547747612,-0.0033276292961090803,-0.03841133415699005,0.06955024600028992,0.05621708929538727,-0.02107655256986618,0.026694586500525475,-0.027951180934906006,0.009165504947304726,-0.03743504732847214,0.036831073462963104,-1.5929249639157206E-4,0.055031806230545044,0.051345083862543106,-0.023582737892866135,-0.0010945710819214582,-0.026126407086849213,-0.03452946990728378,-0.02710028924047947,-0.0471620038151741,-0.016028355807065964,-0.008307543583214283,0.039584554731845856,0.03225323185324669,0.007635952439159155,-0.04917925223708153,-0.02740931138396263,0.023243321105837822,-0.01965949684381485,-0.030273186042904854,0.014622095972299576,0.018801135942339897,0.018416566774249077,-0.02161368541419506,-0.010089353658258915,-0.0654168650507927,0.028903093189001083,0.014801000244915485,0.004001184366643429,-0.01327931322157383,-0.0119699165225029,0.023082135245203972,-0.0609738864004612,-0.04548211768269539,-0.025333087891340256,6.0121068963781E-4,-0.016909321770071983,0.004159931093454361,0.014930592849850655,-0.051673829555511475,-0.03165125101804733,-0.04277712479233742,0.0044927154667675495,0.08736085891723633,-0.029407018795609474,-0.023769669234752655,0.036837007850408554,-0.02237776853144169,-0.04118344560265541,-0.01135208923369646,0.037046872079372406,-0.02354460395872593,0.04886477440595627,0.055843666195869446,-0.0014975540107116103,-0.0018878587288782,-0.05982199311256409,0.019126489758491516,-0.034683968871831894,0.05173186957836151,-0.023525450378656387,0.06915730237960815,-0.05888998135924339,-0.03633876517415047,-0.0031948185060173273,0.05962774530053139,-0.009707818739116192,-0.002241617999970913,0.012734910473227501,0.012798561714589596,-0.03864741697907448,8.126792963594198E-4,0.002605314599350095,0.030314473435282707,0.03596128150820732,-0.0021815516520291567,-0.03255274146795273,-0.030451700091362,-0.031323835253715515,0.01232261024415493,-0.009385943412780762,-0.0030564148910343647,0.04041067883372307,0.001412052195519209,-0.02584119513630867,-0.0143973920494318,-0.02999815158545971,0.04870902746915817,-0.02515190839767456,0.013007759116590023,-0.011110099963843822,-0.011872460134327412,-0.02310490980744362,0.002409848850220442,0.00833000335842371,0.008395790122449398,-0.030051812529563904,0.09393776953220367,4.2805474367924035E-4,-0.05428213253617287,0.034171294420957565,0.011194600723683834,-0.022449888288974762,-0.018207361921668053,-0.03777764365077019,0.012521683238446712,0.0046284254640340805,0.04235541820526123,-0.018684184178709984,0.034917257726192474,-0.012290938757359982,-0.002411919878795743,-0.0225639920681715,-0.022353297099471092,0.019299646839499474,-0.021819768473505974,-0.03733634203672409,-0.011111127212643623,0.018512293696403503,-0.06496669352054596,-0.005102306138724089,-0.033631421625614166,-0.017103422433137894,0.026667343452572823,-0.019675323739647865,0.046013329178094864,-0.01879923604428768,-0.007622929755598307,-0.005467132665216923,0.04533319175243378,-0.019836433231830597,-0.009769587777554989,-0.011541184037923813,0.06426627933979034,0.031057626008987427,-0.05462569743394852,0.05937952175736427,-0.011268442496657372,-0.03293483331799507,0.033397067338228226,-0.029611140489578247,-0.06796371191740036,-0.04929506778717041,-0.0077824280597269535,-0.009150746278464794,-0.021767403930425644,0.015177758410573006,0.0015204158844426274,-0.023393772542476654,-0.022650543600320816,-0.008970842696726322,-0.01071050763130188,0.006424563005566597,0.029187781736254692,0.04299163818359375,0.09080799669027328,-0.023558584973216057,0.019764775410294533,-0.01666906848549843,-0.0055489311926066875,-0.03609199449419975,0.014167653396725655,0.056132469326257706,-0.07703251391649246,0.0238456130027771,-0.0037239049561321735,-0.010226734913885593,0.04621848091483116,0.018769044429063797,-0.02581772208213806,-0.013857771642506123,0.016010507941246033,-0.016213281080126762,-0.025506479665637016,0.021152734756469727,0.021359216421842575,0.018325986340641975,0.00753508135676384,0.004311076831072569,5.165752954781055E-4,-0.009524201042950153,-0.008756063878536224,-0.008592539466917515,0.014200510457158089,0.035124361515045166,-0.030992314219474792,-0.029084952548146248,0.03236754983663559,0.0327618345618248,0.0047682831063866615,-0.0573093518614769,0.018693167716264725,0.007487590424716473,0.035930510610342026,0.029198048636317253,0.05050264671444893,-0.004893909674137831,0.02625337429344654,0.06289359927177429,0.011153426952660084,0.011976640671491623,-0.004601768217980862,0.00233141565695405,-0.024746112525463104,-0.009200404398143291,-0.010964912362396717,0.018028367310762405,0.006200514268130064,0.024807102978229523,0.02389361895620823,0.014938014559447765,0.01441176701337099,-7.088512065820396E-4,-8.690315298736095E-4,0.05038585513830185,-0.012865515425801277,-0.02474810555577278,-0.024400360882282257,0.043007656931877136,0.0133002158254385,0.004242334980517626,-0.04318061098456383,-8.383523090742528E-4,0.009293117560446262,0.005801681894809008,0.04039960354566574,-0.003635962028056383,-0.018471723422408104,-0.030293837189674377,0.014058530330657959,-0.04308927059173584,-0.02434079721570015,-0.0021577009465545416,-0.02936679683625698,-0.012236875481903553,-0.07973282039165497,0.00943138636648655,0.0036342034582048655,-0.009331257082521915,0.005510652903467417,0.02797200344502926,-0.002086916472762823,0.04573562368750572,0.01872846484184265,0.04322927072644234,0.0343872532248497,-0.012932505458593369,0.007243401370942593,-0.009319107979536057,0.03026353009045124,0.02481073886156082,0.0444304458796978,0.04295724257826805,0.002337438054382801,0.02114643156528473,-0.01798706315457821,0.006134890019893646,-0.00877105537801981,0.0555926188826561,-0.02274232916533947,-0.012846678495407104,-0.020760346204042435,-0.004403478465974331,-0.024998795241117477,0.02165985107421875,0.024236135184764862,-0.0036604066845029593,0.0044058882631361485,0.02856266312301159,-0.001980226021260023,-0.033892787992954254,-0.04817665368318558,-0.062334202229976654,-0.02264823019504547,-0.03099820949137211,-0.003265051171183586,0.008178827352821827,-0.0692322850227356,0.007894794456660748,-0.021454986184835434,0.012562914751470089,0.001439871033653617,-0.03418891504406929,0.01634870655834675,0.029765117913484573,-0.024829044938087463,0.015531396493315697,0.04415610060095787,-0.022130146622657776,0.0013588855508714914,-0.02066628262400627,0.024653896689414978,0.007568742614239454,0.0030455170199275017,0.031492676585912704,-0.08627568185329437,-0.05004902184009552,-0.025554530322551727,0.06331039220094681,-0.01711191236972809,-0.011831460520625114,0.027104945853352547,0.008851610124111176,-0.021952908486127853,-0.02357175201177597,0.03602826967835426,0.04190012812614441,-0.01592879556119442,-0.05144048482179642,-0.06067992001771927,-0.021227138116955757,0.04288467392325401,-0.03863159194588661,-0.02356000244617462,-0.023352427408099174,-0.06673593819141388,-0.010007981210947037,0.055265873670578,0.05047699064016342,-1.979678199859336E-4,9.949036175385118E-4,6.658232305198908E-4,-0.013803934678435326,-0.04256494343280792,0.02681785076856613,-0.004666262771934271,-0.01837810128927231,-0.014631545171141624,-0.010532339103519917,-0.017687849700450897,-0.002256568055599928,0.04968293756246567,-0.055096689611673355,-0.030366230756044388,0.003925838973373175,0.007288928143680096,0.03311709314584732,-0.004416213370859623,0.0071632033213973045,0.07520366460084915,0.014326190575957298,0.002428042469546199,0.02246483415365219,-0.008838038891553879,-1.212194183608517E-4,-0.030439775437116623,0.00977406371384859,0.0012831244384869933,-0.014953305013477802,0.01372381392866373,-0.028012733906507492,-0.012741850689053535,-0.02646835707128048,-0.011177859269082546,-0.05135062336921692,-0.010867957957088947,-0.017891226336359978,-0.041451290249824524,-0.008999551646411419,0.04238526523113251,-0.016873734071850777,0.001143655739724636,0.015803761780261993,-0.02664126828312874,0.050672128796577454,-0.012319298461079597,0.03820456936955452,0.0803207978606224,0.031303975731134415,0.02924254722893238,-0.0092654163017869,0.054991524666547775,0.0022399192675948143,0.04403874650597572,-0.03530541807413101,0.0427730493247509,-0.028579672798514366,-0.008782790042459965,-0.03349442034959793,0.0034572677686810493,-0.02285861410200596,0.029523855075240135,0.012142831459641457,0.04190356284379959,0.049507025629282,-0.05482562258839607,-0.013410650193691254,-0.014202662743628025,0.0752951130270958,0.021264033392071724,-0.050569087266922,0.029985738918185234,-0.045563966035842896,0.039315689355134964,0.011179691180586815,0.006178052630275488,0.04663022235035896,0.04581007733941078,0.012961503118276596,-0.0369512103497982],\"errno\":0,\"request_id\":\"eaf0693d-233e-470e-a628-6c130161ba98\"}"} </textarea> <input type=button value="抽人脸关键点数据>>" onclick="cd()"> <textarea class=alilandmark></textarea> <input type=button value="复制到下面↓" onclick="$('#points').val($('.alilandmark').val())"> <br/> 人脸关键点数据 <textarea onmouseover="$(this).select();" id=points style="margin: 0px; width: 713px; height: 55px;">1084.99462890625, 1354.880615234375, 1104.200439453125, 1045.158935546875, 1031.265380859375, 1193.37939453125, 1084.710205078125, 1199.5087890625, 1048.9798583984375, 1308.6314697265625, 1034.365966796875, 1251.886962890625, 1039.62353515625, 1135.426513671875, 1056.9217529296875, 1079.455078125, 1083.0029296875, 1303.04638671875, 1080.809326171875, 1251.220458984375, 1091.1669921875, 1148.042724609375, 1099.08056640625, 1096.77783203125, 1092.5479736328125, 881.111083984375, 1099.6417236328125, 586.5106201171875, 1039.424560546875, 729.7749633789062, 1093.6552734375, 733.53955078125, 1060.5299072265625, 836.8171997070312, 1045.702392578125, 784.1394653320312, 1041.6053466796875, 675.287353515625, 1059.7904052734375, 624.0926513671875, 1096.2830810546875, 832.0042114257812, 1094.5673828125, 782.78125, 1090.03759765625, 684.4282836914062, 1092.4532470703125, 635.236328125, 1185.19482421875, 1262.405029296875, 1187.070068359375, 1096.028076171875, 1172.1385498046875, 1243.476806640625, 1162.9024658203125, 1222.424560546875, 1157.431640625, 1200.09228515625, 1154.6666259765625, 1177.265625, 1154.454345703125, 1154.283447265625, 1159.246826171875, 1131.814697265625, 1170.1468505859375, 1111.59619140625, 1193.7633056640625, 1242.817138671875, 1198.1964111328125, 1221.907958984375, 1201.282470703125, 1200.753173828125, 1203.2742919921875, 1179.4671630859375, 1202.04833984375, 1158.130859375, 1199.0465087890625, 1136.965576171875, 1194.47314453125, 1116.082275390625, 1186.111083984375, 853.8560791015625, 1180.5892333984375, 686.2123413085938, 1168.73779296875, 838.6371459960938, 1158.00390625, 818.2498168945312, 1152.6287841796875, 795.825927734375, 1152.783447265625, 772.76123046875, 1154.912353515625, 749.7661743164062, 1159.95263671875, 727.2352294921875, 1168.066162109375, 705.6156616210938, 1192.941650390625, 833.41552734375, 1196.99560546875, 812.2477416992188, 1199.974853515625, 790.9029541015625, 1200.5101318359375, 769.3594360351562, 1197.9647216796875, 747.9578247070312, 1194.548583984375, 726.67822265625, 1189.9317626953125, 705.6345825195312, 1186.32666015625, 976.9662475585938, 1385.593994140625, 973.2914428710938, 1283.9205322265625, 974.97509765625, 1456.5457763671875, 973.3594360351562, 1458.63623046875, 1085.651123046875, 1452.347412109375, 861.9727783203125, 1644.0263671875, 1113.73291015625, 1638.545654296875, 822.4629516601562, 1634.6864013671875, 1080.7930908203125, 1630.7159423828125, 849.5337524414062, 1578.258544921875, 966.1693115234375, 1561.521728515625, 1009.3319091796875, 1561.0845947265625, 925.2423095703125, 1600.215087890625, 1063.4013671875, 1596.986083984375, 872.0494995117188, 1621.09375, 1089.4583740234375, 1578.306396484375, 1038.200439453125, 1575.45556640625, 896.2108764648438, 1616.5152587890625, 846.2119750976562, 1688.1595458984375, 962.3963623046875, 1676.8544921875, 1040.822021484375, 1676.00439453125, 888.1592407226562, 1661.2568359375, 1077.6455078125, 1687.7801513671875, 1002.3607788085938, 1687.066650390625, 924.4173583984375, 1660.3011474609375, 853.5768432617188, 1609.8272705078125, 965.0790405273438, 1613.5703125, 966.6117553710938, 1613.4300537109375, 1024.739990234375, 1616.2889404296875, 1025.10107421875, 1610.045166015625, 905.4833374023438, 1615.551513671875, 907.1573486328125, 1623.548095703125, 1052.959228515625, 1625.4970703125, 1052.9439697265625, 1609.42724609375, 995.05615234375, 1613.4564208984375, 995.9375610351562, 1608.279296875, 935.2477416992188, 1612.588134765625, 936.81396484375, 1618.8558349609375, 876.9531860351562, 1622.0596923828125, 878.0634155273438, 1217.625, 1436.25634765625, 1213.2484130859375, 528.0890502929688, 1913.9566650390625, 967.7245483398438, 1659.049072265625, 1357.126220703125, 1651.8187255859375, 594.144775390625, 1440.541259765625, 1411.769775390625, 1433.1868896484375, 546.1998291015625, 1840.6500244140625, 1194.290771484375, 1837.17626953125, 748.7349243164062 </textarea> <input type=checkbox class=ys checked>打印原始点 <input type=checkbox class=dydx checked>打印点序 <br> 红绿坐标系相对屏幕左上角X <input value=500 class=zerox /><br> 红绿坐标系相对屏幕左上角Y <input value=650 class=zeroy /><br> 位移抓点原始X <input value=973.35 class=zx /> <input type=checkbox class=zd checked>自动识别<input class=dian value=60>号点<br> 位移抓点原始Y <input value=1456.54 class=zy /><br> 缩放乘积比 <input value=0.0172 class=multi /><br> 最终点计算基准数据<textarea onmouseover="$(this).select();" id=needed>{"1":{"x":-5.017,"y":6.009,"name":"a1","min_x":-0.035,"min_y":999,"max_x":-0.035,"max_y":999,"mirror":14}, "2":{"x":-1.138,"y":5.769,"name":"a2","min_x":0.39,"min_y":999,"max_x":0.39,"max_y":999,"mirror":13}, "3":{"x":-3.058,"y":6.181,"name":"a3","min_x":-0.133,"min_y":999,"max_x":-0.133,"max_y":999,"mirror":15}, "4":{"x":-3.058,"y":6.181,"name":"a4","min_x":-0.135,"min_y":999,"max_x":-0.135,"max_y":999,"mirror":16}, "5":{"x":-5.017,"y":6.009,"name":"a5","min_x":0.318,"min_y":999,"max_x":0.318,"max_y":999,"mirror":20}, "6":{"x":-3.058,"y":6.181,"name":"a6","min_x":-0.95,"min_y":999,"max_x":-0.95,"max_y":999,"mirror":19}, "7":{"x":-3.058,"y":6.181,"name":"a7","min_x":0.785,"min_y":999,"max_x":0.785,"max_y":999,"mirror":18}, "8":{"x":-1.138,"y":5.769,"name":"a8","min_x":-0.204,"min_y":999,"max_x":-0.204,"max_y":999,"mirror":17}, "9":{"x":-5.017,"y":6.009,"name":"a9","min_x":0.551,"min_y":999,"max_x":0.551,"max_y":999,"mirror":24}, "10":{"x":-3.058,"y":6.181,"name":"a10","min_x":-0.776,"min_y":999,"max_x":-0.776,"max_y":999,"mirror":23}, "11":{"x":-3.058,"y":6.181,"name":"a11","min_x":0.769,"min_y":999,"max_x":0.769,"max_y":999,"mirror":22}, "12":{"x":-1.138,"y":5.769,"name":"a12","min_x":-0.353,"min_y":999,"max_x":-0.353,"max_y":999,"mirror":21}, "13":{"x":1.138,"y":5.769,"name":"a13","min_x":-0.39,"min_y":999,"max_x":-0.39,"max_y":999,"mirror":null}, "14":{"x":5.017,"y":6.009,"name":"a14","min_x":0.035,"min_y":999,"max_x":0.035,"max_y":999,"mirror":null}, "15":{"x":3.058,"y":6.181,"name":"a15","min_x":0.133,"min_y":999,"max_x":0.133,"max_y":999,"mirror":null}, "16":{"x":3.058,"y":6.181,"name":"a16","min_x":0.135,"min_y":999,"max_x":0.135,"max_y":999,"mirror":null}, "17":{"x":1.138,"y":5.769,"name":"a17","min_x":0.204,"min_y":999,"max_x":0.204,"max_y":999,"mirror":null}, "18":{"x":3.058,"y":6.181,"name":"a18","min_x":-0.785,"min_y":999,"max_x":-0.785,"max_y":999,"mirror":null}, "19":{"x":3.058,"y":6.181,"name":"a19","min_x":0.95,"min_y":999,"max_x":0.95,"max_y":999,"mirror":null}, "20":{"x":5.017,"y":6.009,"name":"a20","min_x":-0.318,"min_y":999,"max_x":-0.318,"max_y":999,"mirror":null}, "21":{"x":1.138,"y":5.769,"name":"a21","min_x":0.353,"min_y":999,"max_x":0.353,"max_y":999,"mirror":null}, "22":{"x":3.058,"y":6.181,"name":"a22","min_x":-0.769,"min_y":999,"max_x":-0.769,"max_y":999,"mirror":null}, "23":{"x":3.058,"y":6.181,"name":"a23","min_x":0.776,"min_y":999,"max_x":0.776,"max_y":999,"mirror":null}, "24":{"x":5.017,"y":6.009,"name":"a24","min_x":-0.551,"min_y":999,"max_x":-0.551,"max_y":999,"mirror":null}, "25":{"x":-4.175,"y":4.222,"name":"a25","min_x":0.001,"min_y":-0.223,"max_x":0.001,"max_y":0.267,"mirror":42}, "26":{"x":-1.752,"y":3.96,"name":"a26","min_x":0,"min_y":-0.25,"max_x":0,"max_y":0.25,"mirror":41}, "27":{"x":-3.627,"y":4.656,"name":"a27","min_x":-0.29,"min_y":-0.423,"max_x":-0.29,"max_y":0.077,"mirror":49}, "28":{"x":-3.627,"y":4.656,"name":"a28","min_x":0,"min_y":-0.25,"max_x":0,"max_y":0.25,"mirror":48}, "29":{"x":-2.93,"y":4.776,"name":"a29","min_x":-0.349,"min_y":-0.281,"max_x":-0.349,"max_y":0.219,"mirror":47}, "30":{"x":-2.93,"y":4.776,"name":"a30","min_x":0.01,"min_y":-0.253,"max_x":0.01,"max_y":0.247,"mirror":46}, "31":{"x":-2.93,"y":4.776,"name":"a31","min_x":0.438,"min_y":-0.307,"max_x":0.438,"max_y":0.193,"mirror":45}, "32":{"x":-2.145,"y":4.573,"name":"a32","min_x":0,"min_y":-0.25,"max_x":0,"max_y":0.25,"mirror":44}, "33":{"x":-2.145,"y":4.573,"name":"a33","min_x":0.19,"min_y":-0.481,"max_x":0.19,"max_y":0.019,"mirror":43}, "34":{"x":-3.784,"y":3.871,"name":"a34","min_x":-0.272,"min_y":-0.109,"max_x":-0.272,"max_y":0.391,"mirror":56}, "35":{"x":-3.784,"y":3.871,"name":"a35","min_x":0,"min_y":-0.25,"max_x":0,"max_y":0.25,"mirror":55}, "36":{"x":-2.957,"y":3.711,"name":"a36","min_x":-0.448,"min_y":-0.184,"max_x":-0.448,"max_y":0.316,"mirror":54}, "37":{"x":-2.957,"y":3.711,"name":"a37","min_x":0,"min_y":-0.25,"max_x":0,"max_y":0.25,"mirror":53}, "38":{"x":-2.957,"y":3.711,"name":"a38","min_x":0.382,"min_y":-0.225,"max_x":0.382,"max_y":0.275,"mirror":52}, "39":{"x":-2.275,"y":3.804,"name":"a39","min_x":0,"min_y":-0.25,"max_x":0,"max_y":0.25,"mirror":51}, "40":{"x":-2.275,"y":3.804,"name":"a40","min_x":0.272,"min_y":-0.15,"max_x":0.272,"max_y":0.35,"mirror":50}, "41":{"x":1.752,"y":3.96,"name":"a41","min_x":0,"min_y":-0.25,"max_x":0,"max_y":0.25,"mirror":null}, "42":{"x":4.174,"y":4.239,"name":"a42","min_x":0,"min_y":-0.25,"max_x":0,"max_y":0.25,"mirror":null}, "43":{"x":2.145,"y":4.573,"name":"a43","min_x":-0.19,"min_y":-0.481,"max_x":-0.19,"max_y":0.019,"mirror":null}, "44":{"x":2.145,"y":4.573,"name":"a44","min_x":0,"min_y":-0.25,"max_x":0,"max_y":0.25,"mirror":null}, "45":{"x":2.92,"y":4.773,"name":"a45","min_x":-0.427,"min_y":-0.304,"max_x":-0.427,"max_y":0.196,"mirror":null}, "46":{"x":2.92,"y":4.773,"name":"a46","min_x":0,"min_y":-0.25,"max_x":0,"max_y":0.25,"mirror":null}, "47":{"x":2.92,"y":4.773,"name":"a47","min_x":0.359,"min_y":-0.278,"max_x":0.359,"max_y":0.222,"mirror":null}, "48":{"x":3.627,"y":4.656,"name":"a48","min_x":0,"min_y":-0.25,"max_x":0,"max_y":0.25,"mirror":null}, "49":{"x":3.627,"y":4.656,"name":"a49","min_x":0.29,"min_y":-0.423,"max_x":0.29,"max_y":0.077,"mirror":null}, "50":{"x":2.275,"y":3.804,"name":"a50","min_x":-0.272,"min_y":-0.15,"max_x":-0.272,"max_y":0.35,"mirror":null}, "51":{"x":2.275,"y":3.804,"name":"a51","min_x":0,"min_y":-0.25,"max_x":0,"max_y":0.25,"mirror":null}, "52":{"x":2.957,"y":3.711,"name":"a52","min_x":-0.382,"min_y":-0.225,"max_x":-0.382,"max_y":0.275,"mirror":null}, "53":{"x":2.957,"y":3.711,"name":"a53","min_x":0,"min_y":-0.25,"max_x":0,"max_y":0.25,"mirror":null}, "54":{"x":2.957,"y":3.711,"name":"a54","min_x":0.448,"min_y":-0.184,"max_x":0.448,"max_y":0.316,"mirror":null}, "55":{"x":3.784,"y":3.871,"name":"a55","min_x":0,"min_y":-0.25,"max_x":0,"max_y":0.25,"mirror":null}, "56":{"x":3.784,"y":3.871,"name":"a56","min_x":0.272,"min_y":-0.109,"max_x":0.272,"max_y":0.391,"mirror":null}, "57":{"x":0,"y":0,"name":"a57","min_x":0,"min_y":4.094,"max_x":0,"max_y":4.094,"mirror":null}, "58":{"x":0,"y":1.579,"name":"a58","min_x":0,"min_y":-0.2,"max_x":0,"max_y":0.2,"mirror":null}, "59":{"x":0,"y":0,"name":"a59","min_x":0,"min_y":2.847,"max_x":0,"max_y":2.847,"mirror":null}, "60":{"x":0,"y":0.484,"name":"a60","min_x":0,"min_y":999,"max_x":0,"max_y":999,"mirror":null}, "61":{"x":-1.207,"y":1.194,"name":"a61","min_x":-0.1,"min_y":-0.1,"max_x":0.1,"max_y":0.1,"mirror":62}, "62":{"x":1.207,"y":1.194,"name":"a62","min_x":-0.1,"min_y":-0.1,"max_x":0.1,"max_y":0.1,"mirror":null}, "63":{"x":-1.788,"y":-1.002,"name":"a63","min_x":-0.2,"min_y":-0.15,"max_x":0.2,"max_y":0.15,"mirror":64}, "64":{"x":1.788,"y":-1.002,"name":"a64","min_x":-.2,"min_y":-0.15,"max_x":0.2,"max_y":0.15,"mirror":null}, "65":{"x":-0.945,"y":-1.632,"name":"a65","min_x":-0.523,"min_y":0.432,"max_x":-0.523,"max_y":0.732,"mirror":66}, "66":{"x":0.945,"y":-1.632,"name":"a66","min_x":0.523,"min_y":0.432,"max_x":0.523,"max_y":0.732,"mirror":null}, "67":{"x":0,"y":-0.485,"name":"a67","min_x":0,"min_y":-0.15,"max_x":0,"max_y":0.15,"mirror":null}, "68":{"x":0,"y":-0.485,"name":"a68","min_x":-0.416,"min_y":-0.058,"max_x":-0.416,"max_y":0.242,"mirror":69}, "69":{"x":0,"y":-0.485,"name":"a69","min_x":0.416,"min_y":-0.058,"max_x":0.416,"max_y":0.242,"mirror":null}, "70":{"x":-1.076,"y":-0.722,"name":"a70","min_x":0,"min_y":-0.15,"max_x":0,"max_y":0.15,"mirror":71}, "71":{"x":1.076,"y":-0.721,"name":"a71","min_x":0,"min_y":-0.15,"max_x":0,"max_y":0.15,"mirror":null}, "72":{"x":-1.076,"y":-0.722,"name":"a72","min_x":-0.353,"min_y":-0.349,"max_x":-0.353,"max_y":-0.049,"mirror":75}, "73":{"x":-1.076,"y":-0.722,"name":"a73","min_x":0.317,"min_y":0.007,"max_x":0.317,"max_y":0.307,"mirror":74}, "74":{"x":1.076,"y":-0.721,"name":"a74","min_x":-0.317,"min_y":0.007,"max_x":-0.317,"max_y":0.307,"mirror":null}, "75":{"x":1.076,"y":-0.721,"name":"a75","min_x":0.353,"min_y":-0.349,"max_x":0.353,"max_y":-0.049,"mirror":null}, "76":{"x":0,"y":-1.632,"name":"a76","min_x":0,"min_y":-0.15,"max_x":0,"max_y":0.15,"mirror":null}, "77":{"x":-0.945,"y":-1.632,"name":"a77","min_x":0,"min_y":-0.15,"max_x":0,"max_y":0.15,"mirror":78}, "78":{"x":0.945,"y":-1.632,"name":"a78","min_x":0,"min_y":-0.15,"max_x":0,"max_y":0.15,"mirror":null}, "79":{"x":-0.945,"y":-1.632,"name":"a79","min_x":-0.408,"min_y":0.103,"max_x":-0.408,"max_y":0.403,"mirror":82}, "80":{"x":0,"y":-1.758,"name":"a80","min_x":-0.51,"min_y":-0.148,"max_x":-0.51,"max_y":0.152,"mirror":81}, "81":{"x":0,"y":-1.758,"name":"a81","min_x":0.51,"min_y":-0.148,"max_x":0.51,"max_y":0.152,"mirror":null}, "82":{"x":0.945,"y":-1.758,"name":"a82","min_x":0.408,"min_y":0.103,"max_x":0.408,"max_y":0.403,"mirror":null}, "83":{"x":0,"y":-0.987,"name":"a83","min_x":0,"min_y":-0.15,"max_x":0,"max_y":0.15,"mirror":null}, "84":{"x":0,"y":-1.758,"name":"a84","min_x":0,"min_y":0.545,"max_x":0,"max_y":0.845,"mirror":null}, "85":{"x":-1.076,"y":-0.722,"name":"a85","min_x":0.242,"min_y":-0.426,"max_x":0.242,"max_y":-0.126,"mirror":87}, "86":{"x":-0.945,"y":-1.632,"name":"a86","min_x":-0.02,"min_y":0.447,"max_x":-0.02,"max_y":0.747,"mirror":88}, "87":{"x":1.076,"y":-0.721,"name":"a87","min_x":-0.242,"min_y":-0.427,"max_x":-0.242,"max_y":-0.127,"mirror":null}, "88":{"x":0.945,"y":-1.632,"name":"a88","min_x":0.02,"min_y":0.446,"max_x":0.02,"max_y":0.746,"mirror":null}, "89":{"x":-1.076,"y":-0.722,"name":"a89","min_x":-0.157,"min_y":-0.472,"max_x":-0.157,"max_y":-0.172,"mirror":95}, "90":{"x":-0.945,"y":-1.632,"name":"a90","min_x":-0.283,"min_y":0.421,"max_x":-0.283,"max_y":0.721,"mirror":96}, "91":{"x":0,"y":-0.987,"name":"a91","min_x":-0.437,"min_y":-0.113,"max_x":-0.437,"max_y":0.187,"mirror":93}, "92":{"x":0,"y":-1.758,"name":"a92","min_x":-0.51,"min_y":0.592,"max_x":-0.51,"max_y":0.892,"mirror":94}, "93":{"x":0,"y":-0.987,"name":"a93","min_x":0.437,"min_y":-0.113,"max_x":0.437,"max_y":0.187,"mirror":null}, "94":{"x":0,"y":-1.758,"name":"a94","min_x":0.51,"min_y":0.892,"max_x":0.51,"max_y":0.592,"mirror":null}, "95":{"x":1.076,"y":-0.721,"name":"a95","min_x":0.157,"min_y":-0.473,"max_x":0.157,"max_y":-0.273,"mirror":null}, "96":{"x":0.945,"y":-1.632,"name":"a96","min_x":0.283,"min_y":0.421,"max_x":0.283,"max_y":0.721,"mirror":null}, "97":{"x":0,"y":0,"name":"a97","min_x":-6.286,"min_y":4.368,"max_x":-6.286,"max_y":4.368,"mirror":null}, "98":{"x":0,"y":0,"name":"a98","min_x":6.286,"min_y":4.368,"max_x":6.286,"max_y":4.368,"mirror":null}, "99":{"x":0,"y":-0.884,"name":"a99","min_x":0.03,"min_y":-3.42,"max_x":0.03,"max_y":-3.42,"mirror":null}, "100":{"x":0,"y":0,"name":"a100","min_x":-4.082,"min_y":-0.854,"max_x":-4.082,"max_y":-0.854,"mirror":null}, "101":{"x":0,"y":0,"name":"a101","min_x":4.082,"min_y":-0.854,"max_x":4.082,"max_y":-0.854,"mirror":null}, "102":{"x":0,"y":0,"name":"a102","min_x":-5.841,"min_y":2.294,"max_x":-5.841,"max_y":2.294,"mirror":null}, "103":{"x":0,"y":0,"name":"a103","min_x":5.841,"min_y":2.294,"max_x":5.841,"max_y":2.294,"mirror":null}, "104":{"x":0,"y":-0.884,"name":"a104","min_x":-2.028,"min_y":-2.388,"max_x":-2.028,"max_y":-2.388,"mirror":null}, "105":{"x":0,"y":-0.884,"name":"a105","min_x":2.028,"min_y":-2.388,"max_x":2.028,"max_y":-2.388,"mirror":null}}</textarea> <input type=checkbox class=jx checked>镜像 <input type=checkbox class=fz checked>镜像反转 <br> 最终Y偏移 <input value=0.5 id=yz /><br> 最终X偏移 <input value=0 id=yx /><br> <input type=button onclick='change()' value=提交> <div class=draw> </div> <br> <textarea class=result onmouseover="$(this).select();" style="margin: 0px; width: 639px; height: 247px;"></textarea> </body> </html> <style></style> <script>function cd(){ var json = eval("("+$(".ali").val()+")"); var data = eval("("+json.data+")"); $(".alilandmark").val(data.landmark); //document.write(); } //获取元素的纵坐标 function getTop(e){ var offset=e.offsetTop; if(e.offsetParent!=null) offset+=getTop(e.offsetParent); return offset; } //获取元素的横坐标 function getLeft(e){ var offset=e.offsetLeft; if(e.offsetParent!=null) offset+=getLeft(e.offsetParent); return offset; } function getPos(e){ return [getLeft(e), getTop(e)]; } //var pos = getPos(document.getElementById("floatDiv")); //描点,参数有点的大小,颜色,点的坐标和标签 function drawPoint(opts){ $(".draw").append("<span title='"+opts.point[2]+"' id='"+opts.point[0]+""+opts.point[1]+"' style='display: inline-block; width: "+opts.pw+"px; height: "+opts.ph+"px; background-color: "+opts.color+"; position: absolute; left: "+opts.point[0]+"px; top: "+opts.point[1]+"px;'>"+(opts.point[3]?("<div style='position: relative;'><span style='position: absolute; left: 5px; bottom: 0px; text-align: left; width: 100px; font-size:8px'>"+opts.point[3]+"</span></div>"):"")+"</span>"); } function test(x,y){ var oldy = y; var oldx = x; //y = x; //x = oldy; //x=x/5; //y=y/5; //原始数据除 /*drawPoint({ pw:4,ph:4,color:'blue',point: [x,y,count] });*/ // 根据需求进行偏移、旋转、缩放 // 0点屏幕偏移: 500,500 // 鼻子中点: y=1385.59, x=973.29 // 嘴唇上瓣下部中点: y=1609.82, x=965.07 //test(1187.07, 1096.02); //左眼内尖 //test(1186.11, 853.85); //右眼内尖 //以嘴唇部分为中点输坐标 //var zx = 965.07; //目标0点x坐标 //var zy = 1609.82; //目标0点y坐标 //以鼻子中点为原点输坐标 //var zx = 973.29; //目标0点x坐标 //var zy = 1385.59; //目标0点y坐标 //以两眼中点为原点输坐标 //var zx = (1096.02+853.85)/2; //var zy = (1187.07+1186.11)/2; //var zx = 973.35; //var zy = 1456.54+40; //x = oldy + zerox - zx; //y = oldx + zeroy - zy; //var multi = 1; x=(x-zerox)*multi + zerox; y=(y-zeroy)*multi + zeroy; $(".draw").append("<font color=#ddd size=1>NO."+count+": x="+(x-zerox).toFixed(2)+" , y="+-(y-zeroy).toFixed(2)+"</font><br>"); drawPoint({ pw:4,ph:4,color:'blue',point: [x,y,"NO."+count+": x="+(x-zerox).toFixed(2)+" , y="+""+-((y-zeroy).toFixed(2)),count] }); count++; } //drawzb(); //var count = 1; //drawp(); function change(){ //var count = 1; var zerox = parseFloat($(".zerox").val()); var zeroy = parseFloat($(".zeroy").val()); var multi = $(".multi").val(); $(".draw").html(""); for(var i = zeroy/10; i<zeroy*2; i++){ drawPoint({ pw:2,ph:2,color:'red',point: [zerox,i] }); } for(var i = zerox/10; i<zerox*2; i++){ drawPoint({ pw:2,ph:2,color:'green',point: [i,zeroy] }); } //绘制人脸点 var string = $("#points").val(); var doubles =string.split(","); //alert(doubles[1]); //41,26 判断横纵是否正常 var hz = Math.abs(doubles[80] - doubles[50])> Math.abs(doubles[81] - doubles[51]); $(".draw").append("横竖正常: "+hz+"<br>"); //判断41与58号点绝对距离 80,81 114,115 var m = Math.sqrt(Math.pow(doubles[80]-doubles[114],2)+Math.pow(doubles[81]-doubles[115],2)); $(".draw").append("41-58号点绝对距离: "+m+"<br>"); //倍数处理 multi = 200/m*multi; $(".draw").append("实际乘积比: "+multi+" (200/"+m+"*缩放乘积比)<br>"); //判断偏移 if($(".zd").attr('checked')){ var dian = $(".dian").val(); if(!hz){ var zx = doubles[(dian-1)*2+1]; var zy = doubles[(dian-1)*2]; }else{ var zx = doubles[(dian-1)*2]; var zy = doubles[(dian-1)*2+1]; } }else{ var zx = parseFloat($(".zx").val()); var zy = parseFloat($(".zy").val()); } for (var i=0;i<doubles.length;i=i+2) { if($(".ys").attr('checked')){ drawPoint({ pw:4,ph:4,color:'blue',point: [doubles[i],doubles[i+1],"NO."+(i/2+1)+": x="+(doubles[i])+" , y="+(doubles[i+1]),i/2+1] }); } if(hz){ var sourcex = parseFloat(doubles[i]); var sourcey = parseFloat(doubles[i+1]); }else{ var sourcex = parseFloat(doubles[i+1]); var sourcey = parseFloat(doubles[i]); } //定点位移 x = sourcex + zerox - zx; y = sourcey + zeroy - zy; //缩放 x=(x-zerox)*multi + zerox; y=(y-zeroy)*multi + zeroy; //document.write(x+","+y+"<br>"); //test(y,x); $(".draw").append("<font color=#ddd size=1>NO."+(i/2+1)+": 原始x="+sourcex+",y="+sourcey+"; 屏幕x="+x+",y="+y+" 红绿坐标系x="+(x-zerox).toFixed(2)+" , y="+-(y-zeroy).toFixed(2)+"</font><br>"); drawPoint({ pw:4,ph:4,color:'blue',point: [x,y,"NO."+(i/2+1)+": x="+(x-zerox).toFixed(2)+" , y="+""+-((y-zeroy).toFixed(2)),i/2+1] }); } } </script> <style></style> <script>function cd(){ var json = eval("("+$(".ali").val()+")"); var data = eval("("+json.data+")"); $(".alilandmark").val(data.landmark); //document.write(); } //获取元素的纵坐标 function getTop(e){ var offset=e.offsetTop; if(e.offsetParent!=null) offset+=getTop(e.offsetParent); return offset; } //获取元素的横坐标 function getLeft(e){ var offset=e.offsetLeft; if(e.offsetParent!=null) offset+=getLeft(e.offsetParent); return offset; } function getPos(e){ return [getLeft(e), getTop(e)]; } //var pos = getPos(document.getElementById("floatDiv")); //描点,参数有点的大小,颜色,点的坐标和标签 function drawPoint(opts){ $(".draw").append("<span title='"+opts.point[2]+"' id='"+opts.point[0]+""+opts.point[1]+"' style='display: inline-block; width: "+opts.pw+"px; height: "+opts.ph+"px; background-color: "+opts.color+"; position: absolute; left: "+opts.point[0]+"px; top: "+opts.point[1]+"px;'>"+(opts.point[3]?("<div style='position: relative;'><span style='position: absolute; left: 5px; bottom: 0px; text-align: left; width: 100px; font-size:8px'>"+opts.point[3]+"</span></div>"):"")+"</span>"); } function test(x,y){ var oldy = y; var oldx = x; //y = x; //x = oldy; //x=x/5; //y=y/5; //原始数据除 /*drawPoint({ pw:4,ph:4,color:'blue',point: [x,y,count] });*/ // 根据需求进行偏移、旋转、缩放 // 0点屏幕偏移: 500,500 // 鼻子中点: y=1385.59, x=973.29 // 嘴唇上瓣下部中点: y=1609.82, x=965.07 //test(1187.07, 1096.02); //左眼内尖 //test(1186.11, 853.85); //右眼内尖 //以嘴唇部分为中点输坐标 //var zx = 965.07; //目标0点x坐标 //var zy = 1609.82; //目标0点y坐标 //以鼻子中点为原点输坐标 //var zx = 973.29; //目标0点x坐标 //var zy = 1385.59; //目标0点y坐标 //以两眼中点为原点输坐标 //var zx = (1096.02+853.85)/2; //var zy = (1187.07+1186.11)/2; //var zx = 973.35; //var zy = 1456.54+40; //x = oldy + zerox - zx; //y = oldx + zeroy - zy; //var multi = 1; x=(x-zerox)*multi + zerox; y=(y-zeroy)*multi + zeroy; $(".draw").append("<font color=#ddd size=1>NO."+count+": x="+(x-zerox).toFixed(2)+" , y="+-(y-zeroy).toFixed(2)+"</font><br>"); drawPoint({ pw:4,ph:4,color:'blue',point: [x,y,"NO."+count+": x="+(x-zerox).toFixed(2)+" , y="+""+-((y-zeroy).toFixed(2)),count] }); count++; } //drawzb(); //var count = 1; //drawp(); var tmp = new Array(); var needed; function change(){ needed = eval("("+$("#needed").val()+")"); //var count = 1; var zerox = parseFloat($(".zerox").val()); var zeroy = parseFloat($(".zeroy").val()); var multi = $(".multi").val(); $(".draw").html(""); for(var i = zeroy/10; i<zeroy*2; i++){ drawPoint({ pw:2,ph:2,color:'red',point: [zerox,i] }); } for(var i = zerox/10; i<zerox*2; i++){ drawPoint({ pw:2,ph:2,color:'green',point: [i,zeroy] }); } //绘制人脸点 var string = $("#points").val(); var doubles =string.split(","); //alert(doubles[1]); //41,26 判断横纵是否正常 var hz = Math.abs(doubles[80] - doubles[50])> Math.abs(doubles[81] - doubles[51]); $(".draw").append("横竖正常: "+hz+"<br>"); //判断41与58号点绝对距离 80,81 114,115 var m = Math.sqrt(Math.pow(doubles[80]-doubles[114],2)+Math.pow(doubles[81]-doubles[115],2)); $(".draw").append("41-58号点绝对距离: "+m+"<br>"); //倍数处理 multi = 200/m*multi; $(".draw").append("实际乘积比: "+multi+" (200/"+m+"*缩放乘积比)<br>"); //判断偏移 if($(".zd").attr('checked')){ var dian = $(".dian").val(); if(!hz){ var zx = doubles[(dian-1)*2+1]; var zy = doubles[(dian-1)*2]; }else{ var zx = doubles[(dian-1)*2]; var zy = doubles[(dian-1)*2+1]; } }else{ var zx = parseFloat($(".zx").val()); var zy = parseFloat($(".zy").val()); } for (var i=0;i<doubles.length;i=i+2) { //打印原始点 if($(".ys").attr('checked')){ drawPoint({ pw:4,ph:4,color:'blue',point: [doubles[i],doubles[i+1],"NO."+(i/2+1)+": x="+(doubles[i])+" , y="+(doubles[i+1]),$(".dydx").attr('checked')?i/2+1:''] }); } if(needed[i/2+1]){ //该点需要输出 //横纵处理 if(hz){ var sourcex = parseFloat(doubles[i]); var sourcey = parseFloat(doubles[i+1]); }else{ var sourcex = parseFloat(doubles[i+1]); var sourcey = parseFloat(doubles[i]); } if(needed[i/2+1]['mirror']!=null){ //该点镜像其他点 //1 - 0,1 *2-2,*2-1 //2 - 2,3 //3 - 4,5 //4 - 6,7 //continue; //i=needed[i/2+1]['mirror']*2; //document.write(i); } //定点位移 x = sourcex + zerox - zx; y = sourcey + zeroy - zy; //大小缩放 x=(x-zerox)*multi + zerox; y=(y-zeroy)*multi + zeroy; //document.write(x+","+y+"<br>"); //test(y,x); //$(".draw").append("<font color=#ddd size=1>NO."+(i/2+1)+": 原始x="+sourcex+",y="+sourcey+"; 屏幕x="+x+",y="+y+" 红绿坐标系x="+(x-zerox).toFixed(2)+" , y="+-(y-zeroy).toFixed(2)+" 最终坐标系x="+((x-zerox).toFixed(2)-needed[i/2+1]['x'])+" , y="+(-(y-zeroy).toFixed(2)-needed[i/2+1]['y'])+"</font><br>"); var finalx = ((x-zerox).toFixed(2)-needed[i/2+1]['x'])+parseFloat($("#yx").val()); //最终X var finaly = (-(y-zeroy).toFixed(2)-needed[i/2+1]['y'])+parseFloat($("#yz").val()); //最终Y //上下限处理 if(needed[i/2+1]['min_x']!=999 & finalx<needed[i/2+1]['min_x']){ finalx = needed[i/2+1]['min_x']; } if(needed[i/2+1]['min_y']!=999 & finaly<needed[i/2+1]['min_y']){ finaly = needed[i/2+1]['min_y']; } if(needed[i/2+1]['max_x']!=999 & finalx>needed[i/2+1]['max_x']){ finalx = needed[i/2+1]['max_x']; } if(needed[i/2+1]['max_y']!=999 & finaly>needed[i/2+1]['max_y']){ finaly = needed[i/2+1]['max_y']; } ////$(".draw").append("setAttr \""+needed[i/2+1]["name"]+".translateX\" "+ (finalx)+";<br>"); ////$(".draw").append("setAttr \""+needed[i/2+1]["name"]+".translateY\" "+ (finaly)+";<br>"); //x-输出值 //y-输出值 //finalx-打印值 //finaly-打印值 var tmpp = { x: x, y: y, finalx: finalx, finaly: finaly }; //eval("tmp."+(i/2+1)+"=tmpp;"); tmp[i/2+1]=tmpp; //$(".draw").append(); //drawPoint({ // pw:4,ph:4,color:'blue',point: [x,y,"NO."+(i/2+1)+": x="+(x-zerox).toFixed(2)+" , y="+""+-((y-zeroy).toFixed(2)),$(".dydx").attr('checked')?i/2+1:''] //}); } } if($(".fz").attr('checked')){ for(var i = 1;i<106;i++){ if(needed[i]["mirror"] && !needed[i]["stop"]){ //console.log(i+":"+needed[i]["mirror"]); needed[needed[i]["mirror"]]["mirror"] = i; needed[needed[i]["mirror"]]["stop"] = true; needed[i]["mirror"]=null; } } } $(".result").val(""); var out = new Array(); for(var i=1;i<106;i++){ //tmp 已经记录了完成处理的x y 和finalx finaly var ooobj = new Object(); if($(".jx").attr('checked') && needed[i]["mirror"]){ reali = needed[i]["mirror"]; $(".result").val($(".result").val()+"setAttr \""+needed[i]["name"]+".translateX\" "+ -(tmp[reali]["finalx"])+";\n"); $(".result").val($(".result").val()+"setAttr \""+needed[i]["name"]+".translateY\" "+ (tmp[reali]["finaly"])+";\n"); ooobj.name = needed[i]["name"]; ooobj.x = -(tmp[reali]["finalx"]); ooobj.y = (tmp[reali]["finaly"]); drawPoint({ pw:4,ph:4,color:'blue',point: [-(tmp[reali]["x"]-zerox)+zerox,tmp[reali]["y"],"",$(".dydx").attr('checked')?i+"("+reali+")":''] }); }else{ $(".result").val($(".result").val()+"setAttr \""+needed[i]["name"]+".translateX\" "+ (tmp[i]["finalx"])+";\n"); $(".result").val($(".result").val()+"setAttr \""+needed[i]["name"]+".translateY\" "+ (tmp[i]["finaly"])+";\n"); ooobj.name = needed[i]["name"]; ooobj.x = (tmp[i]["finalx"]); ooobj.y = (tmp[i]["finaly"]); drawPoint({ pw:4,ph:4,color:'blue',point: [tmp[i]["x"],tmp[i]["y"],"NO."+i+": x="+(tmp[i]["x"]-zerox).toFixed(2)+" , y="+""+-((tmp[i]["y"]-zeroy).toFixed(2)),$(".dydx").attr('checked')?i:''] }); } out.push(ooobj); //$(".draw").append(tmp[i]["x"]+"<br>"); } document.write(JSON.stringify(out)); } </script> |