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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>b g`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)0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JyCrQa 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+Euk 4w*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% zI 1 zqQ^kre$bakq)MFicW`|lKKZCOHUEe3=|pQc@tqE0*En6$5u PMi(?)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)w0o Y$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(jXl6i)9%}o7Xkx z_J8y*`Bdns&|eUG=t#TUZUcqLSo$=KX1@6}I%&5Z1IE_RZ-Xt{FutqJ;;6yqE&SpO zOtBFdu^C&LNv*|Q6zY6rH)c2=depr&y(tJ6l%(72W@Q73RTu4hf!3R da-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+WZ AZtjn*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((!_d GtJr@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{=DoTPpeJ7 wJ4p_(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 + + + + +原图 +
+ {% for i in img %} + + {% endfor %} +{# #} +
+叠加后 +
+ +
+ + + \ 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 @@ + + + + +图像膨胀 + + + + +原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ +膨胀后 +
+ +
+ + + + \ 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 @@ + + + + +图像腐蚀 + + + + +原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ +腐蚀后 +
+ +
+ + + + \ 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 + + + + +原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ +H +
+ +
+S +
+ +
+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 @@ + + + + +噪声与滤波 + + + + +原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ +噪声 +
+ +
+滤波 +
+ +
+ + + + \ 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 + + + + +原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ +open +
+ +
+close +
+ +
+ + + + \ 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 + + + + +原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ +B +
+ +
+G +
+ +
+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 @@ + + + + +边缘检测与增强 + + + + +原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ +gradient +
+ +
+sharp +
+ +
+ + + + \ 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 + + + + +注意:相减图像需尺寸一致 + +原图 +
+ {% for i in img %} + + {% endfor %} +{# #} +
+相减后 +
+ +
+ + + \ 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 @@ + + + + +镜像翻转 + + + + +原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ +水平镜像 +
+ +
+垂直镜像 +
+ +
+对角镜像 +
+ +
+ + + + \ 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 @@ + + + + +非运算 + + + + +原图 +
+{# {% for img in imgs %}#} +{# #} +{# {% endfor %}#} + +
+ +取非后 +
+ + + + \ No newline at end of file