diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0509c59 --- /dev/null +++ b/.gitignore @@ -0,0 +1,314 @@ +# Created by https://www.toptal.com/developers/gitignore/api/latex +# Edit at https://www.toptal.com/developers/gitignore?templates=latex + +### LaTeX ### +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 +.*.lb + +## Intermediate documents: +*.dvi +*.xdv +*-converted-to.* +# these rules might exclude image files for figures etc. +# *.ps +# *.eps +# *.pdf + +## Generated if empty string is given at "Please type another file name for output:" +.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex +*.synctex(busy) +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Build tool directories for auxiliary files +# latexrun +latex.out/ + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# comment +*.cut + +# cprotect +*.cpt + +# elsarticle (documentclass of Elsevier journals) +*.spl + +# endnotes +*.ent + +# fixme +*.lox + +# feynmf/feynmp +*.mf +*.mp +*.t[1-9] +*.t[1-9][0-9] +*.tfm + +#(r)(e)ledmac/(r)(e)ledpar +*.end +*.?end +*.[1-9] +*.[1-9][0-9] +*.[1-9][0-9][0-9] +*.[1-9]R +*.[1-9][0-9]R +*.[1-9][0-9][0-9]R +*.eledsec[1-9] +*.eledsec[1-9]R +*.eledsec[1-9][0-9] +*.eledsec[1-9][0-9]R +*.eledsec[1-9][0-9][0-9] +*.eledsec[1-9][0-9][0-9]R + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls +*.glsdefs +*.lzo +*.lzs +*.slg +*.slo +*.sls + +# uncomment this for glossaries-extra (will ignore makeindex's style files!) +# *.ist + +# gnuplot +*.gnuplot +*.table + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.glog +*.gtex + +# htlatex +*.4ct +*.4tc +*.idv +*.lg +*.trc +*.xref + +# hyperref +*.brf + +# knitr +*-concordance.tex +# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files +# *.tikz +*-tikzDictionary + +# listings +*.lol + +# luatexja-ruby +*.ltjruby + +# makeidx +*.idx +*.ilg +*.ind + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# newpax +*.newpax + +# nomencl +*.nlg +*.nlo +*.nls + +# pax +*.pax + +# pdfpcnotes +*.pdfpc + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# svg +svg-inkscape/ + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# tcolorbox +*.listing + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# titletoc +*.ptc + +# todonotes +*.tdo + +# vhistory +*.hst +*.ver + +# easy-todo +*.lod + +# xcolor +*.xcp + +# xmpincl +*.xmpi + +# xindy +*.xdy + +# xypic precompiled matrices and outlines +*.xyc +*.xyd + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# LyX +*.lyx~ + +# Kile +*.backup + +# gummi +.*.swp + +# KBibTeX +*~[0-9]* + +# TeXnicCenter +*.tps + +# auto folder when using emacs and auctex +./auto/* +*.el + +# expex forward references with \gathertags +*-tags.tex + +# standalone packages +*.sta + +# Makeindex log files +*.lpz + +# xwatermark package +*.xwm + +# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib +# option is specified. Footnotes are the stored in a file with suffix Notes.bib. +# Uncomment the next line to have this generated file ignored. +#*Notes.bib + +### LaTeX Patch ### +# LIPIcs / OASIcs +*.vtc + +# glossaries +*.glstex + +# End of https://www.toptal.com/developers/gitignore/api/latex diff --git a/.zed/tasks.json b/.zed/tasks.json new file mode 100644 index 0000000..4f85cd3 --- /dev/null +++ b/.zed/tasks.json @@ -0,0 +1,9 @@ +// .zed/tasks.json +[ + { + "label": "Forward Search", + "command": "zathura --synctex-forward \"$ZED_ROW:$ZED_COLUMN:$ZED_FILE\" -x 'zed %{input}:%{line}' main.pdf", + "allow_concurrent_runs": true, + "reveal": "never" + } +] diff --git a/OCRudoku_first_defense.pdf b/OCRudoku_first_defense.pdf deleted file mode 100644 index 088aaf8..0000000 --- a/OCRudoku_first_defense.pdf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bb3fe8b260cdaea2138f1035e710189be1bc9deb8ef06bb895df28cbfef410bc -size 130968 diff --git a/main.pdf b/main.pdf new file mode 100644 index 0000000..f524983 --- /dev/null +++ b/main.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c91e75fe3e64df1791590c85ff2b86be6c4d243b5d585812139e281256a66fb0 +size 169083 diff --git a/main.tex b/main.tex index d9f1869..06b6527 100644 --- a/main.tex +++ b/main.tex @@ -9,7 +9,7 @@ -\title{First Defense Report} +\title{First Defense Report test} \author{ Lilian Labat, Luca De-Donno, Louis Gallet } \date{November 2024} diff --git a/sections/partie-technique/IA/IA.tex b/sections/partie-technique/IA/IA.tex new file mode 100644 index 0000000..e69de29 diff --git a/sections/partie-technique/OCR/ocr.tex b/sections/partie-technique/OCR/ocr.tex new file mode 100644 index 0000000..7fba648 --- /dev/null +++ b/sections/partie-technique/OCR/ocr.tex @@ -0,0 +1 @@ +Currently, we have not yet started implementing the OCR. For the first project review, we initially aimed to deliver a functional OCR for simple images. However, we realized that this part of the project is very challenging. We have therefore decided to delay its start, focusing first on completing the image processing functions and the initial AI algorithms. This will allow us to fully concentrate on the OCR afterward. diff --git a/sections/partie-technique/partie-technique.tex b/sections/partie-technique/partie-technique.tex index 08ae1dc..3fa054f 100644 --- a/sections/partie-technique/partie-technique.tex +++ b/sections/partie-technique/partie-technique.tex @@ -1,2 +1,11 @@ This section aims to explain each part of the project from a technical perspective. It includes the libraries used, the various applications related to the project, how the project is built, and more. +\subsection{Traitement de l'image} +\input{sections/partie-technique/traitement-image/traitement-image} + +\subsection{OCR} +\input{sections/partie-technique/OCR/ocr.tex} + + +\subsection{Artificial Intelligence} +\input{sections/partie-technique/IA/IA.tex} diff --git a/sections/partie-technique/traitement-image/image-baw/image-baw.tex b/sections/partie-technique/traitement-image/image-baw/image-baw.tex new file mode 100644 index 0000000..f6d5f92 --- /dev/null +++ b/sections/partie-technique/traitement-image/image-baw/image-baw.tex @@ -0,0 +1,5 @@ +The second step of the process involves converting each pixel from grayscale to black and white. This further simplifies the image by retaining only two colors: black and white. As a result, the OCR can more effectively recognize different characters and process the information more quickly, since it only has to differentiate between two color values: black and white. + +To complete this process, the functions \verb'void pixel_to_black_white' and \verb'void pixel_to_grayscale' are executed sequentially. This results in an output image in grayscale. + +TODO: Add some images to illustrate the process. diff --git a/sections/partie-technique/traitement-image/pixel-baw/pixel-baw.tex b/sections/partie-technique/traitement-image/pixel-baw/pixel-baw.tex new file mode 100644 index 0000000..7641151 --- /dev/null +++ b/sections/partie-technique/traitement-image/pixel-baw/pixel-baw.tex @@ -0,0 +1,3 @@ +La deuxième partie du processus consiste à transformer chaque pixel en nuance de gris en pixel black and white. Cela permet de simplifier encore plus l'image en ne gardant que deux couleurs, le blanc et le noir. Cela permet ensuite à l'OCR de mieux reconnaître les différentes lettres et de traiter les informations plus rapidement car il n'a plus que deux informations de couleurs, soit du noir, soit du blanc. + +Cette conversion est assuré par la fonction \verb'void pixel_to_black_white'. Elle prends en paramètre un \verb|void* pixel|, \verb|SDL_PixelFormat* format| et \verb|Uint8 threshold|. La fonction applique le traitement directement sur l'image. \ No newline at end of file diff --git a/sections/partie-technique/traitement-image/pixel-grayscale/pixel-grayscale.tex b/sections/partie-technique/traitement-image/pixel-grayscale/pixel-grayscale.tex new file mode 100644 index 0000000..721e32b --- /dev/null +++ b/sections/partie-technique/traitement-image/pixel-grayscale/pixel-grayscale.tex @@ -0,0 +1,3 @@ +The first step of the process involves converting each pixel to grayscale. This simplification removes most color information from the image, enabling the OCR to better recognize different characters and process the information more quickly since it no longer has to deal with color data. + +This conversion is handled by the function \verb'void pixel_to_grayscale'. It takes as parameters a \verb|void* pixel| and an \verb|SDL_PixelFormat*format|, applying the necessary processing to achieve the grayscale effect. \ No newline at end of file diff --git a/sections/partie-technique/traitement-image/traitement-image.tex b/sections/partie-technique/traitement-image/traitement-image.tex new file mode 100644 index 0000000..a68cfe6 --- /dev/null +++ b/sections/partie-technique/traitement-image/traitement-image.tex @@ -0,0 +1,10 @@ +Cette sous section détaille le processus de traitement d'image utilisé dans notre logiciel, afin de la préparer pour qu'elle soit analyser de la meilleure des façons par l'OCR\footnote{cf. section X.X sur l'OCR}. Pour ce faire, nous faisons passer l'image par plusieurs étapes avant de l'envoyer à l'OCR. + +\subsubsection{Transformer les pixels en nuances de gris} +\input{sections/partie-technique/traitement-image/pixel-grayscale/pixel-grayscale} + +\subsubsection{Transformer les pixels en blank and white} +\input{sections/partie-technique/traitement-image/pixel-baw/pixel-baw} + +\subsubsection{Transformer l'image en nuance de gris} +\input{sections/partie-technique/traitement-image/image-baw/image-baw} \ No newline at end of file diff --git a/sections/repartition-des-taches/repartition-des-taches.tex b/sections/repartition-des-taches/repartition-des-taches.tex index ef29ce2..0ec94bf 100644 --- a/sections/repartition-des-taches/repartition-des-taches.tex +++ b/sections/repartition-des-taches/repartition-des-taches.tex @@ -38,8 +38,6 @@ GUI Implementation & Secondary & Principal & \\ \hline \newpage -\subsection{OCR} -\input{sections/repartition-des-taches/OCR/ocr} \subsection{Project Management} \input{sections/repartition-des-taches/gestion-du-projet/gestion-du-projet}