Skip to content

Commit

Permalink
Add function showBinaryPicByTimeInterval
Browse files Browse the repository at this point in the history
  • Loading branch information
yucicheung committed Sep 2, 2018
1 parent 7163519 commit b9bb96b
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ releaseNotes.md
*.asv
createImgFromRawData.m
functions/*.m
*.mlx
12 changes: 10 additions & 2 deletions CelexMatlabToolbox_UserGuide_English.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CelexMatlabToolbox is a matlab toolbox to process the events collected using Cel
- Real-time showing and saving binary pics from raw data.
- Real-time showing and saving gray pics from raw data..
- Real-time showing and saving accumulated gray pics from raw data..
- `functions`: a collection of matlab functions.
- `functions`: a collection of matlab functions.
- Decode from raw data(`.bin` file) in batches and return events in format of `x,y,adc,t`,where `t` is the **continuous time stamp**.
- Save decoded events as mat file in memory-efficient way.
- Load events from mat file.
Expand All @@ -20,6 +20,7 @@ CelexMatlabToolbox is a matlab toolbox to process the events collected using Cel
- Show and save denoised binary pics from events.
- Show and save denoised gray pics from events.
- Display 3D events flow from events.
- Accumulate frames by specified time interval in certain range (in percentage), and user can skip the first specified amount of frames if needed and also determine the time for each frame to show.
- `demo.m`
- An executable demo file, which includes all sample usage to call the functions in folder `functions`.

Expand Down Expand Up @@ -81,4 +82,11 @@ CelexMatlabToolbox is a matlab toolbox to process the events collected using Cel

| Prototype | Description |
| :--------------------------- | :----------------------------------------------------------- |
| `showEventsFlow3D( events )` | Dynamically show the 3D events flow based on the input `events`struct. |
| `showEventsFlow3D( events )` | Dynamically show the 3D events flow based on the input `events`struct. |

- **Accumulate frames by specified time interval**

| **Prototype** | **Description** |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| `showBinaryPicByTimeInteval(events,timeDelta,`<br>`displayTime,startPer,endPer,skipPic)` | Based on `events`, the function form each frame by `timeDelta`(ms) in events slice ranging in` [startPer,endPer] `(in percentage).User can skip the first `skipPic` pics. Showing time for each frame is `displayTime`(ms). |

Binary file removed CelexMatlabToolbox_UserGuide_English.pdf
Binary file not shown.
10 changes: 9 additions & 1 deletion CelexMatlabToolbox_UserGuide_中文.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ CelexMatlabToolbox是针对Celex IV的采集数据进行处理的Matlab工具箱
- 累积式灰度图的显示及存储;
- 去噪二值图的显示及存储;
- 去噪灰度图的显示及存储;
- 事件流的三维动态显示。
- 事件流的三维动态显示;
- 在指定区间内,基于规定时间片累积帧,并按照指定帧率慢放二值图片,可以根据需要跳过前若干张图片。
- `demo.m`
- 可运行的示例文件,提供对所有工具箱函数的调用示例。

Expand Down Expand Up @@ -82,3 +83,10 @@ CelexMatlabToolbox是针对Celex IV的采集数据进行处理的Matlab工具箱
| 函数原型 | 功能描述 |
| ---------------------------- | ------------------------------------------ |
| `showEventsFlow3D( events )` | 根据输入的`events`结构体动态显示三维事件流 |

- **规定区间内基于固定事件片累积**

| 函数原型 | 功能描述 |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| `showBinaryPicByTimeInteval(events,timeDelta,`<br>`displayTime,startPer,endPer,skipPic)` | 输入`events`结构体,根据`timeDelta`(ms)事件百分比区间`[startPer,endPer]`中跳过前`skipPic`张图片开始显示,每张图片显示时间为`displayTime`ms。 |

Binary file removed CelexMatlabToolbox_UserGuide_中文.pdf
Binary file not shown.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CelexMatlabToolbox is a matlab toolbox to process the events collected using Cel
- Real-time showing and saving binary pics from raw data.
- Real-time showing and saving gray pics from raw data.
- Real-time showing and saving accumulated gray pics from raw data.
- `functions`: a collection of matlab functions.
- `functions`: a collection of matlab functions.
- Decode from raw data(`.bin` file) in batches and return events in format of `x,y,adc,t`,where `t` is the **continuous time stamp**.
- Save decoded events as mat file in memory-efficient way.
- Load events from mat file.
Expand All @@ -21,6 +21,7 @@ CelexMatlabToolbox is a matlab toolbox to process the events collected using Cel
- Show and save denoised binary pics from events.
- Show and save denoised gray pics from events.
- Display 3D events flow from events.
- Accumulate frames by specified time interval in certain range (in percentage), and user can skip the first specified amount of frames if needed and also determine the time for each frame to show.
- `demo.m`
- An executable demo file, which **includes all sample usage to call the functions in folder `functions`.**

Expand All @@ -47,10 +48,10 @@ CelexMatlabToolbox is a matlab toolbox to process the events collected using Cel

## TODO

- [x] Visualizing by accumulating events through a specified time interval.
- [ ] Take spatial connection into consideration to improve denoising results.
- [ ] Take FPN into consideration to improve denoising results.
- [ ] Add `overlap` parameter for visualizing.
- [ ] Visualizing by accumulating events through a specified time interval.

## LICENSE

Expand Down
6 changes: 3 additions & 3 deletions README_中文.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ CelexMatlabToolbox是针对Celex IV的采集数据进行处理的Matlab工具箱
- 累积式灰度图的显示及存储;
- 去噪二值图的显示及存储;
- 去噪灰度图的显示及存储;
- 事件流的三维动态显示。
- 事件流的三维动态显示;
- 在指定区间内,基于规定时间片累积帧,并按照指定帧率慢放二值图片,可以根据需要跳过前若干张图片。
- `demo.m`
- 可运行的示例文件,**提供对所有工具箱函数的调用示例**

Expand All @@ -48,11 +49,10 @@ CelexMatlabToolbox是针对Celex IV的采集数据进行处理的Matlab工具箱
![运行节](pics/runCodeSection.png)

## TODO

- [x] 基于时间片段的事件累积
- [ ] 考虑空间关联特性改进去噪效果
- [ ] 考虑FPN改进去噪效果
- [ ] 对于事件显示加入`overlap`参数
- [ ] 基于时间片段的事件累积

## LICENSE

Expand Down
12 changes: 8 additions & 4 deletions demo.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
upperADC=511;
lowerADC=0;
bytesPerEvent=4;
timeResolution=40; %ns
timeResolution=4e-5; %ms
%% Convert all events to pixels in format [x,y,a,t] and save as mat in memory-efficient way
binName='Recording_20180705_124529343_E_25MHz_tennis_thresh40.bin';
binDir='D:/03DVS_BinFile/ver2_1/classifiedBin';
Expand Down Expand Up @@ -77,6 +77,10 @@
% showDenoisedGrayComparison(events,eventDelta,displayTime)

%% Accumulate Pic by timeInterval
timeDelta=1e-5;
displayTime=1e-11;
showAllPicAccumulatedByTimeInteval( events,timeDelta,displayTime );
timeDelta=0.1; % ms
displayTime=25; % ms
startPer=0.2; % percent of index to start
endPer=0.3; % percent of index to end
skipPic=5000; % num of skipped pics from the start index under order of "timeDelta"

showBinaryPicByTimeInteval(events,timeDelta,displayTime,startPer,endPer,skipPic);
Binary file removed functions/showAllPicAccumulatedByTimeInteval.p
Binary file not shown.
Binary file added functions/showBinaryPicByTimeInteval.p
Binary file not shown.

0 comments on commit b9bb96b

Please sign in to comment.