An warware: blur hoto

Hotunan blur al'amari ne na yau da kullun da ake fuskanta a fagen daukar hoto da sarrafa hoto. ฦ˜aunar hoto na iya kasancewa ta hanyar yanke shawara na fasaha na niyya ko kuma yana iya zama sakamakon gazawar fasaha kamar girgiza kamara, batutuwan mayar da hankali, ko motsi a cikin firam ษ—in. A cikin duniyar dijital, za mu iya amfani da harsunan coding kamar Python don ko dai gabatar da blur don kyawawan dalilai ko cire shi don haษ“aka tsayuwar hoton.

Python yana ba da ษ—akunan karatu da yawa kamar OpenCV, PIL, da SciKit-image don yin ayyukan sarrafa hoto gami da maganin blur. Waษ—annan ษ—akunan karatu suna gudanar da ayyuka masu alaฦ™a da sarrafa hoto yadda ya kamata ta hanyar samar da mu'amala mai sauฦ™in amfani da manyan kayan aiki.

Yana magance blur Hoto tare da OpenCV

OpenCV, ko Open Source Library Vision Computer, matsayi a matsayin ษ—aya daga cikin ingantattun ษ—akunan karatu don ayyukan hangen nesa na kwamfuta, gami da sarrafa hoto. Don magance matsalar blur hoto, za mu yi amfani da aikin GaussianBlur na cv2 module, wanda wani ษ“angare ne na OpenCV.

Mataki na farko shine shigar da shigo da abubuwan da ake buฦ™ata.

pip install opencv-python
import cv2

Na gaba, muna loda hoton.

image = cv2.imread('example.jpg')

Yanzu, yi amfani da aikin GaussianBlur. Ma'auni na wannan aikin sun haษ—a da hoton, girman kwaya (nisa, tsawo), da daidaitaccen karkata (sigmaX) a cikin hanyar X.

blurred_image = cv2.GaussianBlur(image, (11, 11), 0)

A ฦ™arshe, muna adana hoton sakamako.

cv2.imwrite('blurred_example.jpg', blurred_image)

Fahimtar Dakunan karatu da Ayyuka

Fahimtar ayyukan kayan aikin da muke amfani da su yana da mahimmanci wajen magance kowace matsala ta shirye-shirye. Don haka, yana da mahimmanci mu fahimci abin da ษ—akunan karatu da ayyukan da muka yi amfani da su don magance blur hoto a zahiri suke yi:

  • BudeCV: Buษ—e tushen laburare na ayyukan shirye-shirye an fi niyya da hangen nesa na kwamfuta na ainihi, sarrafa hoto, ษ—aukar bidiyo, da bincike.
  • cv2.imread: Wannan aikin yana karanta fayil ษ—in hoto.
  • cv2.GaussianBlur: Wannan aikin yana amfani da blur Gaussian ga hoton. Girman kernel da daidaitaccen karkatar da aka yi amfani da shi a cikin aikin Gaussian yana rinjayar matakin blur.
  • cv2.im rubuta: Ana amfani da wannan aikin don adana hoto.

Binciko Wasu Dabarun Ruษ—e Hoto

Yayin da Gaussian blur ya shahara, Python kuma yana ba da damar wasu hanyoyin blur, kamar Median blur ko Bilateral blur. Ta hanyar binciko takaddun hukuma da koyawa, masu haษ“akawa za su sami Python yanayi mai dacewa don sarrafa hoto.

A cikin yanayin iska na iska inda cikakken hoto zai iya zama bambanci tsakanin abin da ake siyarwa ko kuma zaune a kan tarkace, ฦ™ware dabarun sarrafa hoto na iya haษ“aka ikon gabatar da samfuran ku ko batutuwa a cikin mafi kyawun haske. Ba kome ba idan hoto ne don kasida, harbi don babban satin salo, ko hotuna don blog ษ—inku, mafi fayyace da mai da hankali sosai, mafi kyawun martanin masu sauraro zai kasance.

Kamar dai a cikin salon inda abubuwa ke canzawa, wajen sarrafa hoto, dabaru daban-daban na iya dacewa da yanayin yanayi daban-daban. Don haka ana ba da shawarar koyaushe a ci gaba da kasancewa tare da salo iri-iri da ke nunawa a cikin yanayin sarrafa hoto, kamar ci gaba da sabbin salo a kan catwalk.

Shafi posts:

Leave a Comment