From 623440b98742148d0266214d7d7491acfbe60702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=B2=A9?= <543334759@qq.com> Date: Fri, 29 Jul 2022 19:08:29 +0800 Subject: [PATCH] code --- djangoProject/.idea/.gitignore | 8 + djangoProject/.idea/djangoProject.iml | 28 +++ .../inspectionProfiles/Project_Default.xml | 12 ++ .../inspectionProfiles/profiles_settings.xml | 6 + djangoProject/.idea/misc.xml | 4 + djangoProject/.idea/modules.xml | 8 + djangoProject/.idea/other.xml | 6 + djangoProject/APP01/__init__.py | 0 .../APP01/__pycache__/__init__.cpython-37.pyc | Bin 0 -> 137 bytes .../APP01/__pycache__/__init__.cpython-38.pyc | Bin 0 -> 141 bytes .../APP01/__pycache__/admin.cpython-37.pyc | Bin 0 -> 178 bytes .../APP01/__pycache__/admin.cpython-38.pyc | Bin 0 -> 182 bytes .../APP01/__pycache__/apps.cpython-37.pyc | Bin 0 -> 408 bytes .../APP01/__pycache__/apps.cpython-38.pyc | Bin 0 -> 416 bytes .../APP01/__pycache__/models.cpython-37.pyc | Bin 0 -> 703 bytes .../APP01/__pycache__/models.cpython-38.pyc | Bin 0 -> 442 bytes .../APP01/__pycache__/views.cpython-37.pyc | Bin 0 -> 4220 bytes .../APP01/__pycache__/views.cpython-38.pyc | Bin 0 -> 861 bytes djangoProject/APP01/admin.py | 3 + djangoProject/APP01/apps.py | 6 + .../APP01/migrations/0001_initial.py | 22 +++ djangoProject/APP01/migrations/__init__.py | 0 .../__pycache__/0001_initial.cpython-37.pyc | Bin 0 -> 675 bytes .../__pycache__/0001_initial.cpython-38.pyc | Bin 0 -> 689 bytes .../__pycache__/__init__.cpython-37.pyc | Bin 0 -> 148 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 152 bytes djangoProject/APP01/models.py | 18 ++ djangoProject/APP01/tests.py | 3 + djangoProject/APP01/views.py | 179 ++++++++++++++++++ djangoProject/__pycache__/funs.cpython-37.pyc | Bin 0 -> 4240 bytes .../__pycache__/manage.cpython-37.pyc | Bin 0 -> 813 bytes .../__pycache__/manage.cpython-38.pyc | Bin 0 -> 825 bytes djangoProject/db.sqlite3 | Bin 0 -> 135168 bytes djangoProject/djangoProject/__init__.py | 0 .../__pycache__/__init__.cpython-37.pyc | Bin 0 -> 145 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 149 bytes .../__pycache__/settings.cpython-37.pyc | Bin 0 -> 2510 bytes .../__pycache__/settings.cpython-38.pyc | Bin 0 -> 2525 bytes .../__pycache__/urls.cpython-37.pyc | Bin 0 -> 1469 bytes .../__pycache__/urls.cpython-38.pyc | Bin 0 -> 1244 bytes .../__pycache__/wsgi.cpython-37.pyc | Bin 0 -> 560 bytes .../__pycache__/wsgi.cpython-38.pyc | Bin 0 -> 564 bytes djangoProject/djangoProject/asgi.py | 16 ++ djangoProject/djangoProject/settings.py | 126 ++++++++++++ djangoProject/djangoProject/urls.py | 42 ++++ djangoProject/djangoProject/wsgi.py | 16 ++ djangoProject/funs.py | 176 +++++++++++++++++ djangoProject/manage.py | 22 +++ djangoProject/templates/add.html | 27 +++ djangoProject/templates/dilation.html | 29 +++ djangoProject/templates/erosion.html | 29 +++ djangoProject/templates/hsv.html | 35 ++++ djangoProject/templates/index.html | 22 +++ djangoProject/templates/noise.html | 33 ++++ djangoProject/templates/opandcl.html | 33 ++++ djangoProject/templates/rgb.html | 35 ++++ djangoProject/templates/sharp.html | 33 ++++ djangoProject/templates/subtract.html | 29 +++ djangoProject/templates/test.html | 0 djangoProject/templates/turn.html | 37 ++++ djangoProject/templates/un.html | 27 +++ 61 files changed, 1070 insertions(+) create mode 100644 djangoProject/.idea/.gitignore create mode 100644 djangoProject/.idea/djangoProject.iml create mode 100644 djangoProject/.idea/inspectionProfiles/Project_Default.xml create mode 100644 djangoProject/.idea/inspectionProfiles/profiles_settings.xml create mode 100644 djangoProject/.idea/misc.xml create mode 100644 djangoProject/.idea/modules.xml create mode 100644 djangoProject/.idea/other.xml create mode 100644 djangoProject/APP01/__init__.py create mode 100644 djangoProject/APP01/__pycache__/__init__.cpython-37.pyc create mode 100644 djangoProject/APP01/__pycache__/__init__.cpython-38.pyc create mode 100644 djangoProject/APP01/__pycache__/admin.cpython-37.pyc create mode 100644 djangoProject/APP01/__pycache__/admin.cpython-38.pyc create mode 100644 djangoProject/APP01/__pycache__/apps.cpython-37.pyc create mode 100644 djangoProject/APP01/__pycache__/apps.cpython-38.pyc create mode 100644 djangoProject/APP01/__pycache__/models.cpython-37.pyc create mode 100644 djangoProject/APP01/__pycache__/models.cpython-38.pyc create mode 100644 djangoProject/APP01/__pycache__/views.cpython-37.pyc create mode 100644 djangoProject/APP01/__pycache__/views.cpython-38.pyc create mode 100644 djangoProject/APP01/admin.py create mode 100644 djangoProject/APP01/apps.py create mode 100644 djangoProject/APP01/migrations/0001_initial.py create mode 100644 djangoProject/APP01/migrations/__init__.py create mode 100644 djangoProject/APP01/migrations/__pycache__/0001_initial.cpython-37.pyc create mode 100644 djangoProject/APP01/migrations/__pycache__/0001_initial.cpython-38.pyc create mode 100644 djangoProject/APP01/migrations/__pycache__/__init__.cpython-37.pyc create mode 100644 djangoProject/APP01/migrations/__pycache__/__init__.cpython-38.pyc create mode 100644 djangoProject/APP01/models.py create mode 100644 djangoProject/APP01/tests.py create mode 100644 djangoProject/APP01/views.py create mode 100644 djangoProject/__pycache__/funs.cpython-37.pyc create mode 100644 djangoProject/__pycache__/manage.cpython-37.pyc create mode 100644 djangoProject/__pycache__/manage.cpython-38.pyc create mode 100644 djangoProject/db.sqlite3 create mode 100644 djangoProject/djangoProject/__init__.py create mode 100644 djangoProject/djangoProject/__pycache__/__init__.cpython-37.pyc create mode 100644 djangoProject/djangoProject/__pycache__/__init__.cpython-38.pyc create mode 100644 djangoProject/djangoProject/__pycache__/settings.cpython-37.pyc create mode 100644 djangoProject/djangoProject/__pycache__/settings.cpython-38.pyc create mode 100644 djangoProject/djangoProject/__pycache__/urls.cpython-37.pyc create mode 100644 djangoProject/djangoProject/__pycache__/urls.cpython-38.pyc create mode 100644 djangoProject/djangoProject/__pycache__/wsgi.cpython-37.pyc create mode 100644 djangoProject/djangoProject/__pycache__/wsgi.cpython-38.pyc create mode 100644 djangoProject/djangoProject/asgi.py create mode 100644 djangoProject/djangoProject/settings.py create mode 100644 djangoProject/djangoProject/urls.py create mode 100644 djangoProject/djangoProject/wsgi.py create mode 100644 djangoProject/funs.py create mode 100644 djangoProject/manage.py create mode 100644 djangoProject/templates/add.html create mode 100644 djangoProject/templates/dilation.html create mode 100644 djangoProject/templates/erosion.html create mode 100644 djangoProject/templates/hsv.html create mode 100644 djangoProject/templates/index.html create mode 100644 djangoProject/templates/noise.html create mode 100644 djangoProject/templates/opandcl.html create mode 100644 djangoProject/templates/rgb.html create mode 100644 djangoProject/templates/sharp.html create mode 100644 djangoProject/templates/subtract.html create mode 100644 djangoProject/templates/test.html create mode 100644 djangoProject/templates/turn.html create mode 100644 djangoProject/templates/un.html diff --git a/djangoProject/.idea/.gitignore b/djangoProject/.idea/.gitignore new file mode 100644 index 0000000..35410ca --- /dev/null +++ b/djangoProject/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/djangoProject/.idea/djangoProject.iml b/djangoProject/.idea/djangoProject.iml new file mode 100644 index 0000000..fa3c579 --- /dev/null +++ b/djangoProject/.idea/djangoProject.iml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/djangoProject/.idea/inspectionProfiles/Project_Default.xml b/djangoProject/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..06bb031 --- /dev/null +++ b/djangoProject/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/djangoProject/.idea/inspectionProfiles/profiles_settings.xml b/djangoProject/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/djangoProject/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/djangoProject/.idea/misc.xml b/djangoProject/.idea/misc.xml new file mode 100644 index 0000000..241b051 --- /dev/null +++ b/djangoProject/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/djangoProject/.idea/modules.xml b/djangoProject/.idea/modules.xml new file mode 100644 index 0000000..5abfc21 --- /dev/null +++ b/djangoProject/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/djangoProject/.idea/other.xml b/djangoProject/.idea/other.xml new file mode 100644 index 0000000..a708ec7 --- /dev/null +++ b/djangoProject/.idea/other.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/djangoProject/APP01/__init__.py b/djangoProject/APP01/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/djangoProject/APP01/__pycache__/__init__.cpython-37.pyc b/djangoProject/APP01/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8726508f16b26de9dac10383e001b272469a984c GIT binary patch literal 137 zcmZ?b<>g`kf?)Y0Ng(<$h=2h`Aj1KOi&=m~3PUi1CZpdFl0pP83g5+AQuPg`kf?)Y0Ng(<$h(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o6wr#VV$tGC3o$ zC^sfOu_!4qJvAmJD={xUKcFZ-D>bTZlX-=vg K$gIym%m4trTOYar literal 0 HcmV?d00001 diff --git a/djangoProject/APP01/__pycache__/admin.cpython-37.pyc b/djangoProject/APP01/__pycache__/admin.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dae20876a83fbbeed245e3aa9c0f51640ff73312 GIT binary patch literal 178 zcmZ?b<>g`kf?)Y0NlrleF^B^LOhASM5Elyoi4=wu#vF!R#wbQch7_h?22JLdKv4!w z##^k3DY=<>ews{Cd?{IpdFlCj$@zIDMVU!OAOlu16fpxSF!4*@#VV$tGC3o$C^sfO xu_!4qJv9cRC!i=lD>bg`kf?)Y0NlrleF^Gc(44TX@fuanW zjJH@5Q*tx&{4|-O_)@YG^V0M6lJoOQiZYXmKnAR2C}IXuVB(j)i&acPWpYMhQEp6n xVo_3JdTI~ zufT+zw8E0V^V#2LTVBs*V}`c9K8Bz8e$(e{HU>-d<^};6@Qmf$=bSw=ut0n;5SqUW z-vWEfoWT#Wn8VFzRaFmV5vNH+nX_>WmgvnTf@VGkhDz=WuzVW?cCgI^rSnBEe!GI5 zDw5KL(9KKGS>vwLWYzA=r&MR)4_2NxUu>L#8A@5GTuW)jQX;j@D4t6B+N$hSxd0uj zHrq>u4P;Cmj7_yKR*!I@4u0Lo+n_o`FRIRiMAe~6bkJ|%)#Xk{`=A>dsH$q*>QD<* p(v=#5A-8##**L;XPRkRswrBux|3~!^-QEoE`kn9TLJe`J;tzmGV>bW* literal 0 HcmV?d00001 diff --git a/djangoProject/APP01/__pycache__/apps.cpython-38.pyc b/djangoProject/APP01/__pycache__/apps.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c1cbbe0cabf5e527b0d3ad559828fefd0b759d17 GIT binary patch literal 416 zcmYjOy-veG48F^yQhyi3ieSwWwJSoX1q53asbYyDoi6buq{<&jGn5q`ftToe@D#T) z@d`}XNhNB@KL32SKlz?#voS;2Tz-Y0_xz9O!Vqk&zU?4Pq z7rq7dhB<>DL@|e((W{vMi z9ji9mNreMsOcRVvwF9e1NT@Tv?!$FZ?V}e}=Ruqei{IbFB1PG4M^b#Eqpbcqh zMybVK8)hLTCj&R&s6<&XL--v3Sn; zhplL)7vmUzk9CqAjV>&>|7>1v)gy0xx)XEaN;>8(bH)W Q&+N!LLN`Y}=IkE(0}a!u)&Kwi literal 0 HcmV?d00001 diff --git a/djangoProject/APP01/__pycache__/models.cpython-38.pyc b/djangoProject/APP01/__pycache__/models.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b1c4e0e9b8c4cd302ab7f03385ef1f139a72d826 GIT binary patch literal 442 zcmYjN!AiqG5Z%otH3_X=`~vZkOQ}~8sVJ5nS_L^~(d#n|K!7TuX-X*>5%7S$ z5@3>+-U~|^_zxrr_Si=fYCF0Dsp{OpLt_Yr==C`UNm2?V^&~5Opy0jHG{C$ANQU_l z1W4JjY&;oRw$ugkM%%Tj1n^C@KSc(t#9BOaC0E5}F-<}na=sE;a&BYJafz*Rd6)C2 ztx)Za@o>_{V=W4Kzmy7$lWC*dg)j}azH59Z<{0Zu_#NC`X6s#!9Xcz7nd4{%rC1f! z%v7b!H`&c>Hn_-I+5Pp-IHdu4?Z`vgrA=j;_%><>`!H`e2`28Zn(O};+w25qZFtq{ MxTcQIE#LM306!pUY5)KL literal 0 HcmV?d00001 diff --git a/djangoProject/APP01/__pycache__/views.cpython-37.pyc b/djangoProject/APP01/__pycache__/views.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..49ea5f2b1ad59b2948186ba0b838919338d064d9 GIT binary patch literal 4220 zcmd6qTW{Mo6o5rtEX9^{Z+cJDZph|cvKAPMVJL<ejr|F|_NjkiPd$h7j5MDO2Le@5%yn9`OexRHMY#8l+4J=5=3h7-d7{4c}~7WlQBv$S2APmA8Dm zY|{j_f7Hqjb?5}h37VuSkV)#&G{_X4q*EYWI!$Llrs*u5135|O=@pPubb($4IZdz8 z>mX<74SEygEWJfY)EKo!^%P^7@%U_45n4x=D?f zdWW>hnRTwA_Am=GADKJb#ZqL{8r6)>Z5Svr1Fyj{i73%v@*t$##7gU{&8_ufWK@~t zj%p>mBbL!4o3q0f6S8av?D-QI=68)xLW92^=04wRzNj2{ys=mH_`X+Vd$jHa)vzme zcvxo@xtHD9x&L7AsK%a)mFA1c#(_cg6bvHN(vu|7;hEL>G}QGFAPNH>g#a5$fI!Kq z4vOjdlL-m4S~-vnKSMaS1Ca)yW)~-5PM|Kfn}?i0rW)ZhkoG=;9T9-~$SP!{Rwrlr zxz-`ai*1tAzF+9*(rD|Hyac;z>t`m?J)Hiw*D|h=7EDf8lQZ(LtWGTu(hDl=Bw2$6 zKaOXbh-us5KB5tk;rTwtb&e9T1;m;du_kJ{NbRylmKyLH^b#&48nDCLC6hY83gw=1 zIB-w7Jt!c-Q&2+^G@x@0r`{nHjHX6F&2DYSI9_fWp!#CR1hve1qHe2R&e=pB)o0eA)^` z*(g-^V+hs-2zDh5BnxC@f(1U{3pf~B;e~ZJ3XfOsL6txw(ue~z96jbTOZXzxjhoAX zIQkbZ92b;d#{}1%-@xQ1BxPem9Q^|czlHB_W73z#M)8|Z;AMXrci_#KY1pk`BpCW` zFf0pwH~(lLilxgadQtZn-duK=3(jJ;$tj`wGn4yO4P54-w4|y##i+3iu9Ik!ws~Ev z+jR%sr)_}y^lFp~eTFV{mTDVVk}fzCL>lExX6#I_F$kVG9;Gp?bYG7$d=^9&huF(5 z8Bmn)noaoOC_{>jET#S7fjfc=ivFgQ&E+;>8Uno+9V-cr3Ne z|B4~M3)4GEi`Ks6UZwlX=nIl#{NV3ka>)qe~^3`TlVuvr?|UXDrDD6 z-$9GPEZ>K>Z?XLE1GpPDy?|Eyk^Ix$27Ai}bj=S18^CB_)UvmCviaQFRuvKTjpLc| z<4FqG^E5|-V->OMuvDz#Mz*jc2Qv9!{7fcfi;ou1%@Xt+mWWx}E#!X~2;{@@192G- zMJ*hSiM<|o9u|weUf3>fZs&g@5xcoIJs``Vc9sj&8=(+;QTTW&d1}2 zlMKR|V57yBJa!!xipzS#2F7r0*%__uc9JcPHCa3&nnNjhnDPdQWF9F*SxvOV%4 literal 0 HcmV?d00001 diff --git a/djangoProject/APP01/__pycache__/views.cpython-38.pyc b/djangoProject/APP01/__pycache__/views.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0de6b67ede465a15e1779193b8fbf74a4c5e7b86 GIT binary patch literal 861 zcmY*Xy=zoK5Z~F|_mRh4jE!1}?Q6~mRzXBDDgliL(dIajm)qs;p6}zbyO)@7S4EH% z_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bX$W@uOw=pwgbXxyLs~noEII;uLB@x1g zLf}v~xk5V<;=@MfE)Al-E_I8gZ3L=TC8%w3%*IVQM5g$+E`X4aPIOmkHBRZzz-|P?n+eKXAu!DW(V_0^*bo9H+ X2SR)68D_GBSNrk2c3n2E`6u2#Qnb8& literal 0 HcmV?d00001 diff --git a/djangoProject/APP01/migrations/__pycache__/__init__.cpython-37.pyc b/djangoProject/APP01/migrations/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a8057dcdeab71aed57d38f3e6bae08dc5581b541 GIT binary patch literal 148 zcmZ?b<>g`kf?)Y0Ng(<$h=2h`Aj1KOi&=m~3PUi1CZpdK8|nO>Awl9``Z91|a(nU`4-AFo$X Vd5gm)H$SB`C)EyQ>}Mcm002mRBufAQ literal 0 HcmV?d00001 diff --git a/djangoProject/APP01/migrations/__pycache__/__init__.cpython-38.pyc b/djangoProject/APP01/migrations/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8f487793081afd701f1a81e2864049878f6f3514 GIT binary patch literal 152 zcmWIL<>g`kf?)Y0Ng(<$h(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o6w(#VV$tGC3o$ zC^sfOu_!4qJvAmJD={xUKcFZ-D>bPO2Tq*v~-B003W2Bwhdj literal 0 HcmV?d00001 diff --git a/djangoProject/APP01/models.py b/djangoProject/APP01/models.py new file mode 100644 index 0000000..61d28d8 --- /dev/null +++ b/djangoProject/APP01/models.py @@ -0,0 +1,18 @@ +from django.db import models +from django.db.models.signals import pre_delete +from django.dispatch import receiver + + +# Create your models here. + + +class IMG(models.Model): + img = models.ImageField(upload_to='img') # 地址 + name = models.CharField(max_length=20) + + +# 删除方法重载 +@receiver(pre_delete, sender=IMG) +def file_delete(instance, **kwargs): + instance.img.delete(False) + # print("delete", instance.img) diff --git a/djangoProject/APP01/tests.py b/djangoProject/APP01/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/djangoProject/APP01/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/djangoProject/APP01/views.py b/djangoProject/APP01/views.py new file mode 100644 index 0000000..7133534 --- /dev/null +++ b/djangoProject/APP01/views.py @@ -0,0 +1,179 @@ +from django.http import HttpResponse +from django.shortcuts import render +from APP01.models import IMG +from APP01.models import file_delete +import funs + + +# Create your views here. + + +def saveIMG(request): + if request.method == 'POST': + new_img = IMG( + img=request.FILES.get('img'), + name=request.FILES.get('img').name + ) + new_img.save() + + +def test(request): + return render(request, "test.html") + + +def index(request): + img = IMG.objects.all() + for i in img: + file_delete(instance=i) + i.delete() + IMG.objects.all().delete() + # 每次返回主页清理数据库和本地缓存的文件 + return render(request, "index.html") + + +def RGB(request): + saveIMG(request) + img = IMG.objects.all().last() + content = { + 'img': img, + } + img1 = IMG.objects.all() + for i in img1: + print(i.img.path) + funs.Rgb(i.img.path) + return render(request, 'rgb.html', content) + + +def HSV(request): + saveIMG(request) + img = IMG.objects.all().last() + content = { + 'img': img, + } + img1 = IMG.objects.all() + for i in img1: + print(i.img.path) + funs.Hsv(i.img.path) + return render(request, 'hsv.html', content) + + +def UN(request): + saveIMG(request) + img = IMG.objects.all().last() + content = { + 'img': img, + } + img1 = IMG.objects.all() + for i in img1: + print(i.img.path) + funs.Un(i.img.path) + return render(request, 'un.html', content) + + +def ADD(request): + saveIMG(request) + img = IMG.objects.all() + content = { + 'img': img, + } + if len(img) > 1: + paths = [] + for i in range(len(img)): + print(img[i].img.path) + paths.append(img[i].img.path) + funs.Add(paths) + return render(request, 'add.html', content) + + +def SUBTRACT(request): + saveIMG(request) + img = IMG.objects.all() + content = { + 'img': img, + } + if len(img) > 1: + paths = [] + for i in range(len(img)): + print(img[i].img.path) + paths.append(img[i].img.path) + funs.Subtract(paths) + return render(request, 'subtract.html', content) + + +def OPANDCL(request): + saveIMG(request) + img = IMG.objects.all().last() + content = { + 'img': img, + } + img1 = IMG.objects.all() + for i in img1: + print(i.img.path) + funs.OpenAndClose(i.img.path) + return render(request, 'opandcl.html', content) + + +def SHARP(request): + saveIMG(request) + img = IMG.objects.all().last() + content = { + 'img': img, + } + img1 = IMG.objects.all() + for i in img1: + print(i.img.path) + funs.Sharp(i.img.path) + return render(request, 'sharp.html', content) + + +def TURN(request): + saveIMG(request) + img = IMG.objects.all().last() + content = { + 'img': img, + } + img1 = IMG.objects.all() + for i in img1: + print(i.img.path) + funs.Turn(i.img.path) + return render(request, 'turn.html', content) + + +def EROSION(request): + saveIMG(request) + img = IMG.objects.all().last() + content = { + 'img': img, + } + img1 = IMG.objects.all() + for i in img1: + print(i.img.path) + funs.Erosion(i.img.path) + return render(request, 'erosion.html', content) + + +def DILATION(request): + saveIMG(request) + img = IMG.objects.all().last() + content = { + 'img': img, + } + img1 = IMG.objects.all() + for i in img1: + print(i.img.path) + funs.Dilation(i.img.path) + return render(request, 'dilation.html', content) + + +def NOISE(request): + saveIMG(request) + img = IMG.objects.all().last() + content = { + 'img': img, + } + img1 = IMG.objects.all() + for i in img1: + print(i.img.path) + funs.Noise(i.img.path) + return render(request, 'noise.html', content) + diff --git a/djangoProject/__pycache__/funs.cpython-37.pyc b/djangoProject/__pycache__/funs.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4bd384d2f975e86006568b588a12fe1734721cef GIT binary patch literal 4240 zcmcgvOK%(36`q+pGaOP++p=XP4(g^wTegMSx{DTpYlos(OMpTOq*Nh<3W4GsQKb0t zouMoV!*r1Z?WRD{WzmJTD!T0t$hzwS-P~;e1KM@nP4b;P500pGn;Fb~oclWGJFh$I z3kx|7&maE&<Q~*XvsT;WbXy zDlMHVJQh9^UkRUghQin0=m9vpGA4SUgD35C;*3h;n5}6OV}`0LDx0A)MK!UT!Og(9 zGIZM6;8wtrwjG$%<{J3QRIZ67LB%z}bb04Vq3`levrv1vUO0Nv9kp+g+P6u9NO>k% z>+GqtJAL6cxy*F>uSLgq^OiJ6P5(r)PQNYnBdMbl|IoxdPWxYB8+QX>Y5y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F1YrcaFlf4J| z1C~hgZ}9vD#wZiyk|>nrbE#|ReCpbHO$M&=!1ce-YU9K6-xr~OF|^xz>iN%$%On9* zs$2DPVKD4?t_n(z;-C}`^xfv*H=UmEhCgws^w5Z1knSV(QgOR1eu^Wcr80&npe^V& zCw@j$hLn`PPe|Ms@G~dv;n*LI{YECNpGv(W^=`xHq8iK^sZ}91Ut>S-2PicBf8dg6 ztmrE!(KZ&@BSt+F^bKT*N4Q~#EzHa>sn{W{!MH!V2pKi|xOc0cLP5VS>gPb+rv+U( z1zko|W)Tz!RTL293TnR;XY`*c)bEk=tUu)Ap8Fhbp?P%Ib#%O@Gl$o9=vi{^JBv=% G$$ky36`0%r literal 0 HcmV?d00001 diff --git a/djangoProject/__pycache__/manage.cpython-37.pyc b/djangoProject/__pycache__/manage.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..025aa7176829d6c16ca01e622fcbc1f85488eba4 GIT binary patch literal 813 zcmZuv%We}f6tz8*2ZcsiRq6(LSEYi<5(yznX{tU1X+?tCMo5-Bc7u}{yRtn|6SXWT zpTPo_u;mx{irKQ_7g%wfv{I3{BcB=1eVu#km&?mb2<-dApQk?vLchZ1)?klbz;X$I zKm#POAQ>Lu`I`)gh(!De4I&wf%9z-78C@fc1nHqxb@rq);(BP-98FE0b1fccN=sUJ zl_@`^XU0-4a;25?mU}gk)N?m>$!}kT_Rr{)vh5f|EE>1boMv9I|r<{-S6*pcY5sgLFetO?b(W$&v|IgNTxn<(tD+c&SK!&!sV*G zkZIv1JF_NdH&U=5#q9HzDKeqgJXQI*v7RmzOX#MRbZQFf3iwbSBvjgYo@G){5R&o< zR~bLeBsDq&T6%cW-#zFaZuWPn)DvZm&ZYKr!mSE%8?>Xuyd=mzl%9G+c?zO)FDa*x z;0vDJP2K3W>LoF*tliWrmtZm>&v=pf@@D2FHC85YwtOfly-~-10RYeCR{#J2 literal 0 HcmV?d00001 diff --git a/djangoProject/__pycache__/manage.cpython-38.pyc b/djangoProject/__pycache__/manage.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..63f58f4ababc06109746f551d6a48f782f014ee3 GIT binary patch literal 825 zcmZuvO=}b}7)~;?A6C2cPzt?BZe@#3Pa;UMmTu_>x-IUOwu=zbNxEh`lawU0beGnH z^=Ej{qh9?B{))MJ@-K*>Z?-M0;5+1*nY>@m`y>amvoi?n>%;FS-v~lK!q2q99(n=G zB>)2TkidduxQ8ci(jy`g@dwn4WGpIY#4gL|8et?z2Q{nXr>z0keY50fYVw?G@i>qtD&TxyEB*kgl4Fn2E4OCBv9Re<$3@f4e%!tXnZCZjpqW9 zEXw06Xn%F(>JuluSGw;k2Chw9 zF3Jm;7GAPbYjSog2McnHKW>;J6MD&0m7g2y>5Xa$UAK~sOhH`%AIgJ_N;}W9ObQBO zQa!664C+ZM|{^CKK|M7nv__XHHUMWdi5R`!e*i5zJiP-i92(UgtUh literal 0 HcmV?d00001 diff --git a/djangoProject/db.sqlite3 b/djangoProject/db.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..b911d6dbbdb19cafe1e241821638c41e841e9f0e GIT binary patch literal 135168 zcmeI5du$uYeaE@tVS1|(XZu7^*4d0Kiw}_$@7m^cHqTbimVLI2JEuKtm*k3G zA0IMF`H}RRqwKp}dT4;4Xwe7K^p6&3(X?oS7FVDNiXaWpG-wJG*FXBYCP0H+AL$iE zAAcl3`4E2k-*)}m7LMMR;N}x!qFl@fO;xWHwA<=NeRX5g^b*)y` z>vg?asoTyKy`U^E~&c))&Du{_0;-eCK~cUlD{M+ul~_r7 zGRRj8T172uN;IbC66vIB)rOTy+PWGnqdr~tT@tE+mbh?a^M!yYFD(i8o@}VOl5wAI z)U}$z50;2J$L$ysGz+o1^z^x`c}qGPGOTnjhIFdXqE-v7Tv!dQTse0xbn(*i`K3!& zL(gWfhL*0ZURYism*=x9t0a|sa!hq8`%LyycI8y|vMp0Hk4We=i@n4pEw3!EE-#%s zchwBcp6+Rcy_$NwTP*s^BeEIwi}Ku@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uC2?-TR(me7{kt>`hwHqbWTT?3#USk;QcwwF2Vw4xid zn!B#$8|;y4zWW>9k{Mjn)~Qo$ZDNaey*JU$wn|Y`$~1gZi{!t1@X!s!ddFkiIqh2~ zO%(P7W^s3ZziYJ&%X@3Xs6B`FW3O+&Z1WnSTPvxwRia*2OC{Qo8rrDT^&;(CYY&n_ zr_N?iJs1V8`;KmY_l00ck)1V8`;KmY_DFaj9=KVTIG zxgY=nAOHd&00JNY0w4eaAOHd&unPhh|L+1Cl7IjRfB*=900@8p2!H?xfB*=9zyn4A zk@_){M&;L{YXZ(-*eUuO%5C8!X009sH0T2KI5CDPukiesd zy)NO%jCfPmZYg@XcuK8=*m;P~A3H>GQxUPCm9&P|iZ!ly{G&#^`E}}MYU7HuXJzRS=ZXi%&-s(oF6CS*ppsUUYEHku_M8l zk-*g1mB7?$PY@ZU1hYvm6WnFZMB7adkC5r)F%MVHzE{32nO%e=ik+VIm{MEurbccN zG%QSQEelf=yL>c27Dr}0OiU}9sbJ@i`6+HH;^w&*Yt@bQcJ}-#JWTO3b8a*LwuLFc zu-RwWm}+Cyt60}+WxcamSwSa6vYby3n0l-T zCfgKc1)lI3)}}Hmf?1pLtiZ>;WF3hOFpX9yGi5@pkfR>2Yv@>vi!D`)TBT9D)22oN zAs%wvO;)o>Q>fj}lxbNGa7$C9-O`lUwhRkoIWx}$+Rd1}wvBE7zp)G8KJ2+52?Rg@ z1V8`;KmY_l00ck)1V8`;K;Q=>U>pDcV2+R)1V8`;KmY_l00ck)1V8`;KmY_l;JzjB E|Cz$R)c^nh literal 0 HcmV?d00001 diff --git a/djangoProject/djangoProject/__init__.py b/djangoProject/djangoProject/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/djangoProject/djangoProject/__pycache__/__init__.cpython-37.pyc b/djangoProject/djangoProject/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fdd5ea993d45530901488f6f173a3bd0b069f055 GIT binary patch literal 145 zcmZ?b<>g`kf>m-yl0fuh5CH>>K!yVl7qb9~6oz01O-8?!3`HPe1o6wt#VV$tGC3o$ zC^sfOu_!4qJvAmJD={xUKcFZ-D>bg`kf>m-yl0fuh5P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;!HOi&acPWpYMh zQEp6nVo_3JdTLBcR$^Xyen3%vR%&ty8ZSORGcU6wK3=b&@)n0pZhlH>PO2Tq%+El~ F001=PBp?6) literal 0 HcmV?d00001 diff --git a/djangoProject/djangoProject/__pycache__/settings.cpython-37.pyc b/djangoProject/djangoProject/__pycache__/settings.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8c75af7dfb2257580b5a6afead2b7e637d9770b4 GIT binary patch literal 2510 zcmb7FTXWM!6t*1sN)keVa0yTW<>El(gp`(HT8d&R!GmLaBAc|D3>sNyt*p_-Xk|k5 z+P}dAJod4FM^ByUQ)l`EIz07Awux()X)0Ok-LvO>=j^xV>~7A@6;t^9_V@1{c|Mi; zBOZ*OJa(Sq$Ns_wQd$Z)NZXu~*3w*xq{+-L+TR%ZOU1^wg7juGjLa1#AwdqcMiYv z7;Yl_$CppK6OR7GL`jvn zh;JIfLAW_$fx3*C1D~wI${MAeAN+^i>noOZbKQTbo7YzdJ?OHH*SC%E*3(Ds(Z+4F zcPl6v{v-XS(+bZGK}6GY1D|%pgwpWrv~+;}mZyZV32}qqs83jUVQP{Q#*pOCCmftG zEVQ^hZ4uzMnDJ(?a7k)5*VaX&-)ExK@2{;_Jhw|NOuQsLbn+HG5Ajz=Fb)N<$)VvB zF`xe))11nrPfu>JhW1R)zy^(GVmLzvf@E4F{;=_$8}!+*(lrKl@Tnr8b4(|DZPS2k zghdpN`lWP~RqET-x)SkqX-Dx3cq)X?rovB>sc$fL==q@I$wMJ=C$<^!r6A^G5D=9* z)HdQ8c`?-R{P4+1k#?v{oq4)JUuBuec%wEnx7+Nh`Tyq z+DyAusfYP8-Vj(tWi8_npvFgT|07opbLC`I4zG^fA;XRb#Af0qwXpWQElO-CU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U7*qa0>PHNQb45PRZA#^*N=?>yxw5Oq zc}P<|?d9r?W~E+Jqw9U(A%BO|B1swp_36IGIfOe#&kjGNKWZP-Nnh9`#2ZlogoA#O zi?d2?yHZnPz9#J`!6Y03(UY<8(`51uN)NpN>2S;tl)4jJ6bDk6@X-sgN*rPvNsT<~ zYj{EQ=(I>X#3fG8sbbd(5034>Ijw!ab{c~ij{zQ^7NFL1a6rtH2pR0I_NX?|YL;tJ zz675GsG^dVaWEprJ9hsaTZ(d}bX1D24cr04j)$;K#Z6*C?Ri@S+o*Uw&gnWF|GFOM zd^lun(hfLaJkINSax^9K08`I?iQ}vf=Z_m|`Atbxk~D}5s#4xnn)*}ayEr2&o2~75 zTB=s-dy1?-sjE#jo~hK-CWt@)xueE~or)}1l|5-!iKlk!^`_q1t(NPxt$4Dj>@=!U zQ&HpDJ$1X1=vOOcDM_<OReS;y&jzJyCrQa zdbutu09e^kbgd4Vly5=6mGuX;ey_T|R*SQVtf|GEM`0aJ@Ka7=iTQ+vnD2VTO_mM^ zfQcb&MXpGC5^y}(?e=`a{BvOFkI?W_QxmgUeuC%t49AY#Z}~GLBbIy1 x7kHjy^Bi15y}!Bl++X~A{v4l8WZ8e9KgBU1&(5=a=3lrqQ-c5i literal 0 HcmV?d00001 diff --git a/djangoProject/djangoProject/__pycache__/urls.cpython-37.pyc b/djangoProject/djangoProject/__pycache__/urls.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..83abbce8d8795e5eaed561098daa9728b954237b GIT binary patch literal 1469 zcma)+TW{h<6vvG(;5d+Euk4w*R z-Vd_sH}dOBmHHL>)H8!o(N>k#mhGR1<8#jcKQo*+8jc3X^FKb%)2gO@mM^>G1mG9A z_@8hKHD3!Wp&nNf-PbFUjo3&`-&AbIR#Nq=imkYo*uJf}8XqK%?^HBmhBczE57+e% zI1 zqQ^kre$bakq)MFicW`|lKKZCOHUEe3=|pQc@tqE0*En6$5uPMi(?)M9Z9E z5z*9frYnNp@cLSPuB=ugoFFirCDBzw9_MklXoXht(fn2=fyvfr* zcDF67lD=?JHw+O@QIuqqi4H;wMiZ3W&v2HNgM0BW%XlRj1nen<7i=@FT`4RaCQ%AtO2^?@Ab(O$0oa@f0kZg}s-nG(1uIW@ zg|;!-a_()+6~FT~MxFxVF!VMDJf91O1L19Kn&C7IVsBIBE6g(aan2ypCX8}eLJ%EB zv0A7QlhTM24~jNmapnn0#f(uZ2JIh<+H3}6vzdQXdIZ)A7R?!KBCR;wGmaTB;y3>d zTPWS`RvI&9ywx3zp1)w0oY$2ftnR`rR3%*Z%>_?YQy) literal 0 HcmV?d00001 diff --git a/djangoProject/djangoProject/__pycache__/urls.cpython-38.pyc b/djangoProject/djangoProject/__pycache__/urls.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..18d25f800dcae303b5ea52406f6d2a97418dc7cd GIT binary patch literal 1244 zcma)5OKaRP5VpPEN4$@wj}Yidw~ZmSo0Rmhw51^ry3jTuO)e(jXlda-XZ%1T2hg%cO+XKCti&b_(i%U4|8d;leqoKa69>W^c)0ZBxNCbz8|wlc+>pFG`|-y>XY1m;cfbo6=@`VYy7Q+Kyv{bClA8aoIy?$QecSD#S%GGcNdV&ir-BP{2Zk za1@Fit#!NWv${r%l6910N?vyr?z+xShJ|=GfWqR1sQ+WZAZtjn*BZ5 zD1Q%&Pz70Y?=b4;Q8tOwJOL4OK2=%-mpRv`uZ2NC1+GW=k~J3%XHxd2a!s$pQ-aS) z&V1LkDEDSN$XMcofb&dUWzccEuIv1O=U}*IS;a9;a{#td9M%eChNUJX^iHHav|s=l zf=CI~iR+p^^ozld=u0kV9A6(kdQ4>mX8FI$tM|Y*HhauR)FzCz*13e^92OK)z zD4Pq_@(Ngj<-cx2O_sx}HiFf=W^c-mS5=tm_Tl044X)lgP*{9Vysm7vNF^z4rD<7B z^O#%)bunTWeVUZE;$AL&*xT)Ihj3q|GlfS72ghY|p((!_dGtJr@3gpzMwrvn v1oHt-$mu_c@9b1+ued53uPBQr8F^zuDDe~~d%0!)`6?~bQQt4C*17!+&=GuA literal 0 HcmV?d00001 diff --git a/djangoProject/djangoProject/__pycache__/wsgi.cpython-37.pyc b/djangoProject/djangoProject/__pycache__/wsgi.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..94d549d8be3293eececfbd7625495dd644d7ae04 GIT binary patch literal 560 zcmZ8eK}#bs6waj8mRVi)ARZ;xf;+P)c#vh;m1?PIU8u593e$A*I!(zWLlUd?>K{=& z?fwpbMZlA%{R?~AOb0=IkoWTP^1koO%fb43h`jyTdK^Cl2tAj{i`D(+yI z3m6u`An>s!a9$hK0tCUVez(HvY~>#NtaghAs|@#1YxU+S{MGMtNvh<8XJn!@VKXW- z^;4@Eq?Qy_jKZ*M30xP-fFX7Yq-vu=(6InQ4WT4g>{7sI0do*!PBmYaB+Y@5(TEm> z;3>6S$yY9WV{>g z#8Y);Rm`9eYLSDq@s-JV9RBq~LA_SsHZrhDd6vAA;WpdHKYE?Bq~}9 z;^gpV^UVw*1J-hxnO4I!lEe#15{H#>pQ>w7>R%C+;2L{6*8n-^T1glBMg|jlDXjbO ziuX6t<%cfazrFVUuvny1s`Ft+^_XTbd_(^(D|w<~;hJBoaer%iC{wyRZsIlk5&s9e C>#_U* literal 0 HcmV?d00001 diff --git a/djangoProject/djangoProject/__pycache__/wsgi.cpython-38.pyc b/djangoProject/djangoProject/__pycache__/wsgi.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5790d5ba5c6db6cc4e830066d6f9d60a81285659 GIT binary patch literal 564 zcmZ8fL5mYH6wajGZ5>_lAbVVLE$ECWcvwUfx|WLD6}pR13e$A*I!(zWLz3;rFjX0&1Sr+ zl+3x8M$cy0?;UcL#sZTXY0GVb8I8@QV+*O^33CAP()-FCr>QWxOB!weH07pDL8mX0 z=jqa1d6NpLl-ZP^eR|~zna00yC}h-&!s7ybR_|pyGQwg1{oB#tEE}JkpAScaadvvv zzxZ%+eRyXEi39JYE?ln@I$4H7vMf;J!lUL`lH)Csy1AuD7doKV(i$CNEEKTdm&%9x zJG|eCtsiyk{=DoTPpeJ7wJ4p_(VDHlh2f8TV`a6~uMXweNN51NxBu E1@rN;4*&oF literal 0 HcmV?d00001 diff --git a/djangoProject/djangoProject/asgi.py b/djangoProject/djangoProject/asgi.py new file mode 100644 index 0000000..60757c4 --- /dev/null +++ b/djangoProject/djangoProject/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for djangoProject project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoProject.settings') + +application = get_asgi_application() diff --git a/djangoProject/djangoProject/settings.py b/djangoProject/djangoProject/settings.py new file mode 100644 index 0000000..d4df02e --- /dev/null +++ b/djangoProject/djangoProject/settings.py @@ -0,0 +1,126 @@ +""" +Django settings for djangoProject project. + +Generated by 'django-admin startproject' using Django 3.2.5. + +For more information on this file, see +https://docs.djangoproject.com/en/3.2/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/3.2/ref/settings/ +""" + +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-d*0iib=r5f!*gg#1r^_c!-ujdfs3q&az%@8ny3&cj%t)ar8_#m' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'APP01.apps.App01Config', + 'django_extensions', # 清理缓存 +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'djangoProject.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [BASE_DIR / 'templates'] + , + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'djangoProject.wsgi.application' + +# Database +# https://docs.djangoproject.com/en/3.2/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + +# Password validation +# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + +# Internationalization +# https://docs.djangoproject.com/en/3.2/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/3.2/howto/static-files/ + +import os + +STATIC_URL = '/static/' +MEDIA_ROOT = os.path.join(BASE_DIR, 'media').replace('\\', '/') # 设置静态文件路径为主目录下的media文件夹 +MEDIA_URL = '/media/' # url映射 + +# Default primary key field type +# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/djangoProject/djangoProject/urls.py b/djangoProject/djangoProject/urls.py new file mode 100644 index 0000000..75bd9f9 --- /dev/null +++ b/djangoProject/djangoProject/urls.py @@ -0,0 +1,42 @@ +"""djangoProject URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/3.2/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" + +from django.contrib import admin +from django.urls import path +from django.conf.urls.static import static +from APP01 import views +from djangoProject import settings + +urlpatterns = [ + path('admin/', admin.site.urls), + path('test/', views.test), + + # APP01 + path('', views.index), + + path('rgb/', views.RGB), + path('hsv/', views.HSV), + path('un/', views.UN), # 取反、非运算 + path('add/', views.ADD), + path('subtract/', views.SUBTRACT), + path('opandcl/', views.OPANDCL), + path('sharp/', views.SHARP), + path('turn/', views.TURN), + path('erosion/', views.EROSION), + path('dilation/', views.DILATION), + path('noise/', views.NOISE), + + ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/djangoProject/djangoProject/wsgi.py b/djangoProject/djangoProject/wsgi.py new file mode 100644 index 0000000..cf736fe --- /dev/null +++ b/djangoProject/djangoProject/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for djangoProject project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoProject.settings') + +application = get_wsgi_application() diff --git a/djangoProject/funs.py b/djangoProject/funs.py new file mode 100644 index 0000000..5868faf --- /dev/null +++ b/djangoProject/funs.py @@ -0,0 +1,176 @@ +import cv2 +import numpy as np +import math + + +# RGB色彩空间 +def Rgb(path): + img = cv2.imread(path, 1) + b = img[:, :, 0] + g = img[:, :, 1] + r = img[:, :, 2] + cv2.imwrite('./media/RGB/b.jpg', b) + cv2.imwrite('./media/RGB/g.jpg', g) + cv2.imwrite('./media/RGB/r.jpg', r) + + +# HSV色彩空间 +def Hsv(path): + img = cv2.imread(path, 1) + hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) + h = hsv[:, :, 0] + s = hsv[:, :, 1] + v = hsv[:, :, 2] + cv2.imwrite("./media/HSV/h.jpg", h) + cv2.imwrite("./media/HSV/s.jpg", s) + cv2.imwrite("./media/HSV/v.jpg", v) + + +def Un(path): + img = cv2.imread(path, 0) + result = ~img + cv2.imwrite("./media/UN/un.jpg", result) + + +def Add(paths): + # 只做了两个图像叠加,多个怎么做 + img1 = cv2.imread(paths[0], 1) + img2 = cv2.imread(paths[1], 1) + img = cv2.add(img1, img2) + cv2.imwrite("./media/ADD/add.jpg", img) + + +def Subtract(paths): + img1 = cv2.imread(paths[0], 1) + img2 = cv2.imread(paths[1], 1) + img = cv2.subtract(img1, img2) + cv2.imwrite("./media/SUBTRACT/subtract.jpg", img) + + +# 形态学操作 +def OpenAndClose(path): + # 二值转换 + img = cv2.imread(path, 1) + gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) + retval, src = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY) + # 定义十字形结构元素 + kernel = cv2.getStructuringElement(cv2.MORPH_CROSS, (10, 10), (-1, -1)) + # 对二值图进行开运算和闭运算操作 + im_op = cv2.morphologyEx(src, cv2.MORPH_OPEN, kernel) + im_cl = cv2.morphologyEx(src, cv2.MORPH_CLOSE, kernel) + cv2.imwrite('./media/OPANDCL/op.png', im_op) + cv2.imwrite('./media/OPANDCL/cl.png', im_cl) + + +# 边缘检测和图像增强 +def Sharp(path): + CRH = cv2.imread(path, 1) + gradient = np.zeros_like(CRH) + CRH = CRH.astype('float') + h, w = CRH.shape[:2] + for x in range(h - 1): + for y in range(w - 1): + gx = abs(CRH[x + 1, y] - CRH[x, y]) + gy = abs(CRH[x, y + 1] - CRH[x, y]) + gradient[x, y] = gx + gy + sharp = CRH + gradient + + sharp = np.where(sharp > 255, 255, sharp) + sharp = np.where(sharp < 0, 0, sharp) + gradient = gradient.astype('uint8') + sharp = sharp.astype('uint8') + cv2.imwrite('./media/SHARP/gradient.png', gradient) + cv2.imwrite('./media/SHARP/sharp.png', sharp) + + +# 镜像 +def Turn(path): + img = cv2.imread(path) + # 水平镜像 + horizontal = cv2.flip(img, 1, dst=None) + # 垂直镜像 + vertical = cv2.flip(img, 0, dst=None) + # 对角镜像 + cross = cv2.flip(img, -1, dst=None) + cv2.imwrite("./media/TURN/horizontal.jpg", horizontal) + cv2.imwrite("./media/TURN/vertical.jpg", vertical) + cv2.imwrite("./media/TURN/cross.jpg", cross) + + +# 腐蚀 +def Erosion(path): + src = cv2.imread(path, cv2.IMREAD_UNCHANGED) + # 10x10的交叉型结构元 + kernel = cv2.getStructuringElement(cv2.MORPH_CROSS, (10, 10), (-1, -1)) + erosion = cv2.erode(src, kernel) + cv2.imwrite("./media/EROSION/erosion.jpg", erosion) + + +# 膨胀 +def Dilation(path): + src = cv2.imread(path, cv2.IMREAD_UNCHANGED) + # 10x10的交叉结构元 + kernel = cv2.getStructuringElement(cv2.MORPH_CROSS, (10, 10), (-1, -1)) + dilation = cv2.dilate(src, kernel) + cv2.imwrite("./media/DILATION/dilation.png", dilation) + + +# 噪声及滤波 +def Noise(path): + image = cv2.imread(path, cv2.IMREAD_GRAYSCALE) + output = np.zeros(image.shape, np.uint8) + output2 = np.zeros(image.shape, np.uint8) + # 叠加噪声 + for i in range(image.shape[0]): + for j in range(image.shape[1]): + if image[i][j] < 40: + # 添加食盐噪声 + output[i][j] = 255 + elif image[i][j] > 200: + # 添加胡椒噪声 + output[i][j] = 0 + # 不添加噪声 + else: + output[i][j] = image[i][j] + + # 均值滤波 + for i in range(output.shape[0]): + for j in range(output.shape[1]): + ji = 1.0 + for n in range(-1, 2): + if 0 <= i < output.shape[0] and 0 <= j + n < output.shape[1]: + ji = ji * output[i][j + n] + output2[i][j] = int(ji ** (1 / 3)) + + cv2.imwrite("./media/NOISE/noise.jpg", output) + cv2.imwrite("./media/NOISE/meanFilter.jpg", output2) + +# # 扩展平移缩放 +# def moveandchange(path): +# img = cv2.imread(path, 1) +# l, w, h = img.shape +# # 扩展,使用双线性插值法 +# img = cv2.resize(img, (0, 0), fx=2, fy=2, interpolation=cv2.INTER_LINEAR) +# height, width, channel = img.shape +# # 移动 +# M = np.float32([[1, 0, 30], [0, 1, 60]]) +# img = cv2.warpAffine(img, M, (width, height)) +# # 旋转 +# rows, cols, depth = img.shape +# M = cv2.getRotationMatrix2D((cols / 2, rows / 2), 45, 1) +# dst = cv2.warpAffine(img, M, (width, height)) +# +# cv2.imwrite('./media/CHANGE/out.png', dst) + + +# # 仿射变换 +# def affine(path): +# img = cv2.imread(path) +# rows, cols = img.shape[: 2] +# # 设置图像仿射变化矩阵 +# post1 = np.float32([[50, 50], [200, 50], [50, 200]]) +# post2 = np.float32([[10, 100], [200, 50], [100, 250]]) +# M = cv2.getAffineTransform(post1, post2) +# # 图像仿射变换 +# result = cv2.warpAffine(img, M, (rows, cols)) +# cv2.imwrite("./media/AFFINE/affine.jpg", result) diff --git a/djangoProject/manage.py b/djangoProject/manage.py new file mode 100644 index 0000000..503f50e --- /dev/null +++ b/djangoProject/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoProject.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main() diff --git a/djangoProject/templates/add.html b/djangoProject/templates/add.html new file mode 100644 index 0000000..92f224d --- /dev/null +++ b/djangoProject/templates/add.html @@ -0,0 +1,27 @@ + + + + + ADD + + +

