public void SetNumSlices(int num_slices) { num_slices_ = num_slices; slices_ = new PSMoveSharpCameraFrameSlice[num_slices_]; for (int i = 0; i < num_slices; i++) { slices_[i] = new PSMoveSharpCameraFrameSlice(); } }
public PSMoveSharpCameraFrameStateCollector() { num_slices_ = 1; current_index_ = 0; slices_ = new PSMoveSharpCameraFrameSlice[num_slices_]; slices_[0] = new PSMoveSharpCameraFrameSlice(); last_state_ = new PSMoveSharpState(); complete_state_ = new PSMoveSharpState(); complete_image_ = new List <byte[]>(); }
public void ProcessPacket(int index, byte[] image, int row_start, int row_count) { PSMoveSharpCameraFrameSlice slice = new PSMoveSharpCameraFrameSlice(); slice.index = index; slice.image = image; slice.row_start = row_start; slice.row_count = row_count; camera_frame_state_rwl.AcquireWriterLock(-1); camera_frame_state_collector.AddSlice(slice); camera_frame_state_rwl.ReleaseWriterLock(); }
public void AddSlice(PSMoveSharpCameraFrameSlice slice) { if (slice.index > current_index_) { // always take the latest index current_index_ = slice.index; } int rows_per_slice = ImageHeight / num_slices_; int slice_index = slice.row_start / rows_per_slice; slices_[slice_index] = slice; }
public void AddSlice(PSMoveSharpCameraFrameSlice slice) { if (slice.index > current_index_) { // always take the latest index current_index_ = slice.index; } int rows_per_slice = ImageHeight / num_slices_; int slice_index = slice.row_start / rows_per_slice; slices_[slice_index] = slice; }
public PSMoveSharpCameraFrameStateCollector() { num_slices_ = 1; current_index_ = 0; slices_ = new PSMoveSharpCameraFrameSlice[num_slices_]; slices_[0] = new PSMoveSharpCameraFrameSlice(); last_state_ = new PSMoveSharpState(); complete_state_ = new PSMoveSharpState(); complete_image_ = new List<byte[]>(); }
public void ProcessPacket(int index, byte[] image, int row_start, int row_count) { PSMoveSharpCameraFrameSlice slice = new PSMoveSharpCameraFrameSlice(); slice.index = index; slice.image = image; slice.row_start = row_start; slice.row_count = row_count; camera_frame_state_rwl.AcquireWriterLock(-1); camera_frame_state_collector.AddSlice(slice); camera_frame_state_rwl.ReleaseWriterLock(); }
public void SetNumSlices(int num_slices) { num_slices_ = num_slices; slices_ = new PSMoveSharpCameraFrameSlice[num_slices_]; for (int i = 0; i < num_slices; i++) { slices_[i] = new PSMoveSharpCameraFrameSlice(); } }
public PSMoveSharpCameraFrameStateCollector() { num_slices_ = 1; current_index_ = 0; slices_ = new PSMoveSharpCameraFrameSlice[num_slices_]; slices_[0] = new PSMoveSharpCameraFrameSlice(); last_state_ = new PSMoveSharpState(); complete_state_ = new PSMoveSharpState(); complete_image_ = new Bitmap(640, 480); complete_bitmap_ = new Bitmap(640, 480); }