Ask Your Question

BStrum's profile - activity

2021-05-04 04:03:39 -0600 received badge  Notable Question (source)
2020-11-28 05:59:06 -0600 received badge  Popular Question (source)
2020-11-10 15:41:24 -0600 commented answer findcontours mystery unsupported format

This did the trick, Thanks!

2020-11-10 10:06:08 -0600 commented answer findcontours mystery unsupported format

Thanks! I'll give it a try and post the results.

2020-11-09 23:58:57 -0600 answered a question Remove the background of a picture?

Take a look at GrabCut. Here is a link to a PyimageSearch blog that discusses it (with code) I tried the code and its

2020-11-09 17:01:24 -0600 edited question findcontours mystery unsupported format

findcontours mystery unsupported format I have read the post on the issue and am still at a loss. I have a processing p

2020-11-09 17:01:01 -0600 received badge  Editor (source)
2020-11-09 17:01:01 -0600 edited question findcontours mystery unsupported format

findcontours mystery unsupported format I have read the post on the issue and am still at a loss. I have a processing p

2020-11-09 16:59:11 -0600 asked a question findcontours mystery unsupported format

findcontours mystery unsupported format I have read the post on the issue and am still at a loss. I have a processing p

2020-10-31 07:27:27 -0600 received badge  Famous Question (source)
2020-07-17 04:51:52 -0600 received badge  Notable Question (source)
2020-06-10 22:13:06 -0600 received badge  Popular Question (source)
2020-02-26 13:07:24 -0600 asked a question Am getting NULL without setting an error on cv2.imwrite

Am getting NULL without setting an error on cv2.imwrite Here is the full error cv2.imwrite(fx,Out_File_Path,[int(cv2.IM

2019-12-14 12:53:18 -0600 received badge  Student (source)
2019-12-14 12:53:13 -0600 marked best answer cv2.imshow and cv2.imwrite show different output from the same array[SOLVED]

I am creating an image from a numpy array which was created by a style transfer .net

output = net.forward()

The output is the renormalized from the.net processing.

output = output.reshape((3, output.shape[2], output.shape[3]))
output[0] += 103.939
output[1] += 116.779
output[2] += 123.680
output = output.transpose(1, 2, 0)

When I display this with cv2.imshow I get the correct image image description

Now i try and convert this to an image file for saving and display: First I rescale the image back up to the 0 -255 integer range with:

output = (output * 255).astype(np.uint8)

Then save it with:

cv2.imwrite(path + "/" + "Test_Out" + '.jpg', output)

The latter image has color artifacts that I can't explain. (I don't have enough posts to display the images :( )

Any ideas how to properly display the numpy array??! image description

2019-12-12 10:22:28 -0600 commented answer cv2.imshow and cv2.imwrite show different output from the same array[SOLVED]

THIS WORKS!!! Thanks

2019-12-11 15:22:42 -0600 asked a question cv2.imshow and cv2.imwrite show different output from the same array[SOLVED]

cv2.imshow and cv2.imwrite show different output from the same array I am creating an image from a numpy array which wa