Skip to content

Instantly share code, notes, and snippets.

@victormurcia
Created October 21, 2022 03:29
Show Gist options
  • Select an option

  • Save victormurcia/cb0b931d69ab43ac87acdca841b0ecc4 to your computer and use it in GitHub Desktop.

Select an option

Save victormurcia/cb0b931d69ab43ac87acdca841b0ecc4 to your computer and use it in GitHub Desktop.
process entire soccer game footage for color detection
def getJerseyColorsFromGame(jsonPath,MP4Path,whichVideo,nClusters):
mp4_list = getListOfFiles(MP4Path , ".mp4")
n_mp4 = len(mp4_list)
df_list = []
for vid in range(n_mp4):
jerseyColor_df = getJerseyColorsFromMP4(jsonPath,MP4Path,vid,nClusters)
df_list.append(jerseyColor_df)
allJerseyColors = pd.concat(df_list)
return allJerseyColors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment