Muhammad al-Xorazmiy nomidagi Toshkent axborot texnologiyalari universiteti Kompyuter injiniring fakulteti


Download 24.46 Kb.
Sana31.01.2024
Hajmi24.46 Kb.
#1820014
Bog'liq
Shodmonov Jasurbek Parallel ishlov berish 4-amaliyot


Muhammad al-Xorazmiy nomidagi Toshkent axborot texnologiyalari universiteti Kompyuter injiniring fakulteti
210-20 guruh fakulteti talabasi
Shodmonov Jasurbek Parallel ishlov berish fanidan bajargan
4-amaliyot ishi
Bajardi: Shodmonov J
Tekshirdi: To’rayev X

Toshkent-2023


Topshiriqlar


  1. Bir o’lchovli signallar ustida qayta ishlash amallarini tbb kutubxonasi imkoniyatlaridan foydalanib amalga oshirish.

Signallarni qayta ishlash masalalari:

    1. Signallarni oynalardan o’tkazish (Hemming,Henning va boshqalar);

def hamming_encode(data):


# Ma'lumot uzunligi (n) va qo'shimcha o'zgaruvchilar
n = len(data)
r = 0
while 2 ** r <= n + r + 1:
r += 1

# Qo'shimcha joylarni tayyorlash


encoded_data = [0] * (n + r)
j = 0
for i in range(1, n + r + 1):
if i == 2 ** j:
j += 1
else:
encoded_data[i - 1] = int(data[i - 1 - j])

# Parity bitlarni hisoblash va joylash


for i in range(r):
parity_bit_index = 2 ** i - 1
parity_bit_value = 0
for j in range(1, n + r + 1):
if (j & (1 << i)) != 0:
parity_bit_value ^= encoded_data[j - 1]
encoded_data[parity_bit_index] = parity_bit_valu

return encoded_data


# Test qismi


original_data = "1011"
encoded_data = hamming_encode(original_data)
print(f"Original Data: {original_data}")
print(f"Encoded Data: {encoded_data}")



  1. Ikki o’lchovli signallarni(tasvirlarni) qayta ishlash masalalarini tbb kutubxonasi imkoniyatlaridan foydalanib amalga oshirish. Tasvirlani qayta ishlash masalalari:

    1. Tasvirlarni filterlash (box filter, medium filter, Gaus filter va boshqa);

import cv2
import numpy as np
from matplotlib import pyplot as plt

# Tasvirni o'qish


image_path = 'image.jpg'
original_image = cv2.imread(image_path)

# Box filter


box_filtered_image = cv2.boxFilter(original_image, -1, (5, 5))

# Median filter


median_filtered_image = cv2.medianBlur(original_image, 5)

# Gaussian filter


gaussian_filtered_image = cv2.GaussianBlur(original_image, (5, 5), 0)

# Natijalarni ko'rsatish


plt.subplot(221), plt.imshow(original_image), plt.title('Asl tasvir')
plt.subplot(222), plt.imshow(box_filtered_image), plt.title('Box Filter')
plt.subplot(223), plt.imshow(median_filtered_image), plt.title('Median Filter')
plt.subplot(224), plt.imshow(gaussian_filtered_image), plt.title('Gaussian Filter')

plt.show()





Download 24.46 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling