rolling
This commit is contained in:
parent
72e7091c61
commit
2699913e92
@ -1,5 +1,24 @@
|
||||
# how to send a line
|
||||
|
||||
real data
|
||||
```powershell
|
||||
gst-launch-1.0 idsueyesrc config-file=ini/200fps-2456x4pix-cw.ini exposure=5 framerate=300 `
|
||||
! videoconvert ! queue `
|
||||
! udpsink host=127.0.0.1 port=5000
|
||||
```
|
||||
|
||||
### Python/OpenCV Receiver
|
||||
```pwsh
|
||||
uv run scripts/recv_raw_column.py
|
||||
```
|
||||
or rolling like
|
||||
```pwsh
|
||||
uv run .\scripts\recv_raw_rolling.py
|
||||
```
|
||||
See [`scripts/recv_raw_column.py`](scripts/recv_raw_column.py) for the Python implementation with debug options.
|
||||
|
||||
|
||||
# demo data
|
||||
## Sender (crop to first column, send raw over UDP)
|
||||
```pwsh
|
||||
gst-launch-1.0 -v `
|
||||
@ -9,10 +28,6 @@ gst-launch-1.0 -v `
|
||||
udpsink host=127.0.0.1 port=5000
|
||||
```
|
||||
|
||||
**Note:** Default `videotestsrc` height is 640, not 480. Adjust caps to match your actual frame size.
|
||||
|
||||
## Receiver Options
|
||||
|
||||
### GStreamer Receiver (raw UDP → display)
|
||||
```pwsh
|
||||
gst-launch-1.0 -v `
|
||||
@ -21,9 +36,3 @@ gst-launch-1.0 -v `
|
||||
autovideosink
|
||||
```
|
||||
|
||||
### Python/OpenCV Receiver
|
||||
```pwsh
|
||||
uv run scripts/recv_raw_column.py
|
||||
```
|
||||
|
||||
See [`scripts/recv_raw_column.py`](scripts/recv_raw_column.py) for the Python implementation with debug options.
|
||||
@ -64,15 +64,18 @@ while True:
|
||||
|
||||
# Apply rotation if configured
|
||||
if ROTATION is not None:
|
||||
column = cv2.rotate(frame, ROTATION)
|
||||
rotated = cv2.rotate(frame, ROTATION)
|
||||
else:
|
||||
column = frame
|
||||
rotated = frame
|
||||
|
||||
# Insert the column into the rolling buffer at the current position
|
||||
rolling_buffer[:, current_column:current_column+COLUMN_WIDTH, :] = column
|
||||
# Extract only the first column for smoother rolling (1 pixel/frame)
|
||||
column = rotated[:, 0:1, :]
|
||||
|
||||
# Insert the single column into the rolling buffer at the current position
|
||||
rolling_buffer[:, current_column:current_column+1, :] = column
|
||||
|
||||
# Move to the next column position, wrapping around when reaching the end
|
||||
current_column = (current_column + COLUMN_WIDTH) % DISPLAY_WIDTH
|
||||
current_column = (current_column + 1) % DISPLAY_WIDTH
|
||||
|
||||
# Display the rolling buffer
|
||||
cv2.imshow("Rolling Column Stream", rolling_buffer)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user