Skip to content

Instantly share code, notes, and snippets.

@Ruqyai
Created March 14, 2020 11:48
Show Gist options
  • Select an option

  • Save Ruqyai/a0823106def1af0b3cf7955b8c17c6c6 to your computer and use it in GitHub Desktop.

Select an option

Save Ruqyai/a0823106def1af0b3cf7955b8c17c6c6 to your computer and use it in GitHub Desktop.
hsv_image=cv2.cvtColor(img, 40) #cv2.COLOR_BGR2HSV HSV (hue, saturation, value) هو نظام الالوان مختلف
ch_h ,ch_s ,ch_v =cv2.split(hsv_image) # http://bit.ly/2VtsiXZ نفصلها انقر الرابط للايضاح
ch_s[:,:] =ch_s[:,:]* 0.2 # نعدل القيمة للتغير اللون
new_img=cv2.merge((ch_h,ch_s,ch_v)) # نعيد جمعها من جديد
show_img=cv2.cvtColor(new_img, 55 ) #cv2.COLOR_HSV2RGB # RGB نحولها الى نظام الالوان
fig = plt.figure(figsize=(5, 5))
plt.axis('off')
plt.imshow(show_img,interpolation='gaussian') # مزيد من المعلومات حول التموية على الرابط https://matplotlib.org/3.1.3/gallery/images_contours_and_fields/interpolation_methods.htm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment