联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Python编程Python编程

日期:2020-07-26 10:52

Homework 2

The College of Engineering Deans office has decided to make a new Associate Dean of Branding. Their first mission is to create a new mascot the Golden Zebra. While activly trying to procure a Golden Zebra they have tasked you with fabricating an image of our new mascot for immediate publication in the Resolve Magazine. Follow the instructions to create our new mascot.

Please use the offical Lehigh colors.

Useful functions:

logical_or logical_and

Step 1: Download the original image file

Step 2: Load and plot the original image

Step 3 Initial color-based segmentation of image.

Recolor the numpy array of the zebra image using color thresholding to create a golden zebra.

Hint: Make a copy of the data using np.copy so you do not overwrite your data

Hint: It might be helpful to convert the image to grayscale for segmenting

Make sure to plot your result. It is unlikely that you will accuratly segment the Zebra using color thresholding.


Step 4: Improve the segmentation.

It is likely that you were unable to segment the image using just color thresholding. Likely you picked up some of the grass. To fix this, in part, use scikit-learn and the following proceedure.

1.Start with the previous segmentation of the zebra. Hint: it is helpful if this is in binary form.

2.Use a function to remove small objects in the image.

3.Use a dialation (pixel wise addition of a binary image) followed by an errosion (pixel wise subtraction of a binary image). This helps close objects with small gaps.

4.Fill the holes. Hint: You should use a function binary_fill_holes in scipy.ndimage

5.plot the binary mask of the zebra.

Step 5: Plot a histogram of the gray scale values of just the Zebra.

Hint: You can index with the binary mask.

Step 6: Use the histogram to recolor the zebra stripes to make a golden zebra. Use the official Lehigh Brown and Gold.


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp