Computer Science, asked by yijice7753, 7 months ago

WAP in Python to do the following: Create this text file, File1.txt Red Roses Blue Sky Green Grass Yellow Sun Red Strawberries Replace Red with White. Also delete the line, Green Grass. Show the content of the file before and after modification. (Use os module to create a temporary file and replace the contents of the original file.)

Answers

Answered by Anonymous
0

Answer:

#Object Detection with OpenCV

I have used OpenCV + Python to detect strawberries in an image. Series of operations are performed which are well documented in the code to eventually highlight the biggest strawberry in an image and then draw a green circle around it. The code for this project is present in fun.py.

#Dependencies

1)openCV

2)matplotlib

3)numpy

#Usage

Run fun.py to create a new image with the detected strawberry. The last 3 lines at the bottom of demo.py let you define the input image name and the output image name. This detection takes a split second. Deep learning would be more accurate but requires more computation currently. Sometimes you just need to quickly detect an image and don't mind handcrafted which features to look for.

#Original Image

Similar questions