Þ ¥bonds€¬cell_results„Ù$1feb465a-e51e-11ea-3bca-8b7634072120Цqueued¤logs�§running¦output†¤bodyÚ
Enable webcam
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ²!ÿ°persist_js_state·has_pluto_hook_features§cell_idÙ$1feb465a-e51e-11ea-3bca-8b7634072120¹depends_on_disabled_cells§runtimeÎG�Aµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$762e167e-e51d-11ea-0721-e566ca397423Цqueued¤logs�§running¦output†¤bodyÙ-camera_input (generic function with 1 method)¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚvG°persist_js_state·has_pluto_hook_features§cell_idÙ$762e167e-e51d-11ea-0721-e566ca397423¹depends_on_disabled_cells§runtimeÎ }<µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$b395e806-e51e-11ea-12f1-7f05ee45cbbdЦqueued¤logs�§running¦output†¤bodyÙ8process_raw_camera_data (generic function with 1 method)¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ✰persist_js_state·has_pluto_hook_features§cell_idÙ$b395e806-e51e-11ea-12f1-7f05ee45cbbd¹depends_on_disabled_cells§runtimeÎ WÛµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$60d58bd8-e51e-11ea-328c-29f3c0d3d6bbЦqueued¤logs�§running¦output†¤body§missing¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚÖÅΰpersist_js_state·has_pluto_hook_features§cell_idÙ$60d58bd8-e51e-11ea-328c-29f3c0d3d6bb¹depends_on_disabled_cells§runtimeÍ$*µpublished_object_keys�¸depends_on_skipped_cells§errored±cell_dependencies„Ù$1feb465a-e51e-11ea-3bca-8b7634072120„´precedence_heuristic §cell_idÙ$1feb465a-e51e-11ea-3bca-8b7634072120´downstream_cells_map�¡i‘Ù$60d58bd8-e51e-11ea-328c-29f3c0d3d6bb²upstream_cells_mapˆ¤Core�¤Base�·PlutoRunner.create_bond�«PlutoRunner�¬camera_input‘Ù$762e167e-e51d-11ea-0721-e566ca397423¯Core.applicable�¥@bind�¨Base.get�Ù$762e167e-e51d-11ea-0721-e566ca397423„´precedence_heuristic §cell_idÙ$762e167e-e51d-11ea-0721-e566ca397423´downstream_cells_map�¬camera_input‘Ù$1feb465a-e51e-11ea-3bca-8b7634072120²upstream_cells_map‚¤HTML�¢|>�Ù$b395e806-e51e-11ea-12f1-7f05ee45cbbd„´precedence_heuristic §cell_idÙ$b395e806-e51e-11ea-12f1-7f05ee45cbbd´downstream_cells_map�·process_raw_camera_data�²upstream_cells_mapˆ¥UInt8�¡:�£RGB�§reshape�¡/�§adjoint�¤conj�£end�Ù$60d58bd8-e51e-11ea-328c-29f3c0d3d6bb„´precedence_heuristic §cell_idÙ$60d58bd8-e51e-11ea-328c-29f3c0d3d6bb´downstream_cells_map€²upstream_cells_map�¡i‘Ù$1feb465a-e51e-11ea-3bca-8b7634072120´cell_execution_order”Ù$762e167e-e51d-11ea-0721-e566ca397423Ù$1feb465a-e51e-11ea-3bca-8b7634072120Ù$60d58bd8-e51e-11ea-328c-29f3c0d3d6bbÙ$b395e806-e51e-11ea-12f1-7f05ee45cbbd´last_hot_reload_timeË ©shortpathcamera_old.jl®process_status¥ready¤pathÙC/home/runner/work/disorganised-mess/disorganised-mess/camera_old.jlpluto_version¨v0.19.47®last_save_timeËAÚ‰Õªªcell_order”Ù$60d58bd8-e51e-11ea-328c-29f3c0d3d6bbÙ$1feb465a-e51e-11ea-3bca-8b7634072120Ù$762e167e-e51d-11ea-0721-e566ca397423Ù$b395e806-e51e-11ea-12f1-7f05ee45cbbd±published_objects€¥nbpkgНinstall_time_nsΨsðL¬instantiatedòinstalled_versions€°terminal_outputs�ªnbpkg_syncÚÇ
[0m[1mInstantiating...[22m
[90m===[39m
[32m[1m No Changes[22m[39m to `/tmp/jl_Pz4b9D/Project.toml`
[32m[1m No Changes[22m[39m to `/tmp/jl_Pz4b9D/Manifest.toml`
[0m[1mResolving...[22m
[90m===[39m
[32m[1m No Changes[22m[39m to `/tmp/jl_Pz4b9D/Project.toml`
[32m[1m No Changes[22m[39m to `/tmp/jl_Pz4b9D/Manifest.toml`
[0m[1mPrecompiling...[22m
[90m===[39m
[32m[1m Activating[22m[39m new project at `/tmp/jl_Pz4b9D`§enabled÷restart_recommended_msgÀ´restart_required_msgÀbusy_packages�¶waiting_for_permissionÂÙ,waiting_for_permission_but_probably_disabled«cell_inputs„Ù$1feb465a-e51e-11ea-3bca-8b7634072120„§cell_idÙ$1feb465a-e51e-11ea-3bca-8b7634072120¤code¶@bind i camera_input()¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$762e167e-e51d-11ea-0721-e566ca397423„§cell_idÙ$762e167e-e51d-11ea-0721-e566ca397423¤codeÚ>function camera_input(;maxsize=200, default_url="https://i.imgur.com/VGPeJ6s.jpg")
"""
Enable webcam
""" |> HTML
end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$b395e806-e51e-11ea-12f1-7f05ee45cbbd„§cell_idÙ$b395e806-e51e-11ea-12f1-7f05ee45cbbd¤codeÚ¨function process_raw_camera_data(raw_camera_data)
# the raw image data is a long byte array, we need to transform it into something
# more "Julian" - something with more _structure_.
# The encoding of the raw byte stream is:
# every 4 bytes is a single pixel
# every pixel has 4 values: Red, Green, Blue, Alpha
# (we ignore alpha for this notebook)
# So to get the red values for each pixel, we take every 4th value, starting at
# the 1st:
reds_flat = UInt8.(raw_camera_data["data"][1:4:end])
greens_flat = UInt8.(raw_camera_data["data"][2:4:end])
blues_flat = UInt8.(raw_camera_data["data"][3:4:end])
# but these are still 1-dimensional arrays, nicknamed 'flat' arrays
# We will 'reshape' this into 2D arrays:
width = raw_camera_data["width"]
height = raw_camera_data["height"]
# shuffle and flip to get it in the right shape
reds = reshape(reds_flat, (width, height))' / 255.0
greens = reshape(greens_flat, (width, height))' / 255.0
blues = reshape(blues_flat, (width, height))' / 255.0
# we have our 2D array for each color
# Let's create a single 2D array, where each value contains the R, G and B value of
# that pixel
RGB.(reds, greens, blues)
end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$60d58bd8-e51e-11ea-328c-29f3c0d3d6bb„§cell_idÙ$60d58bd8-e51e-11ea-328c-29f3c0d3d6bb¤code¡i¨metadataƒ©show_logsèdisabled®skip_as_script«code_folded«notebook_idÙ$1ab5ee0a-4aaa-11f0-3cbe-11f5d87ab455«in_temp_dir¨metadata€