Question: from PIL import Image import numpy as np def Chroma(image): arr = np.array(image) g=arr[:,:,1] b=arr[:,:,2] a = arr[:,:,3] r=arr[:,:,0] cond = 3*g>(2*b+2*r) a1 = a*(~cond)

from PIL import Image

import numpy as np

def Chroma(image):

arr = np.array(image)

g=arr[:,:,1]

b=arr[:,:,2]

a = arr[:,:,3]

r=arr[:,:,0]

cond = 3*g>(2*b+2*r)

a1 = a*(~cond)

arr[:,:,3] = a1

out = Image.fromarray(arr)

out.save('out.png')

origin = Image.open('fg_caster.png')

origin1 = origin.convert("RGBA")

test = Chroma(origin1)

raspberry pi python3

I made this code but it didn't work well

So, i'd like to change RGB into HSV and make green color into transparent..... can you help me with this?

##I should only use

import pygame, matplotlib, numpy, math

from PIL import Image, ImageDraw, ImageFont

##NO cv2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!