SetDirectory[NotebookDirectory[]];

dt=; (* s, time between frames *)
dataDirectory="";
center={,}; (* coordinate of the pivot *)

lastFrame=Length[FileNames[dataDirectory<>"/*.tif"]]-1;

images=Table[Import[dataDirectory<>"/t"<>IntegerString[i,10,4]<>".tif"],{i,0,lastFrame}];

imageHeight=ImageDimensions[images[[1]]][[2]];

pts=N[{#[[2]],imageHeight-#[[1]]}&@Mean[Position[ImageData[#],1.,2]]-center]&/@images;

θList=ArcTan[((#[[1]])/(#[[2]]))]&/@pts;
timeList=Range[0,Length[θList]-1]dt;
θvsTime=Transpose[{timeList,θList}];

θvsTimePlot=ListLinePlot[θvsTime,Axes->False,Frame->True,ImageSize->600,FrameStyle->Directive[18,Black,Thick],FrameLabel->{"Time (s)","θ"},PlotStyle->Blue]

Export["Theta vs Time.png",θvsTimePlot,ImageSize->600];

ωList=Differences[θList]/dt; (* (s^(-1)), angular velocity *)
meanθList=MovingAverage[θList,2];

ωvsθ=Transpose[{meanθList,ωList}];

ωvsθimePlot=ListLinePlot[ωvsθ,Axes->False,Frame->True,ImageSize->600,FrameStyle->Directive[18,Black,Thick],FrameLabel->{"θ (°)"},PlotStyle->Blue]

Export["Phase Diagram.png",ωvsθimePlot,ImageSize->600];