summary refs log tree commit diff stats
path: root/opencv
diff options
context:
space:
mode:
authorSudipto Mallick <>2024-01-02 03:38:10 +0000
committerSudipto Mallick <>2024-01-02 03:38:10 +0000
commit7451edff7692e86c5238ff7bc6659825e242a84e (patch)
tree830fe25caf403869fe77df83bc44822ea6f5f11d /opencv
parenta70e0a59817ce06a3dd23b3750ae16ee6660deaf (diff)
downloadzadania-7451edff7692e86c5238ff7bc6659825e242a84e.tar.gz
Quick backup, need to be rewritten
Diffstat (limited to 'opencv')
-rw-r--r--opencv/index.typ51
-rw-r--r--opencv/tpl.typ47
2 files changed, 98 insertions, 0 deletions
diff --git a/opencv/index.typ b/opencv/index.typ
new file mode 100644
index 0000000..7486ae7
--- /dev/null
+++ b/opencv/index.typ
@@ -0,0 +1,51 @@
+#import "tpl.typ": *
+#show: body => apply(body)
+#let semibold(body) = text(weight: 600, body)
+#text(size: 1.3em, align(center)[#semibold[Practical Assignments] \ _on_ \ #semibold[Image Processing Lab]])
+#set enum(full: true, numbering: (..args) => {
+  let patterns = ("1.", "a)")
+  let pattern = patterns.at(calc.min(args.pos().len(), patterns.len()) - 1)
+  numbering(pattern, args.pos().last())
+})
+
+#set raw(lang: "python")
+#set par(justify: true)
+#set text(size: 10pt)
+
+
++ Write a program to do image format conversion i.e., from RGB to gray, gray to binary, RGB to binary, RGB to HSV, HSV to RGB, RGB to YCbCr and YCbCr to RGB.
++ Write a program to read an image and rotate that image in clockwise and anti-clockwise direction, and display it.
++ Write a program to find the histogram of a gray image and display the histogram.
++ Write a program to perform color separation into R, G, and B from an color image.
++ Write a program to enhance the image in spatial domain using
+  + Image negative
+  + Log transformation
+  + Power law transform
+  + Piecewise linear transform
++ Write a program to enhance the image in spatial domain using histogram equalization method.
++ Write a program to perform the following image enhancement methods:
+  + Brightness enhancement
+  + Brightness suppression
+  + Contrast manipulation
+  + Gray level slicing without background 
++ Write a program to average two images together into a single image. Display the new image.
++ Write a program to compare two images using image subtraction.
++ Write a program to perform the following image arithmetic.
+  + Image addition
+  + Image subtraction
+  + Image multiplication
+  + Image division
++ Write a program to add various types of noise (salt and pepper noise, Gaussian noise) to an image.
++ Write a program to enhance an image using mean filtering, weighted average filtering, median filtering, max/min filtering.
++ Write a program to segment an image using thresolding technique.
++ Write a program to segment an image based on 
+  + Region growing
+  + Region splitting
+  + Region merging
++ Write a program to find the edge of a given image with the following operators.
+  + Difference operator
+  + Robert operator
+  + Prewitt operator
+  + Sobel operator
++ Write a program to read two images `lena.bin` and `peppers.bin`. define a new 256 x 256 image J as follows : the left half of J i.e., the first 128 columns, should be equal to the left half of lena image and the right half of J, i.e., the 129th column through the 256th column should be equal to the right half of pepper image. Show J image.
+
diff --git a/opencv/tpl.typ b/opencv/tpl.typ
new file mode 100644
index 0000000..239197a
--- /dev/null
+++ b/opencv/tpl.typ
@@ -0,0 +1,47 @@
+#import "@preview/codelst:1.0.0": sourcefile
+#let hlfile(filename) = sourcefile(read(filename), file: filename)
+#let apply(body) = {
+//  let body-font-settings = (font: "Nunito Sans 10pt", size: 12pt, stretch: 75%)
+  let body-font-settings = (font: "Hanken Grotesk", size: 12pt, stretch: 75%)
+  let page-margin = (left: 1in, right: 0.5in, top: 0.5in, bottom: 0.25in)
+  let margin = (left: 0.75in, right: 0.25in, top: 2em, bottom: 2em)
+  let page-frame-thickness = 1.5pt
+  set page(
+    margin: (..page-margin, bottom: margin.bottom + 2em),
+    numbering: "1",
+    background: align(top + start, pad(..margin, rect(width: 100%, height: 100%, stroke: page-frame-thickness + gray))),
+    footer: locate(loc => align(center, move(dy: -margin.bottom + 1em, text(..body-font-settings, size: 9pt, counter(page).display(loc.page-numbering())))))
+  )
+  show: block.with(breakable: true, width: 100%, inset: page-frame-thickness + 1em)
+  
+  set text(..body-font-settings)
+
+  let code-color = rgb("#f4f4f4")
+//  show raw: set text(font: "CommitMono", size: 1.1em)
+  show raw: set text(font: "Source Code Pro", size: 1.1em)
+//  show raw: set text(font: "Iosevka Fixed", size: 1.1em)
+  show raw.where(block: false): box.with(
+    fill: code-color,
+    inset: (x: 3pt, y: 0pt),
+    outset: (y: 3pt),
+    radius: 2pt,
+  )
+  show raw.where(block: true): block.with(
+    fill: code-color,
+    inset: 10pt,
+    radius: 4pt,
+    width: 100%,
+  )
+  show raw.where(block: true): it => align(left, it)
+//  set raw(theme: "vendor/gr.tmTheme")
+  set par(leading: 0.6em)
+  body
+}
+
+#let assignment(number) = {
+  set align(center)
+  [== Assignment #number]
+}
+#let objective(body) = align(center, [*Objective*: #body])
+#let oset(kind) = block(spacing: 0.6em, [===== #h(1em) #kind])
+