analyzing trajectory of clothes in drying machine

classic Classic list List threaded Threaded
12 messages Options
donghoonhan donghoonhan
Reply | Threaded
Open this post in threaded view
|

analyzing trajectory of clothes in drying machine

you adviced me to upload some images I want to transform, but I misunderstood that there might be helpful information in this site...

My original question was
How can I make my video applicable to PIV? example images were gray images and seem it need some steps to be analyzed.
I'm analyzing moving tracks of clothes in drying machine. and it is unapplicable for my raw video frames to PIVlab_GUI.m. I tried, making my frames to grayscale, to binary images using saturation value, but I can't use the program usable. the results looks irrelevant to my hope.

my final goal is to follow the tracks of laundry and figure out the velocity when the clothes fall down in the drying machine making noise due to zippers or buttons.
I attached some frames of my video, and the laundry has some blue stickers to help analyzing video, but it didn't work well. I can film more with other kind of clothes like red clothes for high saturation value, or attaching more stickers to it, using better camera to reduce blurring.

Please give me some advise! thank you!



William William
Reply | Threaded
Open this post in threaded view
|

Re: analyzing trajectory of clothes in drying machine

Hi,
To reduce the motion blur, you need to record with a higher frame rate and / or with a shorter shutter time. This is important.
And you need to add contrast/ texture to the cloth. Try to make your cloth look like a typical PIV image:
https://goo.gl/images/nDcgmy

Then try again an please also upload original images here, so I can try to analyse too.

Cheers,
William

Please consider donating for the PIVlab project:
http://paypal.me/pools/c/81Y8wBVi4y

The developer needs to update to a recent Matlab release in order to keep the project running.

William William
Reply | Threaded
Open this post in threaded view
|

Re: analyzing trajectory of clothes in drying machine

In reply to this post by donghoonhan
Color doesn't matter, as the analysis is based in gray-scale (intensity) data.

Please consider donating for the PIVlab project:
http://paypal.me/pools/c/81Y8wBVi4y

The developer needs to update to a recent Matlab release in order to keep the project running.

donghoonhan donghoonhan
Reply | Threaded
Open this post in threaded view
|

Re: analyzing trajectory of clothes in drying machine

In reply to this post by William
Thank you for your advise, Mr. William!
But is there any coding or idea to make big objects like my experiment applicable to PIV?
I'm trying to make it, will take the video in High Speed ​​Camera, but I have worry about textures.

The clothes moves in 3-d, so the surface that camera watches continuously change.
Would it be possible to detect continuously changing surface?

It's so kind of you to give us interest actively. I'm really thank you.
William William
Reply | Threaded
Open this post in threaded view
|

Re: analyzing trajectory of clothes in drying machine

Hi, I think it is possible to get good results. It doesn't matter that the cloth changes shape when the delta t is small enough (when you record with a high frame rate). Make sure that the cloth moves between 1 and 10 pixels from one image to the other.
Ideally, you would paint the drying machine in matte black, so it doesn't have any texture.
Here is an example of a non-typical analysis:

http://pivlab.blogspot.de/2017/11/pivlab-on-playgound.html

Please consider donating for the PIVlab project:
http://paypal.me/pools/c/81Y8wBVi4y

The developer needs to update to a recent Matlab release in order to keep the project running.

donghoonhan donghoonhan
Reply | Threaded
Open this post in threaded view
|

Re: analyzing trajectory of clothes in drying machine

Wow! You made me road to go! Thank you very much!
I'll take high speed camera video today. I might reply more if any development occurs!
Thank you, Mr. William!!
donghoonhan donghoonhan
Reply | Threaded
Open this post in threaded view
|

Re: analyzing trajectory of clothes in drying machine

Hello, Mr.William.
I tried to get videos with high speed camera, but I couldn't get desirable results, because my camera wasn't professional one, maximum speed was only about 50frames/s so that I just use the video...T.T
When velocity changes rapidly, It becomes random(unreadable), but I can't think about the way to overcome frame speed(blurring).
Due to a lot of rotations to be analyzed, I also have to make the frames applicable to PIV without my pre-processing step. So I made a matlab code to remain only red clothes and eliminate the backgrounds. As I am on elementary level of matlab, The code has many disadvantages, 1. due to blurring, clothes can't be detected well when the frame has high blurring. 2. the drying machine reflects(?) red lights, so there are other reds detected unless it is not clothes.
I'm sorry to ask trivial things... , but I don't have anywhere to ask... Thank you for reading...!
I attached my code, and some results of it.

code
%%%%%%%%%%%%%%%%%%%%%%%%%
clc,clear all,close all, format long g, format compact

% % leaving only red clothes % %
num_pic = 10;
for i=1:num_pic
    pic_org = imread(strcat('00',int2str(i),'.bmp'));
    pic = pic_org;
    pic_hsv = rgb2hsv(pic);
