236 lines
1.6 MiB
Plaintext
236 lines
1.6 MiB
Plaintext
|
{
|
|||
|
"cells": [
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 11,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"using FileIO\n",
|
|||
|
"using Images, ImageView\n",
|
|||
|
"using Colors\n",
|
|||
|
"using Formatting\n",
|
|||
|
"using FFTW\n",
|
|||
|
"using Plots"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 2,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"filterFactory (generic function with 1 method)"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 2,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"function idealFilter(r, isLow, threshold)\n",
|
|||
|
" if isLow\n",
|
|||
|
" r .<= threshold\n",
|
|||
|
" else\n",
|
|||
|
" r .> threshold\n",
|
|||
|
" end\n",
|
|||
|
"end\n",
|
|||
|
"\n",
|
|||
|
"function gaussianFilter(r, isLow, threshold)\n",
|
|||
|
" if isLow\n",
|
|||
|
" exp.(-(r.^2) ./ 2*(threshold^2))\n",
|
|||
|
" else\n",
|
|||
|
" 1 .- exp.(-(r.^2) ./ 2*(threshold^2))\n",
|
|||
|
" end\n",
|
|||
|
"end\n",
|
|||
|
"\n",
|
|||
|
"function butterworthFilter(r, isLow, threshold, n)\n",
|
|||
|
" if isLow\n",
|
|||
|
" 1 ./ (1 .+ (r ./ threshold) .^ (2 * n))\n",
|
|||
|
" else\n",
|
|||
|
" 1 ./ (1 .+ (threshold ./ r) .^ (2 * n))\n",
|
|||
|
" end\n",
|
|||
|
"end\n",
|
|||
|
"\n",
|
|||
|
"function laplacianFilter(r, isLow, threshold)\n",
|
|||
|
" -r.^2\n",
|
|||
|
"end\n",
|
|||
|
"\n",
|
|||
|
"function filterFactory(name, shape, isLow, threshold, other)\n",
|
|||
|
" n, m = shape\n",
|
|||
|
" r = sqrt.([i^2 + j^2 for i=-n/2:n/2-1, j=-m/2:m/2-1])\n",
|
|||
|
"\n",
|
|||
|
" if name == \"Ideal\"\n",
|
|||
|
" idealFilter(r, isLow, threshold)\n",
|
|||
|
" elseif name == \"Gaussian\"\n",
|
|||
|
" gaussianFilter(r, isLow, threshold)\n",
|
|||
|
" elseif name == \"Butterworth\"\n",
|
|||
|
" butterworthFilter(r, isLow, threshold, other)\n",
|
|||
|
" elseif name == \"Laplacian\"\n",
|
|||
|
" laplacianFilter(r, isLow, threshold)\n",
|
|||
|
" else\n",
|
|||
|
" error(\"Filter not found\")\n",
|
|||
|
" end\n",
|
|||
|
"end"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 13,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"720×1280 Array{Float32,2}:\n",
|
|||
|
" 0.125623 0.133808 0.142699 … 0.105667 0.111525 0.118184 \n",
|
|||
|
" 0.120721 0.127849 0.135616 0.103504 0.108524 0.114269 \n",
|
|||
|
" 0.115489 0.121567 0.12822 0.100998 0.105183 0.110019 \n",
|
|||
|
" 0.110158 0.115214 0.120783 0.0983235 0.101694 0.105643 \n",
|
|||
|
" 0.104962 0.109044 0.113579 0.0956583 0.0982531 0.101358 \n",
|
|||
|
" 0.100126 0.103299 0.10687 … 0.0931787 0.0950526 0.0973715\n",
|
|||
|
" 0.0958562 0.0982011 0.10089 0.0910495 0.0922702 0.0938749\n",
|
|||
|
" 0.092331 0.0939393 0.0958441 0.0894156 0.0900616 0.091035 \n",
|
|||
|
" 0.0896915 0.0906639 0.0918893 0.0883944 0.0885514 0.0889848\n",
|
|||
|
" 0.0880352 0.0884776 0.0891341 0.0880694 0.0878278 0.0878168\n",
|
|||
|
" 0.0874112 0.0874311 0.0876312 … 0.0884856 0.0879368 0.0875786\n",
|
|||
|
" 0.0878176 0.0875212 0.0873754 0.0896464 0.0888801 0.0882699\n",
|
|||
|
" 0.0892011 0.0886895 0.0883038 0.0915127 0.0906137 0.0898423\n",
|
|||
|
" ⋮ ⋱ \n",
|
|||
|
" 0.11068 0.12517 0.141065 0.07604 0.0860907 0.0976428\n",
|
|||
|
" 0.117359 0.132047 0.148102 0.0819347 0.0922755 0.10409 \n",
|
|||
|
" 0.123356 0.138094 0.154157 … 0.0875451 0.0980505 0.109995 \n",
|
|||
|
" 0.128509 0.143149 0.159066 0.0927211 0.103262 0.115199 \n",
|
|||
|
" 0.132679 0.147073 0.16269 0.097326 0.107771 0.119565 \n",
|
|||
|
" 0.135758 0.149761 0.164929 0.101242 0.111463 0.122978 \n",
|
|||
|
" 0.13767 0.151144 0.165722 0.104376 0.114251 0.125358 \n",
|
|||
|
" 0.13838 0.151197 0.165056 … 0.106666 0.116079 0.12666 \n",
|
|||
|
" 0.137893 0.14994 0.162963 0.108082 0.116929 0.126876 \n",
|
|||
|
" 0.136261 0.14744 0.159528 0.10863 0.116822 0.126042 \n",
|
|||
|
" 0.133577 0.143809 0.154883 0.108353 0.115817 0.124233 \n",
|
|||
|
" 0.129974 0.139202 0.149202 0.107329 0.114008 0.121565 "
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 13,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"imagePath = \"../images/f124074.jpg\"\n",
|
|||
|
"filterName = \"Ideal\"\n",
|
|||
|
"filterLow = true\n",
|
|||
|
"filterThreshold = 30\n",
|
|||
|
"filterOther = 0\n",
|
|||
|
"\n",
|
|||
|
"img = load(imagePath)\n",
|
|||
|
"img_gray = Float32.(Gray.(img))\n",
|
|||
|
"filter = filterFactory(filterName, size(img_gray), filterLow, filterThreshold, filterOther)\n",
|
|||
|
"img_fft = fftshift(fft(img_gray))\n",
|
|||
|
"out = abs.(real.(ifft(img_fft .* filter)))"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 18,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABQAAAALQCAIAAABAH0oBAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAACAAElEQVR42rz92dMlSXYfiJ3fcY+4y7fkl2tV1tZV3dVVvaPR3VgIggBBcigKokTSRibTg2QmzYP0V+hRzzIbMy0vYzYyG5NJmqHN0IZGDkECBNFANwA2eq2u7urat9zzy2+9S4T7OXrwJTzixv0ys4FRWFrV/e6N8HA/ftz9LL9zDiYv/7qCiIjC/zj8QUQkIFImIiLO30MlflNcAIihqvFv5d5PxY1d48ThJ47NEhGxkiC9nEkptMm5wfQrAVAQAJL4UlYW5IYRHgFR7lV4nZTdIYYSAChJ7rJ2dygJjKHRKxIk3Zx6CJZymF1T2NbOlu83rj4lKY6xmy+UP0nZUSCQJZGChYgDfYB4P/r3swLhfonUpsQJxbsGXaI0lXl2cjdU0U3Z9nFtshy069iAoGMfScObNt+ltnwdNqZD4q9Mw4uBoheU6cblg9arTieNCKsaZvFKDFZyTKzEBFI11jqo976GcdDYDkzqJ6uqcjFg5u4tqgCYuRwvADJccnh+uBg7E5HyyEyFpvpUKrkokEgGSyb+T7s2C+IQij9LIoelykqeSRgKgpIBmCOPeNI8fUQEtuwdM7dQFWMJRKSGiGt3o96Z7DSXL08nk7Y5XxweTj46dgKLpmUH2q0BxZm4imxF6nt0iLSSxN7FTkWptxDNBMxjTB0bkld6Xwb6lftSeQXOFNL8nEKMMdZavjF363Z1suDGswcroaoF5L0n5ytitdyqAKg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.212) … RGB{N0f8}(0.02,0.114,0.224) \n",
|
|||
|
" RGB{N0f8}(0.024,0.129,0.212) RGB{N0f8}(0.02,0.114,0.224) \n",
|
|||
|
" RGB{N0f8}(0.024,0.129,0.212) RGB{N0f8}(0.02,0.114,0.224) \n",
|
|||
|
" RGB{N0f8}(0.024,0.125,0.216) RGB{N0f8}(0.02,0.114,0.224) \n",
|
|||
|
" RGB{N0f8}(0.024,0.125,0.216) RGB{N0f8}(0.02,0.114,0.224) \n",
|
|||
|
" RGB{N0f8}(0.027,0.129,0.22) … RGB{N0f8}(0.02,0.114,0.224) \n",
|
|||
|
" RGB{N0f8}(0.027,0.129,0.22) RGB{N0f8}(0.02,0.114,0.224) \n",
|
|||
|
" RGB{N0f8}(0.027,0.129,0.22) RGB{N0f8}(0.02,0.114,0.224) \n",
|
|||
|
" RGB{N0f8}(0.024,0.129,0.212) RGB{N0f8}(0.031,0.114,0.235)\n",
|
|||
|
" RGB{N0f8}(0.024,0.129,0.212) RGB{N0f8}(0.031,0.114,0.235)\n",
|
|||
|
" RGB{N0f8}(0.024,0.129,0.212) … RGB{N0f8}(0.024,0.114,0.235)\n",
|
|||
|
" RGB{N0f8}(0.024,0.129,0.212) RGB{N0f8}(0.024,0.114,0.235)\n",
|
|||
|
" RGB{N0f8}(0.024,0.125,0.216) RGB{N0f8}(0.02,0.122,0.227) \n",
|
|||
|
" ⋮ ⋱ \n",
|
|||
|
" RGB{N0f8}(0.067,0.063,0.086) RGB{N0f8}(0.016,0.125,0.18) \n",
|
|||
|
" RGB{N0f8}(0.075,0.063,0.098) RGB{N0f8}(0.016,0.129,0.192)\n",
|
|||
|
" RGB{N0f8}(0.071,0.067,0.098) … RGB{N0f8}(0.02,0.133,0.196) \n",
|
|||
|
" RGB{N0f8}(0.059,0.071,0.098) RGB{N0f8}(0.02,0.133,0.196) \n",
|
|||
|
" RGB{N0f8}(0.043,0.063,0.075) RGB{N0f8}(0.02,0.133,0.196) \n",
|
|||
|
" RGB{N0f8}(0.059,0.051,0.106) RGB{N0f8}(0.016,0.129,0.192)\n",
|
|||
|
" RGB{N0f8}(0.063,0.055,0.098) RGB{N0f8}(0.02,0.125,0.192) \n",
|
|||
|
" RGB{N0f8}(0.047,0.067,0.082) … RGB{N0f8}(0.016,0.125,0.18) \n",
|
|||
|
" RGB{N0f8}(0.043,0.059,0.094) RGB{N0f8}(0.016,0.125,0.18) \n",
|
|||
|
" RGB{N0f8}(0.071,0.075,0.094) RGB{N0f8}(0.016,0.125,0.18) \n",
|
|||
|
" RGB{N0f8}(0.059,0.063,0.078) RGB{N0f8}(0.016,0.122,0.188)\n",
|
|||
|
" RGB{N0f8}(0.067,0.063,0.125) RGB{N0f8}(0.016,0.122,0.188)"
|
|||
|
]
|
|||
|
},
|
|||
|
"metadata": {},
|
|||
|
"output_type": "display_data"
|
|||
|
},
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABQAAAALQCAAAAADqFoKKAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAIAASURBVHjanP1tYuQ4zzOMkqq693H2v8UnFs8PiQRAydVzvTXTnXRiW18UBJCU7P+/MT7jQ5/xGWMMH+7mZmZhYREWEetbMzPz9cfN9iURMWfM+cz57P/mnDEjLMzNfYxV0Pfz+a6/xuczxvBh7vmIiBkx13e2b3R39+E+1ndmti6dc875zOeZzzPnM2fMmBaxquf5sWxHtmS1Zv3E8ulj+Gr1qHL4pvpv3Yg+oK9ef3z95dlDeeG61XcFLYte/2nBuztmzNWtq1d26/Lu1bSsJ/Xg6r8wC7800VdR5m7SRGpl9U+2Ni9ZpWQR+e/sVqnDrMGckXWPNJtV9+ollMTFu62rnAZzX71NclKDq73ZsbAaaWpVMu+qIj0Lpf+tV066KvvprGkNpe9bAyNkMpXEllBSPl9tDt9Eu47HzC+PpOrrlTCjanHU8y3oKp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Q0bq7jzvGqkr6uu0vhrNtzIOIH5jqmwNzQUYETFHTMqbiBzKFoJEQrQgIBXjJbXR9Stf21wBkC0C5NyCtdX28LNZX2gfETXWZGoe6G+RF+0bo/uPeU/80DP3K5Kt45qDkTJFkXnd0I841+FF9o1+s69DkV7r0Az4oDldLIWEiXpNiAAqrLXFRxG5LuYe3it4ky7tqWHfmiPB31SHmNoHZSlWsKbFBLgxN7isWqrvSTgU1TizgmAeIkvIHo8QFTpD8rhrUWtujeAe7NbIM7nGrNwKfJWwFXLEpx1gmSp8zqwB37HdbSWpKnhqp+lkEO70D0i
|
|||
|
"text/plain": [
|
|||
|
"720×1280 Array{Gray{Float32},2} with eltype Gray{Float32}:\n",
|
|||
|
" Gray{Float32}(0.125623) … Gray{Float32}(0.118184) \n",
|
|||
|
" Gray{Float32}(0.120721) Gray{Float32}(0.114269) \n",
|
|||
|
" Gray{Float32}(0.115489) Gray{Float32}(0.110019) \n",
|
|||
|
" Gray{Float32}(0.110158) Gray{Float32}(0.105643) \n",
|
|||
|
" Gray{Float32}(0.104962) Gray{Float32}(0.101358) \n",
|
|||
|
" Gray{Float32}(0.100126) … Gray{Float32}(0.0973715)\n",
|
|||
|
" Gray{Float32}(0.0958562) Gray{Float32}(0.0938749)\n",
|
|||
|
" Gray{Float32}(0.092331) Gray{Float32}(0.091035) \n",
|
|||
|
" Gray{Float32}(0.0896915) Gray{Float32}(0.0889848)\n",
|
|||
|
" Gray{Float32}(0.0880352) Gray{Float32}(0.0878168)\n",
|
|||
|
" Gray{Float32}(0.0874112) … Gray{Float32}(0.0875786)\n",
|
|||
|
" Gray{Float32}(0.0878176) Gray{Float32}(0.0882699)\n",
|
|||
|
" Gray{Float32}(0.0892011) Gray{Float32}(0.0898423)\n",
|
|||
|
" ⋮ ⋱ \n",
|
|||
|
" Gray{Float32}(0.11068) Gray{Float32}(0.0976428)\n",
|
|||
|
" Gray{Float32}(0.117359) Gray{Float32}(0.10409) \n",
|
|||
|
" Gray{Float32}(0.123356) … Gray{Float32}(0.109995) \n",
|
|||
|
" Gray{Float32}(0.128509) Gray{Float32}(0.115199) \n",
|
|||
|
" Gray{Float32}(0.132679) Gray{Float32}(0.119565) \n",
|
|||
|
" Gray{Float32}(0.135758) Gray{Float32}(0.122978) \n",
|
|||
|
" Gray{Float32}(0.13767) Gray{Float32}(0.125358) \n",
|
|||
|
" Gray{Float32}(0.13838) … Gray{Float32}(0.12666) \n",
|
|||
|
" Gray{Float32}(0.137893) Gray{Float32}(0.126876) \n",
|
|||
|
" Gray{Float32}(0.136261) Gray{Float32}(0.126042) \n",
|
|||
|
" Gray{Float32}(0.133577) Gray{Float32}(0.124233) \n",
|
|||
|
" Gray{Float32}(0.129974) Gray{Float32}(0.121565) "
|
|||
|
]
|
|||
|
},
|
|||
|
"metadata": {},
|
|||
|
"output_type": "display_data"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"display(img)\n",
|
|||
|
"display(Gray.(out))"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"metadata": {
|
|||
|
"kernelspec": {
|
|||
|
"display_name": "Julia 1.2.0-DEV",
|
|||
|
"language": "julia",
|
|||
|
"name": "julia-1.2"
|
|||
|
},
|
|||
|
"language_info": {
|
|||
|
"file_extension": ".jl",
|
|||
|
"mimetype": "application/julia",
|
|||
|
"name": "julia",
|
|||
|
"version": "1.2.0"
|
|||
|
}
|
|||
|
},
|
|||
|
"nbformat": 4,
|
|||
|
"nbformat_minor": 2
|
|||
|
}
|