Giter Club home page Giter Club logo

color-grading's People

Contributors

steveseguin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

color-grading's Issues

I made something wrong, but not sure where.

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.
wrong_card
wrong_rgb
expected:
expected

ref card
ref_card_int
wrong
wrong_lut

Tweak the code to deal with target arrays with sizes other than 3x3

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.