[問題] 程式效率
請問各位版友
最近小弟在撰寫視窗程式搭配攝影機
原本預期每秒可以達30張frame(我開了兩個都是640*480的視窗)
但是在實作了一些演算法後 每秒的frame數變成只有15
雖然對於人眼看起來是沒差 但是總想將程式變成最佳化
我目前的做法有:
1.演算法的部分盡量使用C/C++函式庫
2.迴圈改成foreach或是parallel.foreach
3.用指標格式去access每張影像中的pixel
目前有想到可以更有效率的的是使用thread
另開一個thread去處理演算法
但是對thread還不熟也還在研究中
不知道其他版友們有什麼更高效率的作法呢?
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.118.20.62
→
06/16 21:18, , 1F
06/16 21:18, 1F
→
06/16 21:19, , 2F
06/16 21:19, 2F
→
06/16 21:19, , 3F
06/16 21:19, 3F
→
06/16 21:19, , 4F
06/16 21:19, 4F
→
06/16 21:25, , 5F
06/16 21:25, 5F
→
06/16 21:25, , 6F
06/16 21:25, 6F
推
06/16 22:02, , 7F
06/16 22:02, 7F
→
06/16 22:04, , 8F
06/16 22:04, 8F
→
06/16 22:05, , 9F
06/16 22:05, 9F
→
06/16 22:06, , 10F
06/16 22:06, 10F
推
06/16 22:41, , 11F
06/16 22:41, 11F
→
06/16 22:42, , 12F
06/16 22:42, 12F
→
06/16 22:51, , 13F
06/16 22:51, 13F
→
06/16 22:51, , 14F
06/16 22:51, 14F
→
06/16 22:52, , 15F
06/16 22:52, 15F
推
06/17 00:35, , 16F
06/17 00:35, 16F
推
06/17 02:02, , 17F
06/17 02:02, 17F
→
06/17 03:36, , 18F
06/17 03:36, 18F
推
06/17 13:57, , 19F
06/17 13:57, 19F
→
06/17 13:57, , 20F
06/17 13:57, 20F
→
06/17 13:59, , 21F
06/17 13:59, 21F
→
06/17 14:00, , 22F
06/17 14:00, 22F
→
06/17 16:15, , 23F
06/17 16:15, 23F
→
06/17 16:15, , 24F
06/17 16:15, 24F
→
06/17 16:16, , 25F
06/17 16:16, 25F
→
06/17 16:16, , 26F
06/17 16:16, 26F
→
06/17 19:15, , 27F
06/17 19:15, 27F
→
06/17 19:15, , 28F
06/17 19:15, 28F
→
06/17 19:16, , 29F
06/17 19:16, 29F
推
06/18 01:46, , 30F
06/18 01:46, 30F
推
06/18 01:56, , 31F
06/18 01:56, 31F
→
06/18 01:56, , 32F
06/18 01:56, 32F
→
06/18 01:58, , 33F
06/18 01:58, 33F
→
06/18 02:08, , 34F
06/18 02:08, 34F
→
06/18 02:09, , 35F
06/18 02:09, 35F
→
06/18 02:09, , 36F
06/18 02:09, 36F
推
06/18 02:24, , 37F
06/18 02:24, 37F
→
06/18 02:25, , 38F
06/18 02:25, 38F
→
06/18 14:02, , 39F
06/18 14:02, 39F
→
06/18 14:11, , 40F
06/18 14:11, 40F
→
06/18 14:24, , 41F
06/18 14:24, 41F
→
06/18 14:24, , 42F
06/18 14:24, 42F
→
06/18 14:25, , 43F
06/18 14:25, 43F
→
06/18 14:26, , 44F
06/18 14:26, 44F
→
06/18 14:34, , 45F
06/18 14:34, 45F
→
06/18 14:34, , 46F
06/18 14:34, 46F
→
06/18 14:37, , 47F
06/18 14:37, 47F
→
06/18 14:38, , 48F
06/18 14:38, 48F
→
06/18 14:40, , 49F
06/18 14:40, 49F
→
06/18 14:41, , 50F
06/18 14:41, 50F
→
06/18 14:47, , 51F
06/18 14:47, 51F
→
06/18 14:47, , 52F
06/18 14:47, 52F
→
06/18 15:04, , 53F
06/18 15:04, 53F
→
06/18 15:05, , 54F
06/18 15:05, 54F
→
06/18 17:24, , 55F
06/18 17:24, 55F
→
06/18 17:24, , 56F
06/18 17:24, 56F
→
06/18 17:27, , 57F
06/18 17:27, 57F
→
06/18 18:32, , 58F
06/18 18:32, 58F
→
06/18 18:33, , 59F
06/18 18:33, 59F
→
06/18 18:33, , 60F
06/18 18:33, 60F
→
06/18 18:34, , 61F
06/18 18:34, 61F
→
06/18 18:35, , 62F
06/18 18:35, 62F
C_Sharp 近期熱門文章
PTT數位生活區 即時熱門文章