├── Pics ├── city_input.png ├── city_result.png ├── pumpkin_input.png ├── pumpkin_result.png ├── tiananmen_input.png └── tiananmen_result.png ├── README.md ├── TR1000.txt ├── main.py ├── regularization.py ├── utils.py └── wls.py /Pics/city_input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joey777210/Non-Local-Dehazing-Python/5b9bc5fd1ea41a760030acfcb873033667d8b0ae/Pics/city_input.png -------------------------------------------------------------------------------- /Pics/city_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joey777210/Non-Local-Dehazing-Python/5b9bc5fd1ea41a760030acfcb873033667d8b0ae/Pics/city_result.png -------------------------------------------------------------------------------- /Pics/pumpkin_input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joey777210/Non-Local-Dehazing-Python/5b9bc5fd1ea41a760030acfcb873033667d8b0ae/Pics/pumpkin_input.png -------------------------------------------------------------------------------- /Pics/pumpkin_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joey777210/Non-Local-Dehazing-Python/5b9bc5fd1ea41a760030acfcb873033667d8b0ae/Pics/pumpkin_result.png -------------------------------------------------------------------------------- /Pics/tiananmen_input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joey777210/Non-Local-Dehazing-Python/5b9bc5fd1ea41a760030acfcb873033667d8b0ae/Pics/tiananmen_input.png -------------------------------------------------------------------------------- /Pics/tiananmen_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joey777210/Non-Local-Dehazing-Python/5b9bc5fd1ea41a760030acfcb873033667d8b0ae/Pics/tiananmen_result.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Non-Local Dehazing - Python Implementation 2 | ## Introduction 3 | This code is the repreduction of the paper 4 | [Berman_Non-Local_Image_Dehazing -_CVPR_2016](https://openaccess.thecvf.com/content_cvpr_2016/papers/Berman_Non-Local_Image_Dehazing_CVPR_2016_paper.pdf) 5 | ## Compile Dependencies 6 | * Python 3.6 7 | * Numpy 1.19.1 8 | * OpenCV 4.4.0.42 9 | * scipy.sparse 1.5.2 10 | * kdtree [Click Here](https://github.com/stefankoegl/kdtree) 11 | 12 | ## Examples 13 | * Tiananmen 14 | ![tiananmen_input](./Pics/tiananmen_input.png) 15 | ![tiananmen_result](./Pics/tiananmen_result.png) 16 | * City 17 | ![city_input](./Pics/city_input.png) 18 | ![city_result](./Pics/city_result.png) 19 | * Pumpkin 20 | ![pumpkin_input](./Pics/pumpkin_input.png) 21 | ![pumpkin_result](./Pics/pumpkin_result.png) 22 | -------------------------------------------------------------------------------- /TR1000.txt: -------------------------------------------------------------------------------- 1 | -0.9425 -0.2041 -0.2648 2 | 0.5224 0.7539 0.3985 3 | 0.5528 0.0429 -0.8322 4 | 0.6499 0.0243 -0.7596 5 | 0.6986 0.1199 -0.7054 6 | -0.0303 0.9929 -0.1151 7 | 0.8482 0.0839 -0.5230 8 | 0.9526 0.0586 -0.2985 9 | -0.2253 -0.1544 -0.9620 10 | 0.9065 0.0667 -0.4168 11 | 0.9313 -0.0364 -0.3625 12 | 0.9274 0.2528 -0.2755 13 | 0.9601 0.1575 -0.2311 14 | 0.9827 0.0588 -0.1759 15 | 0.4552 0.2145 0.8641 16 | 0.0245 0.6354 0.7718 17 | 0.9838 0.1794 0.0003 18 | 0.9944 0.0840 0.0637 19 | 0.1522 0.2044 -0.9670 20 | 0.9784 0.1048 0.1784 21 | 0.1846 0.8742 -0.4490 22 | 0.9353 0.0254 0.3528 23 | 0.8863 0.0396 0.4613 24 | -0.4683 0.2315 0.8527 25 | 0.8514 -0.0566 0.5215 26 | 0.8241 0.0513 0.5642 27 | 0.7803 -0.0439 0.6238 28 | 0.0253 -0.0740 0.9969 29 | 0.6571 0.0871 0.7487 30 | 0.5676 0.1304 0.8129 31 | 0.4011 0.0242 0.9157 32 | -0.1442 0.9656 0.2165 33 | 0.3730 -0.9271 -0.0358 34 | 0.3781 0.2043 -0.9030 35 | 0.5067 0.1507 -0.8489 36 | 0.6084 0.1352 -0.7820 37 | 0.6523 0.2322 -0.7215 38 | 0.7786 0.1026 -0.6190 39 | 0.7782 0.4864 -0.3974 40 | 0.8083 0.1983 -0.5544 41 | 0.8251 0.2929 -0.4831 42 | 0.9227 0.1605 -0.3506 43 | -0.1930 -0.2652 -0.9447 44 | 0.2991 -0.7068 -0.6410 45 | 0.9420 0.2887 -0.1714 46 | 0.9597 0.2731 -0.0659 47 | 0.9245 0.3775 -0.0524 48 | 0.9124 0.4034 0.0693 49 | 0.8871 0.4228 0.1851 50 | 0.9539 0.2970 0.0444 51 | 0.9485 0.2208 0.2270 52 | 0.9358 0.3163 0.1556 53 | 0.9052 0.3318 0.2656 54 | 0.9110 0.2363 0.3379 55 | 0.8596 0.2498 0.4457 56 | 0.8511 0.1507 0.5028 57 | 0.5268 -0.1617 -0.8345 58 | 0.4062 -0.8690 -0.2825 59 | 0.7849 0.1609 0.5984 60 | 0.6297 0.2089 0.7482 61 | -0.4992 -0.5457 0.6731 62 | 0.4784 0.1069 0.8716 63 | 0.3721 0.1418 0.9173 64 | 0.2940 0.0590 0.9540 65 | 0.1776 0.0098 -0.9841 66 | 0.4599 0.2507 -0.8518 67 | 0.5606 0.2450 -0.7910 68 | 0.8616 0.3439 0.3733 69 | 0.5910 0.3426 -0.7303 70 | 0.6792 0.3292 -0.6559 71 | 0.6980 0.4219 -0.5786 72 | 0.7573 0.3130 -0.5732 73 | 0.7092 0.5082 -0.4887 74 | 0.8347 0.3809 -0.3977 75 | 0.8390 0.4548 -0.2988 76 | 0.7755 0.5572 -0.2970 77 | 0.8357 0.5103 -0.2028 78 | 0.8797 0.4629 -0.1087 79 | 0.7105 0.5858 -0.3899 80 | 0.8213 0.5628 -0.0929 81 | 0.8731 0.4875 0.0001 82 | 0.8536 0.5093 0.1093 83 | 0.8232 0.5241 0.2183 84 | 0.7814 0.5319 0.3263 85 | 0.8495 0.4357 0.2975 86 | -0.2468 0.1027 0.9636 87 | 0.7977 0.4449 0.4071 88 | 0.1627 -0.2310 0.9593 89 | 0.7389 0.3623 0.5681 90 | 0.7948 0.2599 0.5484 91 | 0.6632 0.3722 0.6494 92 | 0.5757 0.4340 0.6929 93 | 0.5132 0.3740 0.7725 94 | 0.5376 0.2555 0.8036 95 | 0.3492 0.2587 0.9006 96 | 0.2158 -0.0260 0.9761 97 | 0.2310 0.1126 -0.9664 98 | 0.2889 0.3200 -0.9023 99 | 0.3872 0.3360 -0.8586 100 | 0.4929 0.3498 -0.7966 101 | 0.6143 0.4353 -0.6581 102 | 0.4626 0.6167 -0.6369 103 | -0.6389 0.0488 -0.7677 104 | 0.6308 0.5228 -0.5734 105 | 0.8405 -0.5070 0.1908 106 | 0.6358 0.6762 -0.3721 107 | 0.7049 0.6511 -0.2813 108 | 0.2048 -0.4480 0.8703 109 | 0.7686 0.6112 -0.1887 110 | 0.6725 0.7383 -0.0519 111 | 0.7523 0.6547 -0.0744 112 | 0.8087 0.5879 0.0188 113 | 0.7329 0.6792 0.0388 114 | 0.7873 -0.6015 0.1353 115 | 0.5690 0.7715 0.2847 116 | -0.1491 -0.2403 0.9592 117 | 0.7501 0.6177 0.2361 118 | -0.7850 0.5957 0.1702 119 | 0.6162 0.6969 0.3670 120 | 0.7255 0.5343 0.4339 121 | 0.6520 0.6136 0.4454 122 | 0.7248 0.4607 0.5123 123 | 0.6498 0.4717 0.5960 124 | 0.4806 0.4880 0.7286 125 | -0.6173 0.7753 0.1334 126 | 0.4338 0.3253 0.8403 127 | 0.2405 0.2983 0.9237 128 | 0.2661 0.1811 0.9468 129 | 0.2703 0.2162 -0.9382 130 | 0.4466 0.8881 0.1087 131 | 0.3099 0.4290 -0.8485 132 | 0.3354 0.5265 -0.7812 133 | 0.4417 0.5321 -0.7223 134 | -0.7669 -0.1000 -0.6339 135 | 0.5554 0.6141 -0.5607 136 | -0.7876 0.4996 -0.3608 137 | 0.5594 0.6906 -0.4585 138 | 0.6260 0.7356 -0.2588 139 | 0.7031 0.6952 0.1496 140 | 0.4621 -0.1997 0.8640 141 | 0.5381 0.8103 -0.2322 142 | 0.6084 0.7806 -0.1430 143 | 0.5820 0.8127 -0.0279 144 | 0.6463 0.7606 0.0617 145 | 0.5501 0.8307 0.0855 146 | 0.5624 -0.2132 0.7989 147 | 0.6640 0.7017 0.2585 148 | 0.7224 -0.6868 0.0807 149 | -0.0298 0.3762 -0.9261 150 | 0.5645 0.6711 0.4806 151 | 0.4687 0.7228 0.5077 152 | 0.6256 0.5636 0.5394 153 | 0.5548 0.5351 0.6371 154 | -0.4648 0.8330 0.3002 155 | 0.4522 0.5876 0.6709 156 | 0.3754 0.5376 0.7550 157 | 0.4077 0.4334 0.8037 158 | 0.0966 0.4429 0.8914 159 | -0.0566 -0.9558 0.2885 160 | 0.1077 0.0948 -0.9897 161 | 0.2017 0.4148 -0.8873 162 | 0.5197 0.4436 -0.7302 163 | 0.2489 0.6064 -0.7552 164 | 0.2711 0.6883 -0.6729 165 | 0.3592 0.6144 -0.7025 166 | 0.3791 0.6935 -0.6126 167 | 0.2903 0.7607 -0.5805 168 | 0.3883 0.7669 -0.5109 169 | 0.3818 0.8329 -0.4007 170 | 0.3598 0.8862 -0.2918 171 | 0.4628 0.8271 -0.3188 172 | -0.1835 0.3060 0.9342 173 | 0.4391 0.8744 -0.2065 174 | 0.5134 0.8500 -0.1180 175 | 0.4820 0.8762 -0.0044 176 | 0.4840 -0.3078 0.8191 177 | 0.1280 0.3348 0.9335 178 | 0.5120 0.8358 0.1982 179 | 0.4699 0.8258 0.3118 180 | 0.3654 0.8692 0.3332 181 | 0.4230 0.8014 0.4230 182 | 0.5220 0.6279 0.5773 183 | 0.3662 0.7653 0.5294 184 | 0.2580 0.7980 0.5447 185 | 0.3434 0.6325 0.6943 186 | 0.4017 -0.7699 0.4959 187 | 0.2640 0.5758 0.7738 188 | 0.2969 0.4765 0.8275 189 | 0.2130 0.4087 0.8875 190 | 0.1571 0.2192 0.9630 191 | 0.0338 0.1872 -0.9817 192 | 0.1778 0.3110 -0.9336 193 | 0.6041 -0.7333 -0.3119 194 | 0.1352 0.5942 -0.7929 195 | -0.5395 -0.4109 -0.7349 196 | 0.1568 0.6791 -0.7171 197 | 0.1087 -0.6415 -0.7594 198 | 0.1768 0.7534 -0.6333 199 | 0.0925 -0.5496 -0.8303 200 | 0.2947 0.8282 -0.4767 201 | -0.7825 0.1475 -0.6049 202 | 0.2749 0.8865 -0.3722 203 | 0.7211 -0.3034 -0.6228 204 | 0.3303 0.9261 -0.1825 205 | 0.3376 0.9323 0.1298 206 | 0.2606 0.9647 0.0375 207 | 0.4078 0.8857 0.2218 208 | 0.2982 0.9237 0.2406 209 | -0.2396 0.4107 -0.8797 210 | 0.8711 0.1783 -0.4575 211 | 0.2562 0.9013 0.3492 212 | 0.2108 0.8654 0.4546 213 | 0.3189 0.8386 0.4417 214 | 0.1450 0.8198 0.5540 215 | 0.7000 -0.5315 0.4770 216 | 0.3049 0.7191 0.6244 217 | 0.2295 0.6664 0.7094 218 | 0.1898 0.7478 0.6362 219 | 0.1472 0.6066 0.7813 220 | 0.0623 0.5436 0.8370 221 | 0.0763 0.1349 0.9879 222 | 0.0624 0.2954 -0.9533 223 | 0.0871 0.4001 -0.9123 224 | 0.3691 -0.8047 -0.4650 225 | -0.0480 0.7293 -0.6825 226 | -0.6396 0.7299 0.2411 227 | 0.0646 0.7522 -0.6557 228 | 0.8438 -0.4136 -0.3420 229 | 0.0872 0.8233 -0.5609 230 | 0.0781 0.8946 -0.4400 231 | 0.1588 0.9243 -0.3471 232 | 0.0424 0.9421 -0.3328 233 | 0.1262 0.9618 -0.2430 234 | 0.2466 0.9318 -0.2665 235 | 0.2133 0.9639 -0.1597 236 | 0.0913 0.9865 -0.1361 237 | 0.2965 0.9523 -0.0727 238 | -0.0677 0.9977 -0.0047 239 | 0.1780 0.9827 -0.0517 240 | 0.7488 0.0605 0.6601 241 | 0.2231 0.9636 0.1471 242 | 0.1033 0.9811 0.1636 243 | 0.1427 0.9218 0.3604 244 | 0.0997 0.8810 0.4625 245 | 0.0641 0.9612 0.2682 246 | 0.0694 0.7668 0.6382 247 | -0.0169 0.7166 0.6972 248 | 0.1103 0.6919 0.7135 249 | -0.0998 0.6557 0.7484 250 | -0.0584 0.5691 0.8202 251 | -0.0211 0.4718 0.8815 252 | 0.0124 0.3659 0.9306 253 | 0.0450 0.2541 0.9661 254 | -0.0551 0.2675 -0.9620 255 | -0.0040 0.4795 -0.8775 256 | -0.0673 0.6417 -0.7640 257 | -0.6821 0.7297 0.0471 258 | -0.1518 0.7000 -0.6979 259 | -0.0348 0.8001 -0.5989 260 | 0.6401 -0.2910 -0.7110 261 | -0.1488 0.7913 -0.5930 262 | -0.1151 0.8558 -0.5043 263 | -0.0421 0.9104 -0.4115 264 | -0.1567 0.9040 -0.3978 265 | -0.1948 0.9369 -0.2904 266 | -0.1145 0.9729 -0.2008 267 | -0.1515 0.9843 -0.0910 268 | -0.4692 0.0630 -0.8808 269 | 0.4747 0.6953 -0.5396 270 | -0.1885 0.9819 0.0205 271 | -0.1057 0.9887 0.1060 272 | 0.0169 0.9965 0.0814 273 | -0.1837 0.9266 0.3282 274 | -0.0634 0.9527 0.2971 275 | -0.1039 0.9096 0.4023 276 | -0.0142 0.8852 0.4651 277 | 0.0264 0.8309 0.5557 278 | -0.1031 0.8475 0.5207 279 | 0.2068 -0.6779 -0.7054 280 | -0.0618 0.7868 0.6141 281 | -0.1801 0.5848 0.7909 282 | -0.1393 0.4940 0.8583 283 | -0.8438 -0.4630 0.2714 284 | -0.0364 0.1688 0.9850 285 | -0.1683 0.2374 -0.9567 286 | -0.1216 0.4501 -0.8847 287 | -0.0947 0.5487 -0.8306 288 | -0.1829 0.6088 -0.7720 289 | -0.2701 0.6536 -0.7070 290 | -0.2340 0.7372 -0.6338 291 | -0.2850 0.7855 -0.5493 292 | -0.2225 0.8469 -0.4830 293 | -0.3395 0.8249 -0.4521 294 | -0.2707 0.8862 -0.3760 295 | -0.3087 0.9128 -0.2675 296 | -0.2318 0.9559 -0.1801 297 | -0.3451 0.9257 -0.1548 298 | 0.7136 0.2696 0.6466 299 | -0.2687 0.9609 -0.0675 300 | -0.3047 0.9513 0.0460 301 | -0.4148 0.9067 0.0758 302 | -0.2251 0.9653 0.1326 303 | -0.2586 0.9338 0.2473 304 | -0.3581 0.8912 0.2785 305 | -0.1636 -0.1226 0.9789 306 | -0.1991 0.8678 0.4554 307 | -0.2778 0.8831 0.3781 308 | 0.4746 0.7669 -0.4320 309 | -0.2832 0.8148 0.5058 310 | -0.1437 0.7314 0.6667 311 | 0.9489 0.1232 0.2906 312 | -0.2233 0.6642 0.7134 313 | 0.9079 -0.0710 0.4131 314 | -0.1030 0.3920 0.9142 315 | -0.2626 0.2148 0.9407 316 | -0.0787 0.1501 -0.9855 317 | -0.1468 0.3464 -0.9265 318 | -0.2126 0.5126 -0.8319 319 | -0.3017 0.5626 -0.7697 320 | 0.7844 0.6069 0.1284 321 | -0.9995 0.0320 0.0087 322 | -0.3459 0.7023 -0.6222 323 | -0.4518 0.6594 -0.6009 324 | -0.3995 0.7489 -0.5287 325 | -0.6044 0.6423 -0.4713 326 | -0.3851 0.8548 -0.3480 327 | -0.4935 0.8081 -0.3216 328 | -0.5209 0.8268 -0.2124 329 | -0.4186 0.8759 -0.2399 330 | -0.4534 0.8824 -0.1258 331 | -0.3813 0.9236 -0.0401 332 | 0.8824 0.2712 -0.3845 333 | -0.4876 0.8730 -0.0091 334 | -0.5171 0.8490 0.1084 335 | -0.3372 0.9276 0.1607 336 | -0.0030 0.8608 -0.5089 337 | -0.4804 0.7781 0.4048 338 | -0.3848 0.7901 0.4771 339 | -0.3625 0.7348 0.5733 340 | -0.9911 -0.0428 0.1264 341 | -0.2609 0.7375 0.6229 342 | -0.8758 0.0725 0.4772 343 | -0.3400 0.6627 0.6673 344 | -0.2590 0.5067 0.8223 345 | -0.2188 0.4123 0.8844 346 | -0.4272 0.0449 0.9030 347 | -0.1884 0.1246 -0.9742 348 | -0.2628 0.3033 -0.9159 349 | -0.3299 0.4643 -0.8220 350 | -0.4140 0.5157 -0.7501 351 | -0.5188 0.4615 -0.7196 352 | -0.4888 0.5637 -0.6658 353 | -0.5520 0.6068 -0.5719 354 | -0.5055 0.7006 -0.5036 355 | -0.5509 0.7323 -0.4002 356 | -0.5957 0.7486 -0.2910 357 | -0.6453 0.6707 -0.3657 358 | -0.8289 -0.0099 0.5594 359 | -0.6927 0.6750 -0.2543 360 | -0.6143 0.7677 -0.1827 361 | -0.7910 0.5591 -0.2484 362 | -0.5542 0.8269 -0.0952 363 | -0.5859 0.8100 0.0240 364 | -0.4533 -0.0577 -0.8895 365 | 0.6376 0.6041 -0.4781 366 | -0.7078 0.6893 0.1545 367 | -0.5447 0.8099 0.2176 368 | -0.5635 0.7597 0.3244 369 | -0.6487 0.6762 0.3492 370 | -0.4726 0.7186 0.5102 371 | -0.5540 0.6387 0.5340 372 | -0.3829 0.6125 -0.6916 373 | -0.4975 0.4979 0.7104 374 | -0.4209 0.5839 0.6942 375 | -0.3816 0.5073 0.7727 376 | -0.3364 0.4241 0.8408 377 | -0.2959 0.3258 0.8979 378 | 0.1060 0.0120 0.9943 379 | -0.2818 0.1905 -0.9404 380 | 0.7198 -0.5001 -0.4814 381 | -0.3544 0.3592 -0.8634 382 | -0.4612 0.3020 -0.8343 383 | -0.1872 0.7990 0.5714 384 | 0.0066 0.9744 -0.2246 385 | -0.5881 0.5058 -0.6311 386 | -0.6458 0.5454 -0.5344 387 | -0.7332 0.4808 -0.4809 388 | -0.6967 0.5739 -0.4305 389 | -0.6806 0.4421 -0.5843 390 | -0.7701 0.6184 -0.1565 391 | -0.7310 0.5983 -0.3281 392 | -0.6972 0.7015 -0.1480 393 | -0.8101 0.5847 -0.0434 394 | -0.7372 0.6743 -0.0438 395 | -0.3344 -0.1017 -0.9369 396 | -0.7666 0.6391 0.0624 397 | -0.7412 -0.5639 -0.3643 398 | -0.7217 0.6405 0.2625 399 | -0.7238 0.5834 0.3684 400 | -0.9242 0.3810 -0.0272 401 | -0.6450 0.6148 0.4538 402 | -0.6281 0.5486 0.5519 403 | 0.2056 -0.0969 -0.9738 404 | 0.6931 0.7010 -0.1678 405 | -0.5647 0.4003 0.7217 406 | -0.4563 0.4197 0.7846 407 | -0.4489 0.7844 -0.4280 408 | -0.4093 0.3354 0.8485 409 | -0.1534 0.1925 0.9692 410 | 0.9774 0.1726 -0.1217 411 | -0.3738 0.2477 -0.8938 412 | -0.5558 0.2381 -0.7965 413 | -0.4485 0.6571 0.6059 414 | -0.5422 0.3535 -0.7623 415 | -0.6160 0.4004 -0.6784 416 | -0.7147 0.2203 -0.6638 417 | -0.7610 0.3699 -0.5329 418 | -0.8039 0.4078 -0.4329 419 | -0.8970 0.2891 -0.3343 420 | -0.9045 0.3564 -0.2344 421 | -0.8549 0.3924 -0.3395 422 | -0.2367 -0.5384 -0.8088 423 | -0.8956 0.4231 -0.1376 424 | 0.4088 0.9077 -0.0944 425 | -0.8734 0.4859 -0.0326 426 | -0.8937 0.4420 0.0773 427 | -0.8359 0.5446 0.0684 428 | -0.9010 0.3919 0.1862 429 | -0.8491 0.4971 0.1785 430 | -0.8404 0.3770 0.3894 431 | -0.7924 0.5433 0.2773 432 | -0.8509 0.4406 0.2861 433 | -0.7880 0.4832 0.3816 434 | -0.7722 0.4150 0.4811 435 | -0.7451 0.3405 0.5736 436 | -0.6923 0.4484 0.5653 437 | -0.6191 0.2914 0.7292 438 | 0.7103 0.1674 0.6838 439 | 0.2117 -0.8454 0.4905 440 | 0.3399 -0.8830 0.3237 441 | -0.0055 0.0495 0.9988 442 | -0.1348 0.0302 -0.9904 443 | -0.2808 0.0672 -0.9574 444 | -0.4711 0.1843 -0.8626 445 | -0.6328 0.2882 -0.7187 446 | -0.6413 0.1710 -0.7480 447 | -0.7022 0.3322 -0.6297 448 | -0.7815 0.2631 -0.5657 449 | 0.1412 0.9884 0.0565 450 | -0.8376 0.3025 -0.4548 451 | -0.8880 0.2086 -0.4098 452 | -0.2688 -0.9286 0.2560 453 | -0.9349 0.1658 -0.3137 454 | -0.9410 0.3133 -0.1283 455 | -0.9628 0.2694 -0.0203 456 | -0.1435 -0.4813 -0.8647 457 | -0.9390 0.3339 0.0824 458 | -0.9716 0.2199 0.0875 459 | -0.9058 0.0963 -0.4125 460 | -0.9403 0.2819 0.1905 461 | -0.8970 0.3316 0.2922 462 | -0.7140 0.5188 0.4702 463 | -0.8804 0.2655 0.3930 464 | -0.8184 0.3052 0.4868 465 | -0.8528 0.1904 0.4863 466 | -0.7856 0.2265 0.5757 467 | -0.7483 -0.2219 -0.6251 468 | -0.6596 0.1761 0.7307 469 | -0.5678 0.2059 0.7970 470 | -0.4902 0.1264 0.8624 471 | -0.3696 0.2330 0.8995 472 | -0.6277 -0.7784 0.0020 473 | 0.0688 -0.9925 -0.1015 474 | -0.3692 0.0059 -0.9293 475 | -0.5520 -0.0031 -0.8338 476 | -0.7153 0.0994 -0.6917 477 | 0.0547 0.9981 -0.0277 478 | -0.7807 0.0274 -0.6243 479 | -0.8422 0.1859 -0.5060 480 | -0.8438 0.0767 -0.5312 481 | -0.9700 -0.1392 0.1994 482 | 0.0243 0.9292 0.3687 483 | 0.3428 0.1021 -0.9338 484 | -0.9698 0.1217 -0.2112 485 | -0.9796 0.0023 -0.2008 486 | -0.9726 0.1985 -0.1212 487 | -0.9426 0.2438 -0.2284 488 | -0.9881 0.1531 -0.0128 489 | -0.9906 0.0993 0.0943 490 | -0.9668 0.1671 0.1932 491 | -0.9525 0.0954 0.2891 492 | 0.1838 0.9493 0.2551 493 | -0.0779 0.9482 -0.3079 494 | -0.9266 0.0310 0.3748 495 | -0.8141 0.1087 0.5705 496 | -0.7419 0.1432 0.6551 497 | -0.6837 0.0592 0.7274 498 | -0.5944 0.0936 0.7987 499 | -0.5288 0.0106 0.8487 500 | 0.1947 0.8177 -0.5418 501 | -0.1203 0.0842 0.9892 502 | -0.2392 -0.0348 -0.9703 503 | -0.5331 -0.1214 -0.8373 504 | -0.6274 -0.0729 -0.7752 505 | -0.7094 -0.0238 -0.7044 506 | -0.2971 -0.8401 0.4539 507 | -0.6603 0.3729 0.6519 508 | -0.8314 -0.0490 -0.5535 509 | -0.8868 -0.0000 -0.4622 510 | -0.8782 -0.1168 -0.4637 511 | 0.2250 0.5151 -0.8271 512 | -0.9284 -0.0423 -0.3691 513 | -0.9590 -0.0857 -0.2702 514 | -0.9849 -0.1664 -0.0485 515 | -0.9949 -0.0415 -0.0921 516 | -0.9967 -0.0784 0.0190 517 | 0.9727 0.2020 0.1144 518 | -0.9371 -0.1745 0.3022 519 | -0.9805 0.0459 0.1910 520 | -0.9204 -0.2783 0.2745 521 | -0.9306 -0.0793 0.3573 522 | -0.9648 -0.0392 0.2600 523 | -0.8851 -0.0446 0.4633 524 | -0.8366 -0.1300 0.5322 525 | -0.7741 -0.0963 0.6257 526 | -0.7063 -0.1805 0.6845 527 | -0.7017 -0.0616 0.7098 528 | -0.6282 -0.1448 0.7645 529 | -0.6198 -0.0262 0.7843 530 | -0.3585 0.1286 0.9247 531 | -0.3286 0.0095 0.9444 532 | 0.8513 -0.5228 -0.0450 533 | -0.4221 -0.1687 -0.8907 534 | -0.5033 -0.2328 -0.8322 535 | -0.6043 -0.1916 -0.7734 536 | -0.6916 -0.1479 -0.7070 537 | -0.6676 -0.2657 -0.6955 538 | -0.8182 -0.1718 -0.5486 539 | -0.7756 -0.6312 0.0074 540 | -0.6004 0.4779 0.6413 541 | -0.8319 -0.3501 -0.4305 542 | -0.3776 0.8432 0.3827 543 | -0.8932 -0.2817 -0.3505 544 | -0.9782 -0.1271 -0.1639 545 | -0.9244 -0.3568 -0.1348 546 | -0.9602 -0.2740 -0.0540 547 | -0.9615 -0.2691 0.0556 548 | -0.9266 -0.3759 -0.0130 549 | -0.9027 -0.3726 0.2154 550 | 0.2015 -0.9477 -0.2474 551 | 0.1105 -0.9386 -0.3268 552 | -0.8668 -0.3693 0.3352 553 | -0.8844 -0.2638 0.3851 554 | -0.8896 -0.1607 0.4275 555 | -0.8336 -0.2439 0.4956 556 | 0.5379 -0.1063 0.8363 557 | -0.7747 -0.2142 0.5950 558 | -0.7018 -0.2963 0.6478 559 | -0.6280 -0.2618 0.7329 560 | -0.4426 -0.0642 0.8944 561 | 0.6113 0.7722 0.1734 562 | -0.1982 0.0016 0.9802 563 | -0.1339 -0.0907 -0.9868 564 | -0.3793 0.1278 -0.9164 565 | -0.1804 -0.8800 0.4394 566 | -0.5759 -0.3033 -0.7592 567 | 0.7352 0.2167 -0.6424 568 | -0.6361 -0.3771 -0.6732 569 | -0.7958 -0.2903 -0.5314 570 | -0.7210 -0.3377 -0.6051 571 | -0.9307 0.2172 0.2944 572 | -0.7612 -0.4045 -0.5069 573 | -0.8583 -0.3969 -0.3252 574 | -0.9143 -0.3224 -0.2452 575 | -0.8131 -0.5043 -0.2908 576 | -0.8751 -0.4339 -0.2143 577 | -0.8841 -0.4579 -0.0937 578 | -0.8714 -0.4668 0.1507 579 | -0.3026 0.5880 0.7501 580 | -0.7077 -0.7044 -0.0539 581 | -0.3130 -0.2184 -0.9243 582 | -0.8266 -0.5567 0.0824 583 | -0.7736 -0.5440 0.3250 584 | -0.8018 -0.4522 0.3907 585 | -0.6672 -0.5077 0.5451 586 | -0.8229 -0.3505 0.4473 587 | -0.7503 -0.4324 0.5001 588 | -0.7666 -0.3271 0.5525 589 | -0.6882 -0.4058 0.6014 590 | -0.6170 -0.3734 0.6928 591 | -0.5370 -0.3379 0.7730 592 | -0.5454 -0.2249 0.8074 593 | -0.3614 -0.1311 0.9231 594 | 0.1862 0.0975 0.9777 595 | 0.8099 -0.5151 -0.2805 596 | -0.2807 -0.3295 -0.9015 597 | -0.4734 -0.3426 -0.8115 598 | -0.3602 -0.3954 -0.8449 599 | -0.4335 -0.4484 -0.7816 600 | -0.5851 -0.4816 -0.6524 601 | -0.6810 -0.4477 -0.5795 602 | -0.6209 -0.5448 -0.5637 603 | -0.7157 -0.5108 -0.4762 604 | -0.7912 -0.4614 -0.4015 605 | -0.6655 -0.6451 -0.3753 606 | -0.7621 -0.5995 -0.2445 607 | -0.8287 -0.5328 -0.1714 608 | -0.7750 -0.6207 -0.1193 609 | -0.8350 -0.5484 -0.0452 610 | -0.8828 -0.4686 0.0328 611 | -0.7045 -0.7067 0.0651 612 | -0.8401 0.5232 -0.1429 613 | -0.8082 -0.5522 0.2048 614 | -0.7595 -0.6360 0.1368 615 | -0.7332 -0.6300 0.2561 616 | -0.7251 -0.5308 0.4387 617 | -0.6918 -0.6209 0.3687 618 | -0.6386 -0.6019 0.4795 619 | 0.1816 0.5116 0.8398 620 | -0.5742 -0.5752 0.5825 621 | -0.5987 -0.4782 0.6425 622 | -0.4409 0.8767 0.1926 623 | -0.4493 -0.2979 0.8423 624 | -0.3440 -0.3610 0.8668 625 | -0.4554 -0.1837 0.8711 626 | 0.7060 0.6205 0.3414 627 | -0.6464 0.7605 -0.0609 628 | -0.4609 -0.8136 0.3545 629 | -0.3483 -0.5175 -0.7816 630 | -0.4801 -0.5154 -0.7098 631 | 0.3855 -0.7280 -0.5670 632 | -0.4433 -0.6686 -0.5970 633 | -0.5190 -0.5817 -0.6263 634 | -0.5484 -0.6422 -0.5355 635 | -0.5706 -0.6948 -0.4377 636 | -0.5131 -0.8117 -0.2790 637 | -0.5910 -0.7350 -0.3325 638 | -0.6851 -0.6748 -0.2745 639 | -0.6104 -0.7600 -0.2233 640 | -0.6443 -0.7063 0.2932 641 | -0.7009 -0.6934 -0.1673 642 | -0.5393 -0.8408 -0.0467 643 | -0.6223 -0.7738 0.1186 644 | -0.5425 -0.8367 0.0749 645 | 0.7420 -0.5628 0.3643 646 | -0.6775 -0.7108 0.1891 647 | -0.5568 -0.7671 0.3186 648 | -0.5666 0.7014 0.4324 649 | -0.8503 0.4630 -0.2501 650 | -0.5432 -0.6640 0.5138 651 | -0.4163 -0.5091 0.7533 652 | -0.3917 -0.6049 0.6933 653 | -0.3268 -0.4665 0.8219 654 | -0.2322 -0.4163 0.8791 655 | -0.3562 -0.2496 0.9005 656 | -0.2583 -0.1983 0.9455 657 | -0.0369 -0.0324 -0.9988 658 | -0.1693 -0.3769 -0.9106 659 | -0.2599 -0.4420 -0.8585 660 | -0.4085 -0.5972 -0.6903 661 | -0.3053 -0.6128 -0.7289 662 | -0.3658 -0.7533 -0.5466 663 | -0.9087 0.1493 0.3898 664 | -0.4702 -0.7288 -0.4977 665 | -0.3903 -0.8069 -0.4434 666 | 0.7702 -0.5864 0.2510 667 | -0.4928 -0.7773 -0.3912 668 | -0.4120 -0.8481 -0.3331 669 | -0.5297 -0.8322 -0.1641 670 | -0.4403 0.4121 -0.7977 671 | -0.4436 -0.8906 -0.1009 672 | -0.5405 -0.1069 0.8345 673 | -0.4518 -0.8919 0.0188 674 | -0.4301 -0.8760 -0.2182 675 | -0.4708 -0.8469 0.2473 676 | -0.3706 -0.9051 0.2085 677 | -0.3700 -0.8702 0.3252 678 | -0.5663 -0.7973 0.2086 679 | -0.5071 -0.7436 0.4359 680 | 0.7099 -0.6764 0.1961 681 | -0.4382 -0.7243 0.5323 682 | -0.4713 -0.6390 0.6079 683 | -0.3625 -0.6928 0.6234 684 | -0.2775 -0.6581 0.6999 685 | -0.3046 -0.5659 0.7661 686 | -0.2131 -0.5183 0.8282 687 | -0.2473 -0.3094 0.9182 688 | -0.0222 0.9815 0.1900 689 | -0.0758 -0.3089 -0.9481 690 | 0.5416 0.5314 -0.6514 691 | -0.9916 0.0770 -0.1040 692 | -0.1140 -0.5796 -0.8069 693 | -0.1952 -0.6296 -0.7520 694 | -0.2553 -0.7698 -0.5850 695 | 0.1120 0.5000 -0.8588 696 | -0.1665 -0.8309 -0.5310 697 | -0.2817 -0.8264 -0.4875 698 | -0.2164 -0.9231 -0.3178 699 | -0.3056 -0.8724 -0.3815 700 | -0.3258 -0.9064 -0.2689 701 | -0.1397 -0.9814 -0.1314 702 | -0.3417 -0.9274 -0.1519 703 | 0.3688 -0.9256 0.0851 704 | -0.3534 -0.9349 -0.0320 705 | -0.7076 0.2605 0.6568 706 | -0.2484 -0.9649 -0.0853 707 | -0.2651 -0.9531 0.1462 708 | -0.3643 -0.9269 0.0900 709 | -0.2692 -0.8925 0.3620 710 | -0.3948 -0.2837 -0.8738 711 | -0.9503 0.0483 -0.3074 712 | -0.3290 -0.7715 0.5445 713 | -0.2137 -0.8165 0.5362 714 | -0.2461 -0.7419 0.6237 715 | 0.9062 0.1385 0.3996 716 | -0.1889 -0.6144 0.7661 717 | -0.0981 -0.5588 0.8235 718 | -0.1183 -0.4584 0.8808 719 | -0.1353 -0.3521 0.9261 720 | 0.0475 -0.3508 -0.9352 721 | -0.0508 -0.4132 -0.9092 722 | -0.0245 -0.5115 -0.8589 723 | -0.9516 -0.2559 0.1704 724 | -0.1051 -0.6875 -0.7185 725 | -0.2257 -0.7038 -0.6736 726 | -0.1380 -0.7662 -0.6276 727 | -0.0767 -0.8832 -0.4627 728 | 0.0175 -0.9175 -0.3974 729 | -0.1933 -0.8830 -0.4278 730 | -0.1029 -0.9276 -0.3592 731 | -0.0098 -0.9567 -0.2909 732 | -0.0292 -0.9840 -0.1756 733 | 0.8777 -0.0262 -0.4785 734 | -0.2347 -0.9507 -0.2029 735 | -0.1501 -0.9886 -0.0139 736 | 0.1662 -0.8336 -0.5267 737 | -0.0405 -0.9975 -0.0578 738 | -0.0508 -0.9834 0.1740 739 | 0.0519 -0.9679 0.2459 740 | -0.1557 -0.9826 0.1017 741 | 0.0371 -0.9317 0.3613 742 | -0.0723 -0.9124 0.4028 743 | 0.0139 -0.8808 0.4734 744 | -0.0967 -0.8531 0.5127 745 | -0.0126 -0.8151 0.5792 746 | -0.1289 -0.7833 0.6082 747 | -0.0434 -0.7389 0.6724 748 | -0.0726 -0.6528 0.7541 749 | 0.0163 -0.5916 0.8061 750 | -0.0223 -0.3890 0.9209 751 | -0.0388 -0.2781 0.9598 752 | -0.0018 -0.1375 -0.9905 753 | -0.0077 -0.6069 -0.7947 754 | 0.0061 -0.6891 -0.7246 755 | -0.0237 -0.7624 -0.6466 756 | -0.0498 -0.8280 -0.5586 757 | 0.0725 -0.8041 -0.5900 758 | 0.0220 0.5772 -0.8163 759 | -0.1002 -0.1994 -0.9748 760 | 0.0457 -0.8667 -0.4967 761 | 0.1397 -0.8925 -0.4288 762 | 0.2301 -0.9080 -0.3500 763 | 0.0824 -0.9724 -0.2184 764 | 0.1784 -0.9732 -0.1449 765 | 0.0652 -0.9978 0.0141 766 | -0.1635 -0.9306 0.3275 767 | 0.1691 -0.9823 0.0811 768 | 0.0590 -0.9898 0.1300 769 | 0.1603 -0.9671 0.1976 770 | -0.8609 -0.2341 -0.4517 771 | 0.1467 -0.9377 0.3149 772 | 0.1258 -0.8945 0.4290 773 | -0.5201 0.3190 0.7923 774 | 0.0987 -0.8378 0.5370 775 | 0.1813 -0.7840 0.5937 776 | 0.0708 -0.7659 0.6390 777 | 0.1533 -0.7060 0.6914 778 | 0.0418 -0.6832 0.7290 779 | -0.0040 -0.4935 0.8697 780 | 0.1100 -0.5226 0.8455 781 | -0.0854 -0.0362 0.9957 782 | -0.9573 -0.2404 -0.1603 783 | 0.0732 -0.4517 -0.8892 784 | 0.1894 -0.4854 -0.8535 785 | 0.2057 -0.5827 -0.7862 786 | 0.1020 -0.7311 -0.6746 787 | 0.1950 -0.7634 -0.6158 788 | 0.2848 -0.7876 -0.5464 789 | 0.9667 -0.2206 0.1300 790 | 0.2556 -0.8537 -0.4537 791 | 0.3069 -0.9196 -0.2455 792 | -0.4356 -0.4065 0.8032 793 | -0.9165 -0.1621 -0.3658 794 | 0.2811 -0.9530 -0.1128 795 | 0.2758 -0.9611 0.0160 796 | -0.9243 -0.3671 0.1047 797 | 0.1762 -0.9838 -0.0338 798 | 0.2670 -0.9536 0.1392 799 | 0.2534 -0.9316 0.2604 800 | 0.3572 -0.9113 0.2049 801 | 0.2336 -0.2057 -0.9503 802 | -0.0703 0.2818 0.9569 803 | 0.2356 -0.8949 0.3791 804 | 0.3205 -0.8390 0.4397 805 | 0.2950 -0.7839 0.5463 806 | 0.6090 0.3156 0.7276 807 | 0.2617 -0.7197 0.6431 808 | 0.2373 -0.6364 0.7340 809 | 0.3336 -0.5625 0.7565 810 | 0.1285 -0.6175 0.7760 811 | 0.0913 -0.4211 0.9024 812 | -0.9823 -0.1656 0.0874 813 | 0.1409 -0.2755 -0.9509 814 | 0.1674 -0.3825 -0.9087 815 | 0.2825 -0.4170 -0.8639 816 | 0.3002 -0.5178 -0.8011 817 | 0.3053 -0.6157 -0.7264 818 | 0.4160 0.4393 -0.7962 819 | 0.3978 -0.6410 -0.6564 820 | 0.4836 -0.6581 -0.5771 821 | 0.3357 -0.8673 -0.3675 822 | 0.4483 -0.8108 -0.3764 823 | 0.3766 -0.9131 -0.1564 824 | 0.5231 -0.8049 -0.2802 825 | 0.4717 -0.8599 -0.1952 826 | 0.4709 -0.8785 -0.0807 827 | 0.5626 -0.8263 -0.0268 828 | 0.4680 -0.8831 0.0342 829 | -0.2701 -0.0820 0.9593 830 | 0.6463 -0.7581 -0.0868 831 | 0.4592 -0.8755 0.1505 832 | 0.9705 0.0071 0.2409 833 | 0.4429 -0.8560 0.2666 834 | 0.4218 -0.8223 0.3820 835 | 0.6836 -0.0874 -0.7246 836 | 0.5943 -0.7131 0.3719 837 | 0.4158 0.6789 0.6051 838 | 0.4723 -0.6849 0.5548 839 | 0.3433 -0.6455 0.6823 840 | 0.4402 -0.6000 0.6679 841 | -0.4640 -0.8747 0.1404 842 | 0.2225 -0.5455 0.8080 843 | 0.1846 -0.3431 0.9210 844 | 0.0725 -0.3126 0.9471 845 | 0.1134 -0.1624 -0.9802 846 | 0.2599 -0.3125 -0.9137 847 | 0.3893 -0.4438 -0.8072 848 | 0.3995 -0.5460 -0.7364 849 | 0.4907 -0.5678 -0.6610 850 | 0.5750 -0.5816 -0.5754 851 | 0.5633 -0.6654 -0.4898 852 | 0.4649 -0.7401 -0.4860 853 | 0.6381 -0.6607 -0.3954 854 | 0.5379 -0.7421 -0.4001 855 | 0.6284 -0.7501 -0.2060 856 | -0.0006 0.0683 -0.9977 857 | 0.5603 -0.8152 -0.1468 858 | 0.7129 -0.6832 -0.1581 859 | 0.7250 -0.6877 -0.0371 860 | 0.5569 -0.8256 0.0907 861 | 0.6465 -0.7623 0.0301 862 | -0.6025 -0.6878 0.4049 863 | 0.6377 -0.7564 0.1456 864 | 0.5437 -0.8134 0.2069 865 | 0.5226 -0.7896 0.3217 866 | 0.6883 -0.6565 0.3087 867 | 0.4963 -0.7508 0.4358 868 | 0.5605 -0.6724 0.4834 869 | 0.6172 -0.5855 0.5256 870 | 0.5299 -0.5994 0.5999 871 | 0.4262 -0.5026 0.7521 872 | 0.3171 -0.4712 0.8230 873 | 0.2960 -0.3699 0.8806 874 | 0.3254 0.3706 0.8700 875 | 0.2734 -0.2613 0.9257 876 | 0.0227 -0.2456 -0.9691 877 | 0.3466 -0.2298 -0.9094 878 | 0.3707 -0.3385 -0.8648 879 | 0.4852 -0.4675 -0.7389 880 | 0.5656 -0.3816 -0.7310 881 | 0.5722 -0.4854 -0.6611 882 | 0.6507 -0.4961 -0.5748 883 | -0.6469 -0.5997 -0.4710 884 | 0.6536 -0.5861 -0.4788 885 | 0.7227 -0.5897 -0.3604 886 | 0.6922 -0.6657 -0.2786 887 | 0.5536 0.7568 -0.3475 888 | 0.7668 -0.6005 -0.2270 889 | -0.3374 -0.6887 -0.6418 890 | 0.7870 -0.6081 -0.1043 891 | 0.7939 -0.6078 0.0170 892 | 0.8520 -0.5182 0.0741 893 | -0.0560 -0.1604 0.9855 894 | 0.6203 -0.7401 0.2597 895 | -0.5210 -0.4451 0.7283 896 | -0.3986 -0.8014 0.4459 897 | -0.6233 -0.7740 -0.1118 898 | 0.6569 -0.6272 0.4184 899 | 0.6161 -0.5079 0.6020 900 | 0.8124 -0.0097 -0.5830 901 | 0.8995 -0.3259 -0.2910 902 | 0.5899 -0.4194 0.6900 903 | 0.4033 -0.3977 0.8241 904 | 0.3820 -0.2891 0.8778 905 | 0.3559 -0.1772 0.9176 906 | 0.0528 -0.1969 0.9790 907 | 0.3185 -0.1174 -0.9406 908 | 0.4526 -0.2528 -0.8551 909 | 0.4730 -0.3616 -0.8034 910 | 0.7257 -0.4040 -0.5570 911 | 0.5507 -0.2732 -0.7887 912 | 0.6498 -0.3962 -0.6487 913 | -0.5597 0.1185 -0.8202 914 | 0.8513 -0.2198 -0.4765 915 | 0.5208 -0.5129 0.6824 916 | 0.7924 -0.4048 -0.4563 917 | 0.0445 0.6696 -0.7414 918 | 0.7757 -0.4992 -0.3861 919 | 0.8755 -0.4266 -0.2268 920 | -0.1600 -0.7031 0.6929 921 | 0.8962 -0.4305 -0.1073 922 | 0.8379 -0.5206 -0.1639 923 | 0.9033 -0.4288 0.0128 924 | 0.3760 -0.7087 0.5969 925 | 0.8979 -0.4199 0.1319 926 | 0.8503 -0.3829 0.3610 927 | 0.8178 -0.4883 0.3046 928 | 0.5998 0.0042 0.8001 929 | 0.7826 -0.4640 0.4151 930 | 0.7314 -0.4393 0.5217 931 | 0.7479 -0.3310 0.5753 932 | 0.6734 -0.4159 0.6112 933 | 0.6680 -0.3180 0.6728 934 | 0.5797 -0.3178 0.7503 935 | 0.4998 -0.4132 0.7612 936 | -0.5288 0.5726 0.6265 937 | 0.4338 -0.0891 0.8966 938 | 0.2458 -0.1465 0.9582 939 | 0.0798 -0.0428 -0.9959 940 | 0.4256 -0.1407 -0.8939 941 | 0.9894 -0.1356 -0.0516 942 | 0.3743 0.9271 0.0177 943 | 0.6213 -0.1816 -0.7622 944 | 0.7071 -0.1975 -0.6790 945 | 0.7839 -0.2094 -0.5845 946 | 0.7935 -0.3097 -0.5239 947 | 0.8974 -0.1292 -0.4220 948 | 0.9054 -0.2280 -0.3581 949 | 0.8548 -0.3171 -0.4108 950 | 0.9433 -0.2341 -0.2352 951 | 0.9269 -0.3341 -0.1711 952 | 0.9649 -0.2374 -0.1122 953 | 0.8805 -0.4041 0.2479 954 | 0.9725 -0.2328 0.0104 955 | 0.9411 -0.3345 -0.0494 956 | 0.9899 -0.1241 0.0687 957 | 0.9419 -0.3281 0.0716 958 | 0.4439 0.0755 -0.8929 959 | 0.9302 -0.3143 0.1898 960 | -0.2588 -0.9654 0.0323 961 | 0.9053 -0.2956 0.3051 962 | 0.8057 -0.3593 0.4710 963 | 0.8132 -0.2509 0.5251 964 | 0.7396 -0.2305 0.6324 965 | 0.7213 -0.1275 0.6807 966 | 0.6542 -0.2159 0.7249 967 | -0.7617 0.0246 0.6475 968 | 0.5081 0.0016 0.8613 969 | 0.9005 0.3921 -0.1881 970 | 0.2894 -0.0006 -0.9572 971 | 0.3935 -0.0238 -0.9190 972 | 0.4940 -0.0464 -0.8682 973 | 0.5929 -0.0697 -0.8023 974 | 0.7363 0.0076 -0.6766 975 | 0.7649 -0.1030 -0.6358 976 | 0.8366 -0.1180 -0.5349 977 | 0.7713 0.4042 -0.4916 978 | 0.8043 0.3558 0.4760 979 | -0.1240 -0.9609 -0.2477 980 | 0.9440 -0.1359 -0.3007 981 | 0.9701 -0.0408 -0.2393 982 | 0.9747 -0.1385 -0.1756 983 | 0.9928 -0.0379 -0.1140 984 | 0.9996 -0.0261 0.0061 985 | 0.9957 0.0727 -0.0575 986 | -0.1601 -0.9633 0.2154 987 | 0.9919 -0.0126 0.1261 988 | 0.9762 -0.1091 0.1874 989 | 0.9473 -0.2038 0.2472 990 | 0.9144 -0.1837 0.3607 991 | 0.9491 -0.0894 0.3019 992 | 0.8665 -0.2742 0.4171 993 | 0.8670 -0.1637 0.4707 994 | 0.8020 -0.1479 0.5787 995 | 0.8877 0.3550 -0.2931 996 | 0.6933 -0.0221 0.7203 997 | 0.6313 -0.1092 0.7678 998 | -0.0455 -0.9973 0.0585 999 | 0.3250 -0.0616 0.9437 1000 | 0.1355 -0.1114 0.9845 -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | import sys 4 | import kdtree 5 | import utils 6 | import wls 7 | import regularization 8 | 9 | file_path = "./Pics/city_input.png" 10 | filter_size = 15 11 | # 修正参数, 每个簇都应该有一个,初始化为随机数,根据启发式算法调节 12 | p = 0 13 | 14 | 15 | def non_local_transmission(img, air, gamma=1): 16 | # find airlight first (same method with DCP) 17 | img_hazy_corrected = np.power(img, gamma) 18 | 19 | # img = img / 255 20 | dist_from_airlight = utils.getDistAirlight(img_hazy_corrected, air) 21 | 22 | row, col, n_colors = img.shape 23 | 24 | # Calculate radius(Eq.(5)) 25 | # 3 - dimentional 26 | radius = np.sqrt(np.sum(dist_from_airlight ** 2, axis=2)) 27 | 28 | # Cluster the pixels to haze-lines 29 | # Use a KD-tree impementation for fast clustering according to their angles 30 | dist_sphere_radius = np.reshape(radius, [col * row], order='F') 31 | 32 | # 3-di To 2-di (col*row, 3) 33 | dist_unit_radius = np.reshape(dist_from_airlight, [col * row, n_colors], order='F') 34 | 35 | dist_norm = np.sqrt(np.sum(dist_unit_radius ** 2, axis=1)) 36 | 37 | for i in range(len(dist_unit_radius)): 38 | dist_unit_radius[i] = dist_unit_radius[i] / dist_norm[i] 39 | 40 | n_points = 1000 41 | 42 | file_path = "./TR" + str(n_points) + ".txt" 43 | points = np.loadtxt(file_path).tolist() 44 | 45 | mdl = kdtree.create(points) 46 | # lines stores cluster result 47 | # [(, 0.003957329357625813)] 48 | # cluster node from points distance 49 | cluster = [[]] * n_points 50 | for i in range(n_points): 51 | cluster[i] = [] 52 | # save pixel cluster to which point (save index) 53 | cluster_Points = np.zeros(row * col, dtype=np.int) 54 | 55 | for r in range(len(dist_unit_radius)): 56 | kdNode = mdl.search_knn(dist_unit_radius[r], 1) 57 | findPosition(kdNode[0][0].data, dist_sphere_radius[r], cluster, points, r, cluster_Points) 58 | 59 | # how to use the data in kdNode 60 | # print(lines[0][0][0].data[0]) 61 | 62 | # Estimating Initial Transmission 63 | # Estimate radius as the maximal radius in each haze-line (Eq. (11)) 64 | maxRadius = np.zeros(row * col, dtype=np.float) 65 | for i in range(n_points): 66 | # find max radius 67 | maxR = 0 68 | for j in range(len(cluster[i])): 69 | maxR = max(maxR, cluster[i][j]) 70 | maxRadius[i] = maxR 71 | np.reshape(maxRadius, [row, col], order='F') 72 | 73 | # Initial Transmission 74 | # save maxRadius to all pixels 75 | dist_sphere_maxRadius = np.zeros(row * col, np.float) 76 | for i in range(row * col): 77 | index = cluster_Points[i] 78 | dist_sphere_maxRadius[i] = maxRadius[index] 79 | radius_new = np.reshape(dist_sphere_maxRadius, [row, col], order='F') 80 | 81 | transmission_estimation = radius / (radius_new + p) 82 | 83 | # Limit the transmission to the range [trans_min, 1] for numerical stability 84 | trans_min = 0.1 85 | 86 | transmission_estimation = np.minimum(np.maximum(transmission_estimation, trans_min), 1) 87 | 88 | transmission = regularization.regularization(row, col, transmission_estimation, img_hazy_corrected, n_points, air, 89 | cluster_Points, cluster) 90 | return transmission 91 | 92 | # cluster into 1000length arr 93 | def findPosition(kdNode, radius, cluster, points, r, cluster_Points): 94 | for i in range(len(points)): 95 | if (points[i][0] == kdNode[0]) and (points[i][1] == kdNode[1]) and (points[i][2] == kdNode[2]): 96 | cluster[i].append(radius) 97 | cluster_Points[r] = i 98 | break 99 | 100 | 101 | def dehaze(img, img_norm, transmission_estimission, air): 102 | h, w, n_colors = img.shape 103 | img_dehazed = np.zeros((h, w, n_colors), dtype=float) 104 | leave_haze = 1.06 105 | for color_idx in range(3): 106 | img_dehazed[:, :, color_idx] = (img_norm[:, :, color_idx] - (1 - leave_haze * transmission_estimission) * air[ 107 | color_idx]) / np.maximum(transmission_estimission, 0.1) 108 | 109 | img_dehazed = np.where(img_dehazed > 1, 1, img_dehazed) 110 | img_dehazed = np.where(img_dehazed < 0, 0, img_dehazed) 111 | img_dehazed = np.power(img_dehazed, 1 / 1) 112 | adj_percent = [0.005, 0.995] 113 | 114 | # img_dehazed = adjust(img_dehazed, adj_percent) 115 | # img_dehazed = (img_dehazed * 255).astype(np.uint8) 116 | # print(img_dehazed) 117 | return img_dehazed 118 | 119 | 120 | def main(): 121 | img = cv2.imread(file_path) 122 | cv2.imshow("input_image", img) 123 | img_norm = cv2.normalize(img.astype('float'), None, 0.0, 1.0, 124 | cv2.NORM_MINMAX) # Convert to normalized floating point 125 | dark = utils.dark_channel(img, filter_size) 126 | air = utils.air_light(img, dark) 127 | air = air[0] / 255 128 | 129 | # Non-Local transmission 130 | transmission_estimission = non_local_transmission(img_norm, air) 131 | 132 | clear_img = dehaze(img, img_norm, transmission_estimission, air) 133 | 134 | cv2.imshow("result", clear_img) 135 | cv2.imshow("non-local transmission", transmission_estimission) 136 | 137 | 138 | if __name__ == '__main__': 139 | np.set_printoptions(precision=4) 140 | np.set_printoptions(suppress=True) 141 | np.set_printoptions(threshold=np.inf) 142 | sys.setrecursionlimit(100000) 143 | main() 144 | cv2.waitKey(0) 145 | -------------------------------------------------------------------------------- /regularization.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import wls 3 | 4 | 5 | def regularization(row, col, transmission_estimation, img_hazy_corrected, n_points, air, cluster_Points, cluster): 6 | # Regularization 7 | # Apply lower bound from the image (Eqs. (13-14) 8 | trans_lower_bound = np.zeros([row, col], dtype=float) 9 | 10 | for i in range(row): 11 | for j in range(col): 12 | m = min(img_hazy_corrected[i][j][0] / air[0], img_hazy_corrected[i][j][1] / air[1], 13 | img_hazy_corrected[i][j][2] / air[2]) 14 | trans_lower_bound[i][j] = 1 - m 15 | 16 | transmission_estimation = np.maximum(transmission_estimation, trans_lower_bound) 17 | 18 | # Solve optimization problem (Eq. (15)) 19 | # find bin counts for reliability - small bins (#pixels<50) do not comply with 20 | # the model assumptions and should be disregarded 21 | bin_count = np.zeros(n_points, int) 22 | for index in cluster_Points: 23 | bin_count[index] += 1 24 | 25 | bin_count_map = np.zeros((row, col), np.int) 26 | radius_std = np.zeros((row, col), np.float) 27 | 28 | K_std = np.zeros(n_points, np.float) 29 | for i in range(n_points): 30 | if len(cluster[i]) > 0: 31 | K_std[i] = np.std(cluster[i]) 32 | 33 | for i in range(row * col): 34 | index = cluster_Points[i] 35 | bin_count_map[int(i / col)][int(i % col)] = bin_count[index] 36 | radius_std[int(i / col)][int(i % col)] = K_std[index] 37 | 38 | max_radius_std = np.max(radius_std) 39 | temp = radius_std / max_radius_std - 0.1 40 | temp = np.where(temp > 0.001, temp, 0.001) * 3 41 | 42 | radius_reliability = np.where(temp > 1, 1, temp) 43 | 44 | temp2 = np.where(bin_count_map > 1, 1, bin_count_map / 50) 45 | 46 | data_term_weight = temp2 * radius_reliability 47 | lambd = 0.1 48 | 49 | trans = np.reshape(transmission_estimation, (row, col), order='F') 50 | 51 | transmission = wls.wls_filter(trans, data_term_weight, img_hazy_corrected.astype(np.float32), lambd) 52 | 53 | return transmission 54 | -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | import math 4 | 5 | # calculate r g b value - air.(r/g/b) respectivly 6 | # and save them in an array named rectangle 7 | # It means a rectangle coordinate system which airlight as the original point 8 | def getDistAirlight(img, air): 9 | row, col, n_colors = img.shape 10 | 11 | dist_from_airlight = np.zeros((row, col, n_colors), dtype=np.float) 12 | for color in range(n_colors): 13 | dist_from_airlight[:, :, color] = img[:, :, color] - air[color] 14 | 15 | return dist_from_airlight 16 | 17 | 18 | def dark_channel(im, sz): 19 | b, g, r = cv2.split(im) 20 | dc = cv2.min(cv2.min(r, g), b) 21 | kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (sz, sz)) 22 | dark = cv2.erode(dc, kernel) 23 | return dark 24 | 25 | 26 | def air_light(im, dark): 27 | [h, w] = im.shape[:2] 28 | image_size = h * w 29 | numpx = int(max(math.floor(image_size / 1000), 1)) 30 | darkvec = dark.reshape(image_size, 1) 31 | imvec = im.reshape(image_size, 3) 32 | 33 | indices = darkvec.argsort() 34 | indices = indices[image_size - numpx::] 35 | 36 | atmsum = np.zeros([1, 3]) 37 | for ind in range(1, numpx): 38 | atmsum = atmsum + imvec[indices[ind]] 39 | 40 | A = atmsum / numpx 41 | return A 42 | -------------------------------------------------------------------------------- /wls.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | import scipy.sparse as sparse 4 | from scipy.sparse.linalg import spsolve 5 | 6 | def wls_filter(in_, data_term_weight, guidance, lambda_=0.05, small_num=0.00001): 7 | h, w, _ = guidance.shape 8 | k = h * w 9 | 10 | guidance = cv2.cvtColor(guidance, cv2.COLOR_RGB2GRAY).tolist() 11 | 12 | # Compute affinities between adjacent pixels based on gradients of guidance 13 | dy = np.diff(guidance, axis=0) 14 | dy = - lambda_ / (np.abs(dy) ** 2 + small_num) 15 | dy = np.pad(dy, ([0, 1], [0, 0]), 'constant', constant_values=0) 16 | dy = dy.flatten('F').T 17 | 18 | dx = np.diff(guidance, axis=1) 19 | dx = -lambda_ / (np.abs(dx) ** 2 + small_num) 20 | dx = np.pad(dx, ([0, 0], [0, 1]), 'constant', constant_values=0) 21 | dx = dx.flatten(order='F').T 22 | 23 | B = np.vstack((dx, dy)) 24 | d = [-h, -1] 25 | tmp = sparse.spdiags(B, d, k, k) 26 | # row vector 27 | ea = dx 28 | temp = [dx] 29 | we = np.pad(temp, ([0, 0], [h, 0]))[0] 30 | we = we[0:len(we) - h] 31 | 32 | # row vector 33 | so = dy 34 | temp = [dy] 35 | no = np.pad(temp, ([0, 0], [1, 0]))[0] 36 | no = no[0:len(no) - 1] 37 | 38 | # row vector 39 | D = -(ea + we + so + no) 40 | Asmoothness = tmp + tmp.T + sparse.spdiags(D, 0, k, k) 41 | # Normalize data weight 42 | data_weight = data_term_weight - np.min(data_term_weight) 43 | 44 | data_weight = data_weight / (np.max(data_weight) + small_num) 45 | 46 | # Make sure we have a boundary condition for the top line: 47 | # It will be the minimum of the transmission in each column 48 | # With reliability 0.8 49 | reliability_mask = np.where(data_weight[0] < 0.6, 1, 0) 50 | in_row1 = np.min(in_, axis=0) 51 | # print(reliability_mask) 52 | for i in range(w): 53 | if reliability_mask[i] == 1: 54 | data_weight[0][i] = 0.8 55 | 56 | for i in range(w): 57 | if reliability_mask[i] == 1: 58 | in_[0][i] = in_row1[i] 59 | 60 | Adata = sparse.spdiags(data_weight.flatten(), 0, k, k) 61 | 62 | A = Asmoothness + Adata 63 | 64 | b = Adata * in_.flatten(order='F').T 65 | 66 | X = spsolve(A, b) 67 | 68 | out = np.reshape(X, [h, w], order='F') 69 | return out 70 | --------------------------------------------------------------------------------