Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1018840 // audio_streaksUsingBand_v1

JavaX fragment (include)

static L<IntRange> audio_streaksUsingBand_v1(BWImage img, IntRange band, O... _) {
  BWImage bandImage = clipBWImage(img, 0, band.start, img.getWidth(), band.end);
  BWImage img2 = bwAutoContrast(squishTo1Pixel(bandImage));
  optOutParam(_, processedImage := img2);
  float threshold = optParam(_, 'threshold, 0.5f);
  L<IntRange> streaks = findBrightHorizontalStreaks(img2, threshold);
  streaks = joinIntRangesWithDistanceLessThan(streaks, 10);
  if (boolOptParam(_, 'printStreaks)) printStruct(+streaks);
  ret streaks;
}

Author comment

Began life as a copy of #1018795

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1018840
Snippet name: audio_streaksUsingBand_v1
Eternal ID of this version: #1018840/7
Text MD5: bcc83d03eb8bfbdbe6245189b8073456
Author: stefan
Category: javax / audio
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-28 16:31:43
Source code size: 533 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 291 / 349
Version history: 6 change(s)
Referenced in: [show references]