steveseguin / color-grading Goto Github PK
View Code? Open in Web Editor NEWAutomatic LUT creator for OBS using Color Reference Cards for Calibration
License: GNU General Public License v3.0
Automatic LUT creator for OBS using Color Reference Cards for Calibration
License: GNU General Public License v3.0
Fantastic project to learn calibration @steveseguin, thank you!
I have a color reference card with known RGB values so I need exactly this project to make a correction LUT in OBS.
I shot a full size ref card with some slight perspective and it also have numbers. Maybe because of this, it doesn't see the first colors and I get more RGB values in histogram and computed LUT is incorrect .
Is there a way, in Step 4, to see/tweak which point/area it "sees" (uses)?
Here are my files enclosed to get an idea.
expected:
I tweaked the code to automatically deal with targets that aren't 3x3 grids:
Suggested step four:
color = ('r','g','b')
for x in range(total_rows):
for y in range(total_columns):
for i,col in enumerate(color):
seg = img3[int(x*w/total_rows):int((x+1)*w/total_rows),int(y*h/total_columns):int((y+1)*h/total_columns),:] # We assume each color block is the same size and that the image is cropped correctly
histr = cv2.calcHist([seg],[i],None,[256],[0,256]) # Create a histogram
j = x*total_columns+y+1
wrong[j-1][i]=np.where(np.max(histr)==histr)[0][0] # What is the PEAK color for each block? use this rather than the average RGB value.
plt.subplot(total_rows,total_columns,j)
plt.plot(histr,color = col) # Plot, so you can se what's going on.
plt.xlim([0,256])
# If successful, you should see some plots below. Each plot should have 1 blue, 1 red, and 1 green peak each.
test = np.array(wrong).reshape((total_rows,total_columns,3)).astype("uint8")
test = cv2.cvtColor(test, cv2.COLOR_RGB2BGR)
test = cv2.resize(test,(200,150),interpolation=cv2.INTER_NEAREST)
cv2_imshow(test) ## THIS IS WHAT THE INPUT IT IS; confirm it matches the photo you uploaded.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.