Microscopics blood image nucleus segmentation using python

I got these steps for image segmentation from a research paper. Here are the steps I am following:

Step 1: Input the color blood slide image to the system.

Step 2: Convert the color image into gray scale image.

Step 3: Enhance contrast of the gray scale image by histogram equalization method (A).

Step 4: To adjust image intensity level apply linear contrast stretching to gray scale image (B).

Step 5: Obtain the image I1=B+A to brighten all other image components except cell nucleus.

Step 6: Obtain the image I2=I1-A to highlight the entire image objects along with cell nucleus.

Step 7: Obtain the image I3=I1+I2 to remove all other components of blood with minimum effect of distortion over nucleus.

Step 8: To reduce noise, preserve edges and increase the darkness of the nuclei implement 3-by-3 minimum filter on the image I3.

I did till step 4.But I am not getting what's exactly I need to do or apply which algorithm in step 5,6,7,8? here is the portion of the code

 import cv2
import numpy as np
import matplotlib.pyplot as plt
import math

from PIL import Image
pil_im = Image.open('image.jpg')
pil_imgray = pil_im.convert('LA')

img = np.array(list(pil_imgray.getdata(band=0)), float)
img.shape = (pil_imgray.size[1], pil_imgray.size[0])

img = cv2.imread('image.jpg')
img_to_yuv = cv2.cvtColor(img,cv2.COLOR_BGR2YUV)
img_to_yuv[:,:,0] = cv2.equalizeHist(img_to_yuv[:,:,0])
hist_equalization_result = cv2.cvtColor(img_to_yuv, cv2.COLOR_YUV2BGR)