%     pic_val = pic_hsv(:,:,3);
    pic_sat = pic_hsv(:,:,2);
    for mm = 1:size(pic,1)
        for nn = 1:size(pic,2)
            if pic(mm,nn,1) < 150 || pic(mm,nn,2) > 150 || pic(mm,nn,3) > 250 || pic_sat(mm,nn) < 0.2
                gsc = 0.3*pic(mm,nn,1) + 0.59*pic(mm,nn,2) + 0.11*pic(mm,nn,3);
                pic(mm,nn,:) = [0 0 0];
%             else
%                 pic(mm,nn,:) = [255 255 255];
            end
        end
    end
    % noise reduction using strel
    SE = strel('square',9); % 보정1회
    pic_1 = imopen(pic,SE);
    %%%%%%%%%%%%%%%%%%%%%%%%%%
    % making textures to the image
    I = im2double(pic_1);
    LEN = 21;
    THETA = 11;
    PSF = fspecial('motion', LEN, THETA);
    blurred = imfilter(I, PSF, 'conv', 'circular');
    noise_mean = 0;
    noise_var = 0.0001;
    blurred_noisy = imnoise(blurred, 'gaussian', ...
                            noise_mean, noise_var);
    estimated_nsr = 0;
    wnr2 = deconvwnr(blurred_noisy, PSF, estimated_nsr);
    estimated_nsr = noise_var / var(I(:));
    pic_2 = deconvwnr(blurred_noisy, PSF, estimated_nsr);
%     figure, imshow(wnr3);
%     title('Restoration of Blurred, Noisy Image Using Estimated NSR');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    imshow(pic_2);
%     pic_1 = rgb2gray(pic);
%     imwrite(pic_1,strcat('000',int2str(i),'.bmp'));
end

% % % 주위에 빨간줄 그리는 코드 % %
% BW5 = bwperim(BW4);
% imshow(BW5,[])
% I2 = I; I2(BW5) = 255;
% I_RGB = I2;
% I2 = I; I2(BW5) = 0;
% I_RGB(:,:,2) = I2;
% I2 = I; I2(BW5) = 0;
% I_RGB(:,:,3) = I2;
% imshow(I_RGB,[])
% IM = imread('0035.bmp');
% B_only = IM;
%  B_only(:,:,[1 3]) = 0;
% B_only(:,:,[1 3]) = 0;
% imshow(B_only);
%%%%%%%%%%%%%%%%%%%%%%

image








William William
Reply | Threaded
Open this post in threaded view
|

Re: analyzing trajectory of clothes in drying machine

In reply to this post by donghoonhan
There is no way to get velocity data when the images are not appropriate... Even a GoPro or an IPhone might be enough to capture images at sufficient frame rate.

I searched the internet for a video of a drying machine and found one. I did a quick test, and it is possible to get good velocity information even if the video is still sub optimal. Check out the article in my blog:

http://pivlab.blogspot.de/2018/05/slow-motion-of-clothes-in-drying-machine.html

Please consider donating for the PIVlab project:
http://paypal.me/pools/c/81Y8wBVi4y

The developer needs to update to a recent Matlab release in order to keep the project running.

donghoonhan donghoonhan
Reply | Threaded
Open this post in threaded view
|

Re: analyzing trajectory of clothes in drying machine

Wow... I was short-minded and i'm really thank you for your kind assistence... I hope there might be a chance for me to contact you whenever I need pivlab for future when I'm on a field. I feel sorry to you to pay back your kind helps since I'm just a poor university student, i mean not poor but doesn't have enough money... I think I might feel necessary to ask some more after study, and thank you again Mr.William !
William William
Reply | Threaded
Open this post in threaded view
|

Re: analyzing trajectory of clothes in drying machine

Hi, you're welcome. Thanks for asking your questions here, I always like to help if I have the time (and currently, I have enough time).
Good luck with your studies!!

Please consider donating for the PIVlab project:
http://paypal.me/pools/c/81Y8wBVi4y

The developer needs to update to a recent Matlab release in order to keep the project running.

donghoonhan donghoonhan
Reply | Threaded
Open this post in threaded view
|

Re: analyzing trajectory of clothes in drying machine

Oh, I'm so happy about what you said, Mr.William.
I'm trying to find pre-processing,Exclusion methods to drive PIV just like your achievements, the slow motion dryer.
But, there is an example and It draws only one circle of Exclusion, so I can't find the way to draw the masks like yours. I can just make ROI with square one, and exclusion areas with polygons(was hard to make circle). and No results were helpful as I searched "pre-process" in this forum.T.T

Could you please let me know how to draw the masks like yours?
And, when the mask was changed a bit, when the drying machine make a little move enough to make the masks again, Perhaps it was passive of your hand?(like A mask for 1:50 frame, B mask for 51:100 frame, ...)

Thank you..! consecutively!
donghoonhan donghoonhan
Reply | Threaded
Open this post in threaded view
|

Re: analyzing trajectory of clothes in drying machine

Oh, I'm sorry, I found the loading external image !