FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
arrayfire-lua/examples/graphics/histogram.lua at master · arrayfire/arrayfire-lua · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
arrayfire
/
arrayfire-lua
Public
Notifications
You must be signed in to change notification settings
Fork
5
Star
10
Code
Issues
1
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
arrayfire-lua
/
examples
/
graphics
/
histogram.lua
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (22 loc) · 815 Bytes
Breadcrumbs
arrayfire-lua
/
examples
/
graphics
/
histogram.lua
Copy path
File metadata and controls
24 lines (22 loc) · 815 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--[[
/*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
********************************************************/
]]
--
Modules --
local
AF
=
require
(
"
arrayfire
"
)
AF
.
main
(
function
()
local
myWindow
=
AF
.
Window
(
512
,
512
,
"
Histogram example using ArrayFire
"
)
local
imgWnd
=
AF
.
Window
(
480
,
640
,
"
Input Image
"
)
local
img
=
AF
.
loadImage
(
AF
.
assets
()
..
"
/examples/images/arrow.jpg
"
,
false
)
local
hist_out
=
AF
.
histogram
(
img
,
256
,
0
,
255
)
AF
.
EnvLoopWhile
(
function
()
myWindow
:
hist
(
hist_out
,
0
,
255
)
imgWnd
:
image
(
img
:
as
(
"
u8
"
))
end
,
AF
.
wait_for_windows_close
(
"
while
"
,
myWindow
,
imgWnd
))
end
)
Back
|
FazBrowse Home
|
New Git URL