Skip to content

Commit f179263

Browse files
committed
no more html in markdown
1 parent ec7b1ed commit f179263

2 files changed

Lines changed: 19 additions & 10 deletions

File tree

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
# Kernel Image Processing
22

3-
<img alt="Static Badge" src="https://img.shields.io/badge/Graphics-5a3aa1"> <img alt="Static Badge" src="https://img.shields.io/badge/Computing-0c4866">
3+
![Graphics](https://img.shields.io/badge/Graphics-5a3aa1)
4+
![Computing](https://img.shields.io/badge/Computing-0c4866)
45

56
This project was created as part of the [Programming III](https://prog3.student.famnit.upr.si/) course at [UP FAMNIT](https://www.famnit.upr.si/en/).
67

78
It is a simple image processing program that uses a kernel to process the image. It is written in Java and uses [Swing](https://docs.oracle.com/javase/tutorial/uiswing/) for the GUI.
89

910
![screenshot_cli](https://github.com/urluur/Kernel-Image-Processing/blob/main/screenshots/screenshot.jpg?raw=true)
1011

11-
## Guidelines
12+
## Guidelines
1213

13-
[Link](https://prog3.student.famnit.upr.si/#projects/KernelImageProcessing/) to guidelines posted by Famnit.
14+
[Guidelines](https://prog3.student.famnit.upr.si/projects/KernelImageProcessing/) posted by Famnit professors.
1415

1516
## What is it doing?
1617

1718
The program is using a kernel, which is a small matrix that is applied to every pixel of the image. It calculates the new value of the pixel by multiplying the kernel with the surrounding pixels and summing them up.
1819

1920
![image](https://upload.wikimedia.org/wikipedia/commons/1/19/2D_Convolution_Animation.gif)
2021

21-
Photo by <a href="https://commons.wikimedia.org/wiki/File:2D_Convolution_Animation.gif">Michael Plotke</a>, <a href="https://creativecommons.org/licenses/by-sa/3.0">CC BY-SA 3.0</a>, via Wikimedia Commons
22+
Photo by [Michael Plotke](https://commons.wikimedia.org/wiki/File:2D_Convolution_Animation.gif), [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0), via Wikimedia Commons
2223

2324
This process can take a lot of time if done sequentially, so we can use parallel processing to speed it up. The program measures the time it takes to process the image both sequentially and in parallel.
2425

@@ -40,22 +41,29 @@ This process can take a lot of time if done sequentially, so we can use parallel
4041
4142
1. Download MPJ Express v0.44 from [SourceForge](https://sourceforge.net/projects/mpjexpress/files/releases/mpj-v0_44.zip/download)
4243
2. Move to the project repository: `cd Kernel-Image-Processing/`
43-
2. Create libs folder: `mkdir libs`
44-
3. Move extracted folder to the libs folder
45-
4. Install MPJ Express as dependancy:
44+
3. Create libs folder: `mkdir libs`
45+
4. Move extracted folder to the libs folder
46+
5. Install MPJ Express as dependancy:
47+
4648
```sh
4749
mvn install:install-file -Dfile=libs/mpj-v0_44/lib/mpj.jar -DgroupId=com.googlecode.mpj-express -DartifactId=mpj-v0_44 -Dversion=0.44 -Dpackaging=jar
4850
```
49-
5. Add MPJ to path:
51+
52+
6. Add MPJ to path:
53+
5054
```sh
5155
export MPJ_HOME=libs/mpj-v0_44
5256
export PATH=$MPJ_HOME/bin:$PATH
5357
```
54-
6. Compile the project:
58+
59+
7. Compile the project:
60+
5561
```sh
5662
mvn clean install
5763
```
58-
7. Run the project:
64+
65+
8. Run the project:
66+
5967
```sh
6068
libs/mpj-v0_44/bin/mpjrun.sh -np 4 target/kernel-image-processing-1.0-SNAPSHOT.jar
6169
```

src/main/java/com/urluur/Distributed.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public static BufferedImage masterDistributed(BufferedImage image, Kernel kernel
3131
int chunkHeight = height / size;
3232

3333
// Send each worker its chunk of the image and the kernel
34+
// TODO: broadcast the whole image to all workers
3435
for (int i = 1; i < size; i++) {
3536
int startY = i * chunkHeight;
3637
int endY = (i == size - 1) ? height : startY + chunkHeight;

0 commit comments

Comments
 (0)