第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

我如何使用 peak_detection 功能 - Android studio

我如何使用 peak_detection 功能 - Android studio

森林海 2021-09-12 10:30:13
我正在嘗試使用此功能,但遇到了一些錯誤。我將使用此功能從 FastICA 實現(xiàn)實時檢測來自 Android 相機(jī)的 RGB 圖像的峰值。我正在使用Double[] Green = ArrayUtils.toObject(arrayGreen);FastICA 的第一個參數(shù)輸出工作正常。我正在使用double delta=10;第二個參數(shù)并且很好。我在使用第三個參數(shù)時遇到問題,因為我不明白哪個是我需要的第三個參數(shù)。我試圖創(chuàng)建一個List<Integer> indices = new ArrayList<Integer>();但沒有工作。有人可以幫我嗎?提前致謝我正在嘗試的代碼:import java.util.ArrayList;import java.util.List;import java.util.HashMap;import java.util.Map;public abstract class CustomUtils {    /**     * Detects peaks (calculates local minima and maxima) in the      * vector <code>values</code>. The resulting list contains     * maxima at the first position and minima at the last one.     *      * Maxima and minima maps contain the indice value for a     * given position and the value from a corresponding vector.     *      * A point is considered a maximum peak if it has the maximal     * value, and was preceded (to the left) by a value lower by     * <code>delta</code>.     *      * @param values Vector of values for whom the peaks should be detected     * @param delta The precedor of a maximum peak     * @param indices Vector of indices that replace positions in resulting maps     * @return List of maps (maxima and minima pairs) of detected peaks     */編輯 使用第二個函數(shù)到第一個我遇到這個錯誤:
查看完整描述

1 回答

?
慕萊塢森

TA貢獻(xiàn)1810條經(jīng)驗 獲得超4個贊

第三個參數(shù)有點奇怪——它是對應(yīng)最小值和最大值的名稱列表。因此,假設(shè)數(shù)據(jù)中的位置 1 處有 1,并且您將帶有列表的第三個參數(shù)(“A”、“B”、“C”)傳遞給它。返回值將是一個映射(“B”-> 最大值)。

它的代碼很奇怪,我不確定他們?yōu)槭裁催@樣做。這似乎是一種非常不方便的做事方式。另外,我認(rèn)為如果 index.size() < values.size() 他們的代碼會崩潰

請注意,它們的函數(shù)的 2 值版本正在傳入一個 (1,2,3,4,...n) 數(shù)組,其中 n 是數(shù)據(jù)中值的數(shù)量。在這種情況下,返回值將是(位置索引->最大值/最小值)的映射。這似乎是您應(yīng)該使用它的唯一方法。


查看完整回答
反對 回復(fù) 2021-09-12
  • 1 回答
  • 0 關(guān)注
  • 103 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號