Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions

Question

Question What is the advantage of a voluntary DBO plan?

Answered: 1 week ago