Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
Forest Monitoring
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GPSE
Promo2025
Forest Monitoring
Commits
7cf55aa5
Commit
7cf55aa5
authored
Apr 27, 2024
by
Quentin Chabanne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
731d5503
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
142 additions
and
0 deletions
+142
-0
calcul_espace_stockage.ipynb
... Document (by the 2022 team)/calcul_espace_stockage.ipynb
+142
-0
No files found.
Tecnhical Document (by the 2022 team)/calcul_espace_stockage.ipynb
0 → 100644
View file @
7cf55aa5
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import scipy.signal as sig\n",
"from matplotlib import pyplot as plt #library to plot figures"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Calcul de l'espace nécessaire pour stocker les photos\n",
"\n",
"Temps : 4 mois\n",
"\n",
"Format : raw ou jpeg\n",
"\n",
"Résolutions existantes : 4608x3456, 3264x2448, 2336x1752"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"resL = [4608, 3456]\n",
"resM = [3264, 2448]\n",
"resS = [2336, 1752]\n",
"\n",
"type_res = [\"large\", \"medium\", \"small\"]\n",
"\n",
"res = [resL[0]*resL[1], resM[0]*resM[1], resS[0]*resS[1]]"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"En partant du principe que chaque canal R, G et B est codé sur 8 bits, on a donc 24 bits par pixel."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"nombre de bits d'une image (large) : 382205952 bits, soit 47775744.0 bytes\n",
"poids d'une image (large) : 45.5625 Mbytes\n",
"nombre de bits d'une image (medium) : 191766528 bits, soit 23970816.0 bytes\n",
"poids d'une image (medium) : 22.8603515625 Mbytes\n",
"nombre de bits d'une image (small) : 98224128 bits, soit 12278016.0 bytes\n",
"poids d'une image (small) : 11.709228515625 Mbytes\n"
]
}
],
"source": [
"nbBitsImage = [res[0]*24, res[1]*24, res[2]*24] #nombre de bits dans une image\n",
"nbBitPixel = 24\n",
"\n",
"for i in range(len(nbBitsImage)):\n",
" print(f\"nombre de bits d'une image ({type_res[i]}) : {nbBitsImage[i]} bits, soit {nbBitsImage[i]/8} bytes\")\n",
" print(f\"poids d'une image ({type_res[i]}) : {(nbBitsImage[i]/8)/(1024*1024)} Mbytes\") "
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"Sur le temps long, on doit prendre deux images par jour, et avoir une durée assez longue (environ 4 mois)."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"espace nécessaire pour 4 mois sur une image de type large : 10.6787109375 Gigabytes\n",
"espace nécessaire pour 4 mois sur une image de type medium : 5.3578948974609375 Gigabytes\n",
"espace nécessaire pour 4 mois sur une image de type small : 2.7443504333496094 Gigabytes\n"
]
}
],
"source": [
"T = 120 #nombre de jours dans 4 mois\n",
"\n",
"nbPhotos = T*2\n",
"espace = np.zeros(3)\n",
"\n",
"for i in range(3):\n",
" espace[i] = ((nbBitsImage[i]/8)/(1024*1024)) * nbPhotos\n",
"\n",
"for i in range(3):\n",
" print(f\"espace nécessaire pour 4 mois sur une image de type {type_res[i]} : {espace[i]/1024} Gigabytes\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "base",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.7"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "500f5463fac522d16f5fb9404df998bb0ad5e12309a861215c38bf8abd0287f6"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment