ajout debut apres midi

This commit is contained in:
François Pelletier 2015-09-26 12:56:43 -04:00
parent cabf94c690
commit 8c3c093c7e
28 changed files with 390 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

View file

@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 0
}

View file

@ -0,0 +1,117 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from scipy import ndimage as ndi\n",
"\n",
"from skimage import feature\n",
"from scipy import misc\n",
"fimg = misc.imread(\"contourV1.png\")\n",
"\n",
"from skimage import measure"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"from skimage import color\n",
"gimg = color.colorconv.rgb2grey(fimg)\n",
"edges1 = feature.canny(gimg)\n",
"edges2 = feature.canny(gimg, sigma=5.5)"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"fig, (ax1, ax2, ax3) = plt.subplots(nrows=1, ncols=3, figsize=(8, 3))\n",
"\n",
"ax1.imshow(gimg, cmap=plt.cm.jet)\n",
"ax1.axis('off')\n",
"ax1.set_title('noisy image', fontsize=20)\n",
"\n",
"ax2.imshow(edges1, cmap=plt.cm.gray)\n",
"ax2.axis('off')\n",
"ax2.set_title('Canny filter, $\\sigma=1$', fontsize=20)\n",
"\n",
"ax3.imshow(edges2, cmap=plt.cm.gray)\n",
"ax3.axis('off')\n",
"ax3.set_title('Canny filter, $\\sigma=5$', fontsize=20)\n",
"\n",
"fig.subplots_adjust(wspace=0.02, hspace=0.02, top=0.9,\n",
" bottom=0.02, left=0.02, right=0.98)\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"contours = measure.find_contours(gimg, 0.8)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"fig2, ax2 = plt.subplots()\n",
"ax2.imshow(gimg, interpolation='nearest', cmap=plt.cm.gray)\n",
"\n",
"for n, contour in enumerate(contours):\n",
" ax2.plot(contour[:, 1], contour[:, 0], linewidth=2)\n",
"\n",
"ax2.axis('image')\n",
"ax2.set_xticks([])\n",
"ax2.set_yticks([])\n",
"plt.show()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 0
}

View file

@ -0,0 +1,146 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from scipy import misc"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"fimg = misc.imread(\"contourV1.png\")"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from skimage import color"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"gimg = color.colorconv.rgb2grey(fimg)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from skimage import measure\n",
"contours = measure.find_contours(gimg, 0.8)"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
" \n",
"for n, contour in enumerate(contours):\n",
" plt.plot(contour[:, 1], contour[:, 0], linewidth=2)"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x7f3b9eaa60d0>]"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from skimage.draw import ellipse\n",
"from skimage.measure import find_contours, approximate_polygon, subdivide_polygon\n",
" \n",
"contour = contours[0]\n",
"new_s = contour.copy()\n",
"appr_s = approximate_polygon(new_s, tolerance=0.8)\n",
" \n",
"fig, (ax1, ax2) = plt.subplots(ncols=2, figsize=(9, 4))\n",
"ax2.plot(contour[:, 0], contour[:, 1])\n",
"ax1.plot(appr_s[:, 0], appr_s[:, 1])"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"plt.show()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 0
}

View file

@ -0,0 +1,117 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from scipy import ndimage as ndi\n",
"\n",
"from skimage import feature\n",
"from scipy import misc\n",
"fimg = misc.imread(\"contourV1.png\")\n",
"\n",
"from skimage import measure"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"from skimage import color\n",
"gimg = color.colorconv.rgb2grey(fimg)\n",
"edges1 = feature.canny(gimg)\n",
"edges2 = feature.canny(gimg, sigma=5.5)"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"fig, (ax1, ax2, ax3) = plt.subplots(nrows=1, ncols=3, figsize=(8, 3))\n",
"\n",
"ax1.imshow(gimg, cmap=plt.cm.jet)\n",
"ax1.axis('off')\n",
"ax1.set_title('noisy image', fontsize=20)\n",
"\n",
"ax2.imshow(edges1, cmap=plt.cm.gray)\n",
"ax2.axis('off')\n",
"ax2.set_title('Canny filter, $\\sigma=1$', fontsize=20)\n",
"\n",
"ax3.imshow(edges2, cmap=plt.cm.gray)\n",
"ax3.axis('off')\n",
"ax3.set_title('Canny filter, $\\sigma=5$', fontsize=20)\n",
"\n",
"fig.subplots_adjust(wspace=0.02, hspace=0.02, top=0.9,\n",
" bottom=0.02, left=0.02, right=0.98)\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"contours = measure.find_contours(gimg, 0.9)"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"fig2, ax2 = plt.subplots()\n",
"ax2.imshow(gimg, interpolation='nearest', cmap=plt.cm.gray)\n",
"\n",
"for n, contour in enumerate(contours):\n",
" ax2.plot(contour[:, 1], contour[:, 0], linewidth=2)\n",
"\n",
"ax2.axis('image')\n",
"ax2.set_xticks([])\n",
"ax2.set_yticks([])\n",
"plt.show()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 0
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

View file

@ -0,0 +1,4 @@
Numéro d'inventaire Artiste Culture Titre Date de production Technique d'expression Dimensions Lieu de production Sujet Description Collection Département Catégorie Objet Nombre d'objets Mention MAJ des informations
1989.295.08 "Éditions internationales Alain Stanké ltée
Lemieux, Jean Paul" Canadienne; Québécoise François Paradis, du livre illustré Jean Paul Lemieux retrouve Maria Chapdelaine 1981 Photolithographie, 2522/5000 45,8 x 30,6 cm (papier); 35 x 28 cm (image) Montréal (Québec), Canada Portrait Costumes civils accessoires couvre-chef chapeau, vêtements gilet veston; Personnages groupes humains jeune homme héros du roman (1913) de l'écrivain québécois d'origine française Louis Hémon (1880-1913) et amoureux de Maria Chapdelaine, métiers et professions coureur des bois, portrait en buste de face; Géographie physique accidents géographiques champ, phénomènes naturels neige, saison : hiver; Localisation : Péribonka, Lac Saint-Jean Ouest, Québec, Canada Collection permanente Art contemporain (1950-2000) Arts graphiques Estampe (livre illustré) 1 Legs Marcel Carbotte 02-juil-15
1 Numéro d'inventaire Artiste Culture Titre Date de production Technique d'expression Dimensions Lieu de production Sujet Description Collection Département Catégorie Objet Nombre d'objets Mention MAJ des informations
2 1989.295.08 Éditions internationales Alain Stanké ltée Lemieux, Jean Paul Canadienne; Québécoise François Paradis, du livre illustré Jean Paul Lemieux retrouve Maria Chapdelaine 1981 Photolithographie, 2522/5000 45,8 x 30,6 cm (papier); 35 x 28 cm (image) Montréal (Québec), Canada Portrait Costumes civils accessoires couvre-chef chapeau, vêtements gilet veston; Personnages groupes humains jeune homme héros du roman (1913) de l'écrivain québécois d'origine française Louis Hémon (1880-1913) et amoureux de Maria Chapdelaine, métiers et professions coureur des bois, portrait en buste de face; Géographie physique accidents géographiques champ, phénomènes naturels neige, saison : hiver; Localisation : Péribonka, Lac Saint-Jean Ouest, Québec, Canada Collection permanente Art contemporain (1950-2000) Arts graphiques Estampe (livre illustré) 1 Legs Marcel Carbotte 02-juil-15

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB