Looking Back 2018

不管农历年还是阳历年了,2018年的感想还是得写写的,至于简述事件什么的……感觉发生的事蛮多的,记忆也比较模糊,写出来又臭又长没啥劲。
前半年的高中没啥好说的,最后高考的结果不能说后悔吧,考上的这个大学肯定不差,自己的文化课水平毕竟本来就达不到前几名的大学,能来到这里应该算比较知足了吧,前几天和shallwe,Dmoon,abclzr回高中看了看,和几个老师聊了聊,对学校将来的发展感到十分担忧(各种意义上的),同时也庆幸自己早生一年。
说到大学生活,总感觉这个学期在专业课上没学到很多有用的东西,感觉一直在吃老本,想自学点别的又被各种因素牵制住,最后啥都不会;英语提升了一点点但比起周围人还是差远了;关于课余生活在头一个月感觉还很好,比较符合对大学生活的期望,但之后就变得越来越怠惰,一直在退步,害怕会变成之前了解到的那种混吃等死的状态。
前两天看到说知乎上有人讨论nju逐渐没落,讲到了大部分同学们的一些行为和生活方式并进行了一番批判,我突然发现这不是自己生活的写照吗,并且又对未来保持悲观态度;寒假里对专业课安排的学习感觉也不是很顺利,对理论证明这一方面感觉好缺乏,大部分都是只会用或者感性证明,难以做到严格完整的讨论,我也在想:未来的自己究竟适不适合做学术方面的研究呢?
还有就是寒假里想自学一点东西,结果到现在八字还没一撇,就拿python来说,纠结了一个多星期的ide,最终结果是放弃ide(?);好在英语算是能坚持一下,慢慢提升吧。
高中时对大学的幻想不符合实际,预定的计划也没怎么实现,这就是2018,我的高中、大学过渡之年

请详细解释下这段代码void FaceTracker::OnNewFaceData( const std::vector<human_sensing::CrosFace>& faces) { // Given |f1| and |f2| from two different (usually consecutive) frames, treat // the two rectangles as the same face if their position delta is less than // kFaceDistanceThresholdSquare. // // This is just a heuristic and is not accurate in some corner cases, but we // don't have face tracking. auto is_same_face = [&](const Rect<float>& f1, const Rect<float>& f2) -> bool { const float center_f1_x = f1.left + f1.width / 2; const float center_f1_y = f1.top + f1.height / 2; const float center_f2_x = f2.left + f2.width / 2; const float center_f2_y = f2.top + f2.height / 2; constexpr float kFaceDistanceThresholdSquare = 0.1 * 0.1; const float dist_square = std::pow(center_f1_x - center_f2_x, 2.0f) + std::pow(center_f1_y - center_f2_y, 2.0f); return dist_square < kFaceDistanceThresholdSquare; }; for (const auto& f : faces) { FaceState s = { .normalized_bounding_box = Rect<float>( f.bounding_box.x1 / options_.active_array_dimension.width, f.bounding_box.y1 / options_.active_array_dimension.height, (f.bounding_box.x2 - f.bounding_box.x1) / options_.active_array_dimension.width, (f.bounding_box.y2 - f.bounding_box.y1) / options_.active_array_dimension.height), .last_detected_ticks = base::TimeTicks::Now(), .has_attention = std::fabs(f.pan_angle) < options_.pan_angle_range}; bool found_matching_face = false; for (auto& known_face : faces_) { if (is_same_face(s.normalized_bounding_box, known_face.normalized_bounding_box)) { found_matching_face = true; if (!s.has_attention) { // If the face isn't looking at the camera, reset the timer. s.first_detected_ticks = base::TimeTicks::Max(); } else if (!known_face.has_attention && s.has_attention) { // If the face starts looking at the camera, start the timer. s.first_detected_ticks = base::TimeTicks::Now(); } else { s.first_detected_ticks = known_face.first_detected_ticks; } known_face = s; break; } } if (!found_matching_face) { s.first_detected_ticks = base::TimeTicks::Now(); faces_.push_back(s); } } // Flush expired face states. for (auto it = faces_.begin(); it != faces_.end();) { if (ElapsedTimeMs(it->last_detected_ticks) > options_.face_phase_out_threshold_ms) { it = faces_.erase(it); } else { ++it; } } }
最新发布
06-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值