+ {% csrf_token %} + + +
+ + 原图 +
+ {% for i in img %} + + {% endfor %} +{# #} +
+ 叠加后 +
+ add.jpg +
+ + + \ No newline at end of file diff --git a/djangoProject/templates/dilation.html b/djangoProject/templates/dilation.html new file mode 100644 index 0000000..5ae8cde --- /dev/null +++ b/djangoProject/templates/dilation.html @@ -0,0 +1,29 @@ + + + + + 图像膨胀 + + +
+ {% csrf_token %} + + +
+ + 原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ + 膨胀后 +
+ dilation.png +
+ + + + \ No newline at end of file diff --git a/djangoProject/templates/erosion.html b/djangoProject/templates/erosion.html new file mode 100644 index 0000000..4b98fbf --- /dev/null +++ b/djangoProject/templates/erosion.html @@ -0,0 +1,29 @@ + + + + + 图像腐蚀 + + +
+ {% csrf_token %} + + +
+ + 原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ + 腐蚀后 +
+ erosion.jpg +
+ + + + \ No newline at end of file diff --git a/djangoProject/templates/hsv.html b/djangoProject/templates/hsv.html new file mode 100644 index 0000000..86132cb --- /dev/null +++ b/djangoProject/templates/hsv.html @@ -0,0 +1,35 @@ + + + + + HSV + + +
+ {% csrf_token %} + + +
+ + 原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ + H +
+ H +
+ S +
+ S +
+ V +
+ V + + + \ No newline at end of file diff --git a/djangoProject/templates/index.html b/djangoProject/templates/index.html new file mode 100644 index 0000000..d25467a --- /dev/null +++ b/djangoProject/templates/index.html @@ -0,0 +1,22 @@ + + + + + 数字图像处理demo + + + + RGB三通道显示 + HSV三通道显示 + 二值图像取反 + 图像叠加 + 图像相减 + 形态学操作(开运算与闭运算) + 边缘检测 + 镜像翻转 + 图像腐蚀 + 图像膨胀 + 噪声与滤波 + + + \ No newline at end of file diff --git a/djangoProject/templates/noise.html b/djangoProject/templates/noise.html new file mode 100644 index 0000000..66b60a1 --- /dev/null +++ b/djangoProject/templates/noise.html @@ -0,0 +1,33 @@ + + + + + 噪声与滤波 + + +
+ {% csrf_token %} + + +
+ + 原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ + 噪声 +
+ noise.jpg +
+ 滤波 +
+ meanFilter.jpg +
+ + + + \ No newline at end of file diff --git a/djangoProject/templates/opandcl.html b/djangoProject/templates/opandcl.html new file mode 100644 index 0000000..2914555 --- /dev/null +++ b/djangoProject/templates/opandcl.html @@ -0,0 +1,33 @@ + + + + + OPEN AND CLOSE + + +
+ {% csrf_token %} + + +
+ + 原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ + open +
+ op.png +
+ close +
+ cl.png +
+ + + + \ No newline at end of file diff --git a/djangoProject/templates/rgb.html b/djangoProject/templates/rgb.html new file mode 100644 index 0000000..629a2c5 --- /dev/null +++ b/djangoProject/templates/rgb.html @@ -0,0 +1,35 @@ + + + + + RGB + + +
+ {% csrf_token %} + + +
+ + 原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ + B +
+ B +
+ G +
+ G +
+ R +
+ R + + + \ No newline at end of file diff --git a/djangoProject/templates/sharp.html b/djangoProject/templates/sharp.html new file mode 100644 index 0000000..7063577 --- /dev/null +++ b/djangoProject/templates/sharp.html @@ -0,0 +1,33 @@ + + + + + 边缘检测与增强 + + +
+ {% csrf_token %} + + +
+ + 原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ + gradient +
+ gradient.png +
+ sharp +
+ sharp.png +
+ + + + \ No newline at end of file diff --git a/djangoProject/templates/subtract.html b/djangoProject/templates/subtract.html new file mode 100644 index 0000000..7d1bcd2 --- /dev/null +++ b/djangoProject/templates/subtract.html @@ -0,0 +1,29 @@ + + + + + ADD + + +
+ {% csrf_token %} + + +
+ + 注意:相减图像需尺寸一致 + + 原图 +
+ {% for i in img %} + + {% endfor %} +{# #} +
+ 相减后 +
+ subtract.jpg +
+ + + \ No newline at end of file diff --git a/djangoProject/templates/test.html b/djangoProject/templates/test.html new file mode 100644 index 0000000..e69de29 diff --git a/djangoProject/templates/turn.html b/djangoProject/templates/turn.html new file mode 100644 index 0000000..ae270c2 --- /dev/null +++ b/djangoProject/templates/turn.html @@ -0,0 +1,37 @@ + + + + + 镜像翻转 + + +
+ {% csrf_token %} + + +
+ + 原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ + 水平镜像 +
+ horizontal.jpg +
+ 垂直镜像 +
+ vertical.jpg +
+ 对角镜像 +
+ cross.jpg +
+ + + + \ No newline at end of file diff --git a/djangoProject/templates/un.html b/djangoProject/templates/un.html new file mode 100644 index 0000000..965e7c8 --- /dev/null +++ b/djangoProject/templates/un.html @@ -0,0 +1,27 @@ + + + + + 非运算 + + +
+ {% csrf_token %} + + +
+ + 原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ + 取非后 +
+ un + + + \ No newline at end of file