naps.cores.video package

Submodules

naps.cores.video.adapters module

class naps.cores.video.adapters.ImageStream2PacketizedStream(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

Convert an ImageStream to a packetized Stream by producing one packet per frame

elaborate(platform)
class naps.cores.video.adapters.PacketizedStream2ImageStream(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

Convert a Packetized stream to an Image stream by creating lines with width

elaborate(platform)

naps.cores.video.adapters_test module

class naps.cores.video.adapters_test.AdaptersTest(methodName='runTest')

Bases: unittest.case.TestCase

test_PacketizedStream2ImageStream()

naps.cores.video.debayer module

class naps.cores.video.debayer.RecoloringDebayerer(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

Debayer an image by simply coloring the pixels in the correct color

elaborate(platform)
class naps.cores.video.debayer.SimpleInterpolatingDebayerer(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

Debayer an image by interpolating the colour with the neighbouring pixels

elaborate(platform)

naps.cores.video.debayer_test module

class naps.cores.video.debayer_test.DebayerTest(methodName='runTest')

Bases: unittest.case.TestCase

check_output_stable(debayerer_gen)
test_output_stable_recoloring_debayerer()
test_output_stable_simple_interpolating_debayerer()

naps.cores.video.demo_source module

naps.cores.video.demo_source.BertlDemoVideoSource(*args, **kwargs)
naps.cores.video.demo_source.BlinkDemoVideoSource(payload_shape, *args, **kwargs)
naps.cores.video.demo_source.GradientDemoVideoSource(direction_y=True, divider=2, *args, **kwargs)
naps.cores.video.demo_source.SolidColorDemoVideoSource(r=0, g=0, b=0, *args, **kwargs)

naps.cores.video.focus_peeking module

class naps.cores.video.focus_peeking.FocusPeeking(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

Adds A focus peeking overlay to the image

elaborate(platform)

naps.cores.video.gamma_corrector module

class naps.cores.video.gamma_corrector.TableGammaCorrector(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

Apply gamma correction to a monochrome image using a pre-computed lookup table

elaborate(platform)

naps.cores.video.gamma_corrector_test module

class naps.cores.video.gamma_corrector_test.GammaCorrectorTest(methodName='runTest')

Bases: unittest.case.TestCase

check_output(corrector_gen, gamma)
test_output_table_gamma_corrector_decode()
test_output_table_gamma_corrector_encode()
test_output_table_gamma_corrector_nop()

naps.cores.video.image_convoluter module

class naps.cores.video.image_convoluter.ImageConvoluter(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

elaborate(platform)

naps.cores.video.image_convoluter_test module

class naps.cores.video.image_convoluter_test.ImageProxyTest(methodName='runTest')

Bases: unittest.case.TestCase

test_illegal_expr()
test_request()
test_request_equal()
test_request_neg()
test_request_zero()
class naps.cores.video.image_convoluter_test.VideoTransformerTest(methodName='runTest')

Bases: unittest.case.TestCase

check_move_transformer(transform_xy, testdata, testdata_transformed, crop_top=0, crop_left=0, crop_bottom=0, crop_right=0)
check_non_moving_xy(transformer_function, crop_top=0, crop_left=0, crop_bottom=0, crop_right=0)
test_non_moving_xy_passthrough()
test_non_moving_xy_pattern()
test_non_moving_xy_shift_negative()
test_non_moving_xy_shift_positive()
test_passthrough_transformer()
test_shift_1x_negative_transformer()
test_shift_1x_positive_transformer()
test_shift_1y_negative_transformer()
test_shift_1y_positive_transformer()

naps.cores.video.image_stream module

class naps.cores.video.image_stream.ImageStream(payload_shape, name=None, src_loc_at=1)

Bases: naps.stream.stream.BasicStream

A stream that can be used to transfer image data.

naps.cores.video.rearrange module

class naps.cores.video.rearrange.BlackLineGenerator(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

generates a frame of infinite height and defined length. the generated frame is all black

elaborate(platform)
class naps.cores.video.rearrange.ImageCombiner(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

Combines image streams to a larger image stream by either putting them side by side or interleaving them. May deadlock if the input streams are not enough buffered.

elaborate(platform)
class naps.cores.video.rearrange.ImageSplitter(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

Splits each image in four sub images. From each 4x4 pixel cluster each image receives one pixel. This can eg. be handy to decompose bayer data.

elaborate(platform)
class naps.cores.video.rearrange.ImageSplitter2(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

Splits an Image into n chunks horizontally

elaborate(platform)

naps.cores.video.rearrange_test module

class naps.cores.video.rearrange_test.TestImageSplitter2(methodName='runTest')

Bases: unittest.case.TestCase

test_image()

naps.cores.video.resizer module

class naps.cores.video.resizer.VideoResizer(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

Resize an ImageStream by cropping it / extending it with blackness to the desired resolution

elaborate(platform)

naps.cores.video.rgb module

naps.cores.video.rgb.RGB24

alias of naps.cores.video.rgb.RGB

naps.cores.video.rgb.RGB565

alias of naps.cores.video.rgb.RGB

naps.cores.video.test_util module

naps.cores.video.test_util.crop(frame, left=0, right=0, top=0, bottom=0)
naps.cores.video.test_util.read_frame_from_stream(stream, timeout=100, pause=False)
naps.cores.video.test_util.to_8bit_rgb(image_24bit)
naps.cores.video.test_util.write_frame_to_stream(stream, frame, timeout=100, pause=False)

Module contents