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

14
LINES

< > BotCompany Repo | #1035863 // binaryImagePixelDifference_sameSize - number of differing pixels

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (11494L/64K).

static int binaryImagePixelDifference_sameSize(Image2B img1, Image2B img2) {
  assertSameSize(img1, img2);
  ret countDifferingBits(img1.pixels, img2.pixels);
}

static int binaryImagePixelDifference_sameSize(Image2BAsInts img1, Image2BAsInts img2) {
  assertSameSize(img1, img2);
  ret countDifferingBits(img1.pixels, img2.pixels);
}

static int binaryImagePixelDifference_sameSize(Image2BAsLongs img1, Image2BAsLongs img2) {
  assertSameSize(img1, img2);
  ret countDifferingBits(img1.pixels, img2.pixels);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1035863
Snippet name: binaryImagePixelDifference_sameSize - number of differing pixels
Eternal ID of this version: #1035863/7
Text MD5: c9ef8ae28e29d66d222050610be8cdcf
Transpilation MD5: 3e47dbe0c2012b3ec0a2ce1558282dca
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-09-03 01:42:17
Source code size: 523 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 155 / 244
Version history: 6 change(s)
Referenced in: [show references]