Willem Weertman

Willem Weertman

Anchorage, AK

More

Haven't backed any projects yet! 

Heres the code to make these images for anyone who is interested. Sorry about the tabs getting removed, not sure whats up with that @experiment.com
Apr 17, 2021
Understanding how octopuses use scent to find food
View comment
import cv2 import os import numpy as np path_vid = r'C:\Users\wlwee\Documents\conferences_and_presentations\AchemS\2021_Submission\inverted_plume.avi' path_save_img = os.path.join(os.path.dirname(path_vid), os.path.basename(path_vid).split('.')[0] + '.png') cap = cv2.VideoCapture(path_vid) num_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) skip_start = int(0.05*num_frames) cap.set(cv2.CAP_PROP_POS_FRAMES, skip_start) img_iters = np.arange(0, num_frames - skip_start, 1) for i in range(0, max(img_iters)): success, img = cap.read() if success == False: print('error1 reading video') cap.release() break if i == 0: print(i) background = img elif i in img_iters: print(i) img = cv2.subtract(img, background) overlay = img background = cv2.addWeighted(background, 1, overlay, 0.8,0) cv2.imwrite(path_save_img, background)
Apr 17, 2021
Understanding how octopuses use scent to find food
View comment
import cv2 import os import numpy as np path_vid = r'C:\Users\wlwee\Documents\conferences_and_presentations\AchemS\2021_Submission\inverted_plume.avi' path_save_img = os.path.join(os.path.dirname(path_vid), os.path.basename(path_vid).split('.')[0] + '.png') cap = cv2.VideoCapture(path_vid) num_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) skip_start = int(0.05*num_frames) cap.set(cv2.CAP_PROP_POS_FRAMES, skip_start) img_iters = np.arange(0, num_frames - skip_start, 1) for i in range(0, max(img_iters)): success, img = cap.read() if success == False: print('error1 reading video') cap.release() break if i == 0: print(i) background = img elif i in img_iters: print(i) img = cv2.subtract(img, background) overlay = img background = cv2.addWeighted(background, 1, overlay, 0.8,0) cv2.imwrite(path_save_img, background)
Apr 17, 2021
Understanding how octopuses use scent to find food
View comment
Outside of ethical concerns my biggest issue beyond with eating octopus is that generally I dislike eating nervous tissue. If you do ever get octopus cut the arm open and look at the size of the nerve cord, it makes up a sub stantial portion of the arms. If I could post a picture here I would, its a bit ridiculous, almost as if bone was replaced with nervous tissue. yuck!
Jan 19, 2021
Understanding how octopuses use scent to find food
View comment
Thank you Ben! It means a lot man.
Jan 17, 2021
Understanding how octopuses use scent to find food
View comment
Thank you David, I will try to keep the posts going
Dec 31, 2020
Understanding how octopuses use scent to find food
View comment
Thanks Anna!
Dec 30, 2020
Understanding how octopuses use scent to find food
View comment
If I am understanding this correctly. Something of known size so we can translate pixels into measurements of known length. As well as a way to count time. Time first. The camera counts time with an error of a few nano seconds, the video recordings are captured at 10 frames per second to save storage space, I have many weeks of footage. The time error is very low. Space is a bit trickier due to the spherical distortion of the lense. The python openCV library has an open source tool for calibrating cameras https://docs.opencv.org/3.4/d4/d94/tutorial_camera_calibration.html. By calibrating the camera we can flatten our coordinates using the calibration matrix. once our coordinates are flattened we can measure an object of known size on the bottom of the tank and then translate pixels to lengths. The camera is about as perpendicular to the bottom of the tank as I could get it. So the object measured at one point on the plane of the tanks bottom should reflect sizes elsewhere on the plain with reasonable accuracy. It is ~20 pixels per inch.
Dec 18, 2020
Understanding how octopuses use scent to find food
View comment
No sliced sushi :)
Dec 18, 2020
Understanding how octopuses use scent to find food
View comment
Yeah, would not want to be eaten by an octopus, would be one of the worse ways to go.
Dec 18, 2020
Understanding how octopuses use scent to find food
View comment
Thank you Peter! so am I! It is a fun project.
Dec 07, 2020
Understanding how octopuses use scent to find food
View comment
I'll post that
Dec 05, 2020
Understanding how octopuses use scent to find food
View comment
Show more comments