Skip to content

mattg: edits to allow rpicam_file example to work on hard coded value… #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

matthewverde
Copy link

mattg: edits to allow rpicam_file example to work on hard coded values, and draw image to a canvas

import tkinter
from tkinter import *

def getRGBHex(value, color):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function for setting hex value for the value received from raw file

# example of passing a filter over the rawframe before it is saved. This will simply print the dimensions of the raw image.
def print_dimensions(rawFrame):
print(rawFrame.shape)
height, width = rawFrame.shape
for x in range(0, 1700): # width
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

draw the raw image to canvas

return rawFrame

# pass camera reference into the converter.
r = RPICAM2DNG(camera)
r.options(path="", compress=True)
r.options(path="C:/Users/matth/code/PiDNG/raw-test-full-sensor", compress=False)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set working dir

r.filter = print_dimensions
r.convert(data, filename="output")
r.convert(data, filename="./full-sensor-test")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set output dng file name, dng file extension gets added by default

@@ -0,0 +1,18 @@
import subprocess
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore this file for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant