Could you help me with the Big-O analysis of the following algorithm and the sum of it at the end please?
1: Initialize directorydir← ‘MNIST_DS’
2: Assign image to variablepath← image_path
3: Store image in arrayarr← np.array(image.open(path))
4: Store 4 different projections in 4 different variables PN←ProjectionN
5: Set average of the vector components at each projection T_PN←np.average(PN)
6: Initialize arrays for barcodes CN←[]
7: Calculate threshold frequency for each projection
fori in range (len(PN)):
if (PN)[i] > T_PN
CN.append(N)
else:
CN.append(0)
8: Concatenate the 4 threshold values for each projectionx← c1 + c2 + c3 + c4
9: Printx
10: Store all created barcodes to a file
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here