image-processor-package 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,105 @@
1
+ Metadata-Version: 2.4
2
+ Name: image_processor_package
3
+ Version: 0.0.1
4
+ Summary: Pacote de processamento de imagens com funcionalidades avançadas.
5
+ Home-page: https://github.com/Jotabelde
6
+ Author: João Pedro Fialho Lopes
7
+ Author-email: jotabelde@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.8
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.8
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: scikit-image>=0.18.3
16
+ Requires-Dist: numpy>=1.21.0
17
+ Requires-Dist: matplotlib>=3.4.3
18
+ Requires-Dist: scipy>=1.7.1
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: classifier
22
+ Dynamic: description
23
+ Dynamic: description-content-type
24
+ Dynamic: home-page
25
+ Dynamic: requires-dist
26
+ Dynamic: requires-python
27
+ Dynamic: summary
28
+
29
+
30
+ # 📷 Image Processor Package
31
+
32
+ Pacote Python para **processamento e análise de imagens**, com funcionalidades para leitura, salvamento, redimensionamento, comparação por similaridade, ajuste de histograma e visualização gráfica.
33
+
34
+ ---
35
+
36
+ ## ✨ Funcionalidades
37
+
38
+ - ✅ Leitura e salvamento de imagens (`.jpg`, `.png`, etc.)
39
+ - ✅ Conversão para escala de cinza
40
+ - ✅ Comparação de similaridade entre imagens (SSIM)
41
+ - ✅ Ajuste de histograma entre imagens
42
+ - ✅ Redimensionamento com suavização
43
+ - ✅ Visualização com gráficos e histogramas
44
+
45
+ ---
46
+
47
+ ## 📦 Instalação
48
+
49
+ ```bash
50
+ pip install image-processor-package
51
+ ```
52
+
53
+ > **Requisitos**: Python 3.8+
54
+
55
+ ---
56
+
57
+ ## 🧠 Estrutura do Projeto
58
+
59
+ ```
60
+ image_processor_package/
61
+ ├── main.py
62
+ ├── processing/
63
+ │ ├── compilation.py # Funções de comparação e histograma
64
+ │ └── transformation.py # Funções de redimensionamento
65
+ ├── utils/
66
+ │ ├── io.py # Leitura e salvamento de imagem
67
+ │ └── visualization.py # Funções de plotagem
68
+ ```
69
+
70
+ ---
71
+
72
+ ## 🧪 Exemplo de Uso
73
+
74
+ ```python
75
+ from processing.compilation import find_diference, match_histogram
76
+ from processing.transformation import resize_image
77
+ from utils.io import read_image, save_image
78
+ from utils.visualization import plot_result
79
+
80
+ image1 = read_image("caminho/para/imagem1.jpg")
81
+ image2 = read_image("caminho/para/imagem2.jpg")
82
+
83
+ image1_resized = resize_image(0.5, image1)
84
+ image2_resized = resize_image(0.5, image2)
85
+
86
+ image2_adjusted = match_histogram(image1_resized, image2_resized)
87
+ diferenca = find_diference(image1_resized, image2_adjusted)
88
+
89
+ plot_result(image1_resized, image2_adjusted, diferenca)
90
+ ```
91
+
92
+ ---
93
+
94
+ ## 👨‍💻 Autor
95
+
96
+ **João Pedro Fialho Lopes**
97
+ 📧 [jotabelde@gmail.com](mailto:jotabelde@gmail.com)
98
+ 🔗 [LinkedIn](https://www.linkedin.com/in/joaopedrofialho)
99
+ 📁 [GitHub](https://github.com/Jotabelde)
100
+
101
+ ---
102
+
103
+ ## 📝 Licença
104
+
105
+ Este projeto está licenciado sob os termos da **MIT License**.
@@ -0,0 +1,77 @@
1
+
2
+ # 📷 Image Processor Package
3
+
4
+ Pacote Python para **processamento e análise de imagens**, com funcionalidades para leitura, salvamento, redimensionamento, comparação por similaridade, ajuste de histograma e visualização gráfica.
5
+
6
+ ---
7
+
8
+ ## ✨ Funcionalidades
9
+
10
+ - ✅ Leitura e salvamento de imagens (`.jpg`, `.png`, etc.)
11
+ - ✅ Conversão para escala de cinza
12
+ - ✅ Comparação de similaridade entre imagens (SSIM)
13
+ - ✅ Ajuste de histograma entre imagens
14
+ - ✅ Redimensionamento com suavização
15
+ - ✅ Visualização com gráficos e histogramas
16
+
17
+ ---
18
+
19
+ ## 📦 Instalação
20
+
21
+ ```bash
22
+ pip install image-processor-package
23
+ ```
24
+
25
+ > **Requisitos**: Python 3.8+
26
+
27
+ ---
28
+
29
+ ## 🧠 Estrutura do Projeto
30
+
31
+ ```
32
+ image_processor_package/
33
+ ├── main.py
34
+ ├── processing/
35
+ │ ├── compilation.py # Funções de comparação e histograma
36
+ │ └── transformation.py # Funções de redimensionamento
37
+ ├── utils/
38
+ │ ├── io.py # Leitura e salvamento de imagem
39
+ │ └── visualization.py # Funções de plotagem
40
+ ```
41
+
42
+ ---
43
+
44
+ ## 🧪 Exemplo de Uso
45
+
46
+ ```python
47
+ from processing.compilation import find_diference, match_histogram
48
+ from processing.transformation import resize_image
49
+ from utils.io import read_image, save_image
50
+ from utils.visualization import plot_result
51
+
52
+ image1 = read_image("caminho/para/imagem1.jpg")
53
+ image2 = read_image("caminho/para/imagem2.jpg")
54
+
55
+ image1_resized = resize_image(0.5, image1)
56
+ image2_resized = resize_image(0.5, image2)
57
+
58
+ image2_adjusted = match_histogram(image1_resized, image2_resized)
59
+ diferenca = find_diference(image1_resized, image2_adjusted)
60
+
61
+ plot_result(image1_resized, image2_adjusted, diferenca)
62
+ ```
63
+
64
+ ---
65
+
66
+ ## 👨‍💻 Autor
67
+
68
+ **João Pedro Fialho Lopes**
69
+ 📧 [jotabelde@gmail.com](mailto:jotabelde@gmail.com)
70
+ 🔗 [LinkedIn](https://www.linkedin.com/in/joaopedrofialho)
71
+ 📁 [GitHub](https://github.com/Jotabelde)
72
+
73
+ ---
74
+
75
+ ## 📝 Licença
76
+
77
+ Este projeto está licenciado sob os termos da **MIT License**.
@@ -0,0 +1,105 @@
1
+ Metadata-Version: 2.4
2
+ Name: image_processor_package
3
+ Version: 0.0.1
4
+ Summary: Pacote de processamento de imagens com funcionalidades avançadas.
5
+ Home-page: https://github.com/Jotabelde
6
+ Author: João Pedro Fialho Lopes
7
+ Author-email: jotabelde@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.8
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.8
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: scikit-image>=0.18.3
16
+ Requires-Dist: numpy>=1.21.0
17
+ Requires-Dist: matplotlib>=3.4.3
18
+ Requires-Dist: scipy>=1.7.1
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: classifier
22
+ Dynamic: description
23
+ Dynamic: description-content-type
24
+ Dynamic: home-page
25
+ Dynamic: requires-dist
26
+ Dynamic: requires-python
27
+ Dynamic: summary
28
+
29
+
30
+ # 📷 Image Processor Package
31
+
32
+ Pacote Python para **processamento e análise de imagens**, com funcionalidades para leitura, salvamento, redimensionamento, comparação por similaridade, ajuste de histograma e visualização gráfica.
33
+
34
+ ---
35
+
36
+ ## ✨ Funcionalidades
37
+
38
+ - ✅ Leitura e salvamento de imagens (`.jpg`, `.png`, etc.)
39
+ - ✅ Conversão para escala de cinza
40
+ - ✅ Comparação de similaridade entre imagens (SSIM)
41
+ - ✅ Ajuste de histograma entre imagens
42
+ - ✅ Redimensionamento com suavização
43
+ - ✅ Visualização com gráficos e histogramas
44
+
45
+ ---
46
+
47
+ ## 📦 Instalação
48
+
49
+ ```bash
50
+ pip install image-processor-package
51
+ ```
52
+
53
+ > **Requisitos**: Python 3.8+
54
+
55
+ ---
56
+
57
+ ## 🧠 Estrutura do Projeto
58
+
59
+ ```
60
+ image_processor_package/
61
+ ├── main.py
62
+ ├── processing/
63
+ │ ├── compilation.py # Funções de comparação e histograma
64
+ │ └── transformation.py # Funções de redimensionamento
65
+ ├── utils/
66
+ │ ├── io.py # Leitura e salvamento de imagem
67
+ │ └── visualization.py # Funções de plotagem
68
+ ```
69
+
70
+ ---
71
+
72
+ ## 🧪 Exemplo de Uso
73
+
74
+ ```python
75
+ from processing.compilation import find_diference, match_histogram
76
+ from processing.transformation import resize_image
77
+ from utils.io import read_image, save_image
78
+ from utils.visualization import plot_result
79
+
80
+ image1 = read_image("caminho/para/imagem1.jpg")
81
+ image2 = read_image("caminho/para/imagem2.jpg")
82
+
83
+ image1_resized = resize_image(0.5, image1)
84
+ image2_resized = resize_image(0.5, image2)
85
+
86
+ image2_adjusted = match_histogram(image1_resized, image2_resized)
87
+ diferenca = find_diference(image1_resized, image2_adjusted)
88
+
89
+ plot_result(image1_resized, image2_adjusted, diferenca)
90
+ ```
91
+
92
+ ---
93
+
94
+ ## 👨‍💻 Autor
95
+
96
+ **João Pedro Fialho Lopes**
97
+ 📧 [jotabelde@gmail.com](mailto:jotabelde@gmail.com)
98
+ 🔗 [LinkedIn](https://www.linkedin.com/in/joaopedrofialho)
99
+ 📁 [GitHub](https://github.com/Jotabelde)
100
+
101
+ ---
102
+
103
+ ## 📝 Licença
104
+
105
+ Este projeto está licenciado sob os termos da **MIT License**.
@@ -0,0 +1,13 @@
1
+ README.md
2
+ setup.py
3
+ image_processor_package.egg-info/PKG-INFO
4
+ image_processor_package.egg-info/SOURCES.txt
5
+ image_processor_package.egg-info/dependency_links.txt
6
+ image_processor_package.egg-info/requires.txt
7
+ image_processor_package.egg-info/top_level.txt
8
+ processing/__init__.py
9
+ processing/compilation.py
10
+ processing/transformation.py
11
+ utils/__init__.py
12
+ utils/io.py
13
+ utils/visualization.py
@@ -0,0 +1,4 @@
1
+ scikit-image>=0.18.3
2
+ numpy>=1.21.0
3
+ matplotlib>=3.4.3
4
+ scipy>=1.7.1
File without changes
@@ -0,0 +1,18 @@
1
+ import numpy as np
2
+ from skimage.color import rgb2gray
3
+ from skimage.exposure import match_histograms
4
+ from skimage.metrics import structural_similarity
5
+
6
+
7
+ def find_diference (image1, image2):
8
+ assert image1.shape == image2.shape, "Please use Diferents Images"
9
+ image1_cinza = rgb2gray(image1)
10
+ image2_cinza = rgb2gray(image2)
11
+ (score,diference_image) = structural_similarity(image1_cinza, image2_cinza, full= True)
12
+ print("similarity of the two images is: "(score))
13
+ normalized_image_diference = (diference_image(diference_image-np.min(diference_image))/(np.max(diference_image)-np.min(diference_image)))
14
+ return normalized_image_diference
15
+
16
+ def match_histogram (image1, image2):
17
+ matched_images = match_histograms(image1, image2, multichanel = True)
18
+ return matched_images
@@ -0,0 +1,11 @@
1
+ from skimage.transform import resize
2
+
3
+ def resize_image (proportion, image1, image2):
4
+ assert 0 <= proportion <= 1, "Proportion needs to be between 0 and 1"
5
+ heigth1 = round(image1.shape[0] * proportion)
6
+ heigth2 = round(image1.shape[0] * proportion)
7
+ width1 = round(image1.shape[1] * proportion)
8
+ width2 = round(image1.shape[1] * proportion)
9
+ image_resized1 = resize(image1, (heigth1, width1), anti_aliasing= True)
10
+ image_resized2 = resize(image2, (heigth2, width2), anti_aliasing= True)
11
+ return image_resized1, image_resized2
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,34 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ with open("README.md", "r") as fh:
4
+ long_description = fh.read()
5
+
6
+
7
+ requirements = [
8
+ "scikit-image>=0.18.3",
9
+ "numpy>=1.21.0",
10
+ "matplotlib>=3.4.3",
11
+ "scipy>=1.7.1",
12
+ ]
13
+
14
+ setup(
15
+ name="image_processor_package", # Nome do pacote
16
+ version="0.0.1", # Versão do pacote
17
+ author="João Pedro Fialho Lopes", # Seu nome
18
+ author_email="jotabelde@gmail.com", # Seu email
19
+ description="Pacote de processamento de imagens com funcionalidades avançadas.", # Breve descrição
20
+ long_description=long_description, # Descrição longa do pacote
21
+ long_description_content_type="text/markdown", # Tipo do conteúdo da descrição longa (Markdown)
22
+ url="https://github.com/Jotabelde", # URL do repositório
23
+ packages=find_packages(), # Detecta automaticamente pacotes no diretório
24
+ install_requires=requirements, # Dependências do pacote
25
+ python_requires=">=3.8", # Versão mínima do Python
26
+ classifiers=[ # Informações adicionais para repositórios, como o PyPI
27
+ "Programming Language :: Python :: 3",
28
+ "Programming Language :: Python :: 3.8",
29
+ "Programming Language :: Python :: 3.9",
30
+ "License :: OSI Approved :: MIT License",
31
+ "Operating System :: OS Independent",
32
+ ],
33
+ include_package_data=True, # Inclui arquivos estáticos no pacote, se necessário
34
+ )
File without changes
@@ -0,0 +1,9 @@
1
+ from skimage.io import imread, imsave
2
+
3
+ def read_image(image1_path, image2_path, is_gray = False):
4
+ image1 = imread(image1_path, as_gray = is_gray)
5
+ image2 = imread(image2_path, as_gray = is_gray)
6
+ return image1, image2
7
+
8
+ def save_image(image, path):
9
+ imsave(image, path)
@@ -0,0 +1,28 @@
1
+ import matplotlib.pyplot as plt
2
+
3
+ def plot_image(image):
4
+ plt.figure(figsize=(12, 4))
5
+ plt.imshow(image, cmap='gray')
6
+ plt.axis('off')
7
+ plt.show()
8
+
9
+ def plot_result(*args):
10
+ number_images = len(args)
11
+ fig, axis = plt.subplots(nrows=1, ncols = number_images, figsize=(12, 4))
12
+ names_lst = ['Image {}'.format(i) for i in range(1, number_images)]
13
+ names_lst.append('Result')
14
+ for ax, name, image in zip(axis, names_lst, args):
15
+ ax.set_title(name)
16
+ ax.imshow(image, cmap='gray')
17
+ ax.axis('off')
18
+ fig.tight_layout()
19
+ plt.show()
20
+
21
+ def plot_histogram(image):
22
+ fig, axis = plt.subplots(nrows=1, ncols = 3, figsize=(12, 4), sharex=True, sharey=True)
23
+ color_lst = ['red', 'green', 'blue']
24
+ for index, (ax, color) in enumerate(zip(axis, color_lst)):
25
+ ax.set_title('{} histogram'.format(color.title()))
26
+ ax.hist(image[:, :, index].ravel(), bins = 256, color = color, alpha = 0.8)
27
+ fig.tight_layout()
28
+ plt.show()