Current Server Time: 06:21 (Central Europe)

#apertus IRC Channel Logs

2019/02/24

Timezone: UTC


23:41
lexano
left the channel
23:44
lexano
joined the channel
00:19
futarisIRCcloud
joined the channel
00:41
Bertl_oO
off to bed now ... have a good one everyone!
00:41
Bertl_oO
changed nick to: Bertl_zZ
03:08
futarisIRCcloud
left the channel
03:27
RexOrCine
changed nick to: RexOrCine|away
04:51
parimal
joined the channel
04:55
rohan_
joined the channel
05:01
rohan_
left the channel
05:07
rohan_
joined the channel
05:10
rohan_
hey BAndit1983. I tried swapping every 2 bytes which is giving a worse image
05:10
rohan_
I don't understand the mistake I'm committing. my red channel without any swapping looks like this: https://pasteboard.co/I2BjQqJ.png
05:11
rohan_
any help as to what i should try to do would be appreciated
05:13
parimal
left the channel
05:16
rohan_
left the channel
05:55
aombk
joined the channel
05:55
li
joined the channel
05:57
li
Hello, I am a movie equipment maintenance engineer from China
05:58
li
I have been following your project development progress
05:59
li
I also want to make my own movie camera
06:01
li
But I would like to know when your camera can achieve 4k raw video hard disk recording mode
06:03
BAndiT1983|away
changed nick to: BAndiT1983
06:06
BAndiT1983
hi rohan_, your image shows the typical overflowing of values, either it's caused by missing byte swap or by incorrect split of sensel values
06:07
BAndiT1983
please post the parts of code which do byte swap and also data split on pastebin, without some code it's only a guess
06:11
RexOrCine|away
changed nick to: RexOrCine
06:43
li
left the channel
06:45
li
joined the channel
06:54
li
left the channel
06:55
ayushprd
joined the channel
06:58
Cyna_
left the channel
07:26
ayushprd
left the channel
07:45
illwieckz
left the channel
08:16
illwieckz
joined the channel
09:26
parimal
joined the channel
10:02
Cyna_
joined the channel
10:10
se6astian|away
changed nick to: se6astian
10:18
RexOrCine
changed nick to: RexOrCine|away
11:09
Bertl_zZ
changed nick to: Bertl
11:09
Bertl
morning folks!
11:14
se6astian
good day
11:44
BAndiT1983
changed nick to: BAndiT1983|away
11:58
parimal
Hello Bertl
12:33
BAndiT1983|away
changed nick to: BAndiT1983
12:45
parimal
Hello BAndiT1983, I have completed T872, how should I submit it?
12:48
BAndiT1983
hi parimal
12:48
Bertl
best put it in a github repo and paste the url here
12:48
BAndiT1983
is the code structured and formatted?
12:49
Bertl
at a later time, when the actual GSoC submissions are due, you want to link it with your proposal
12:49
BAndiT1983
we got a lot of spaghetti code last year, this time i will take this also as a factor for decisions
12:49
parimal
Yes I have tried to follow the guidelines but would love some criticism
12:49
parimal
I am using cmake to build the project
12:50
parimal
Also the billinear interpolation, I added it as a dynamic library
12:50
parimal
Maybe it lacks in the documentation department, I have added one line comments to explain which part does what
12:50
parimal
Used camel casing, propoer variable names, and identation. But I have used tabs for identation, not 2 spaces as mentioned
12:50
parimal
Should I use 2 spaces?
12:51
BAndiT1983
as long as indentation is there, i won't complain
12:51
parimal
Should I share the repo here or in private message?
12:52
BAndiT1983
as the repo is probably public and it will be attached to the challenge task description for further processing, you can post it also here
12:52
RexOrCine|away
changed nick to: RexOrCine
12:52
parimal
alright
12:53
parimal
https://github.com/Parimal7/Parimal-T872
12:53
BAndiT1983
where is the libdebayer.so coming from?
12:53
parimal
the debayer.cpp in src folder
12:54
BAndiT1983
why do you attach it as separate.so?
12:54
BAndiT1983
*separate .so
12:54
parimal
Sorry I was reading about dynamic linking today itself, how should I do it?
12:55
BAndiT1983
dynamic linking is a bit of overkill for such task, although you should use it for main task later
12:55
BAndiT1983
how would you structure such an application usually?
12:55
parimal
Oh alright, it was mentioned in the task that it gives bonus points so I decided to learn it today
12:55
BAndiT1983
biggest complain first, everything is in the main()
12:56
BAndiT1983
have to look through description again, as it was written by different people at different points in time
12:56
parimal
oh alright
12:56
BAndiT1983
if you do dynamic linking, then there should be a second project in cmake, which builds the lib
12:57
Bertl
indentation and spacing is also weird
12:57
parimal
ok i will study it more, thanks
12:57
BAndiT1983
pre-compiled libs are a no-go for a project
12:57
BAndiT1983
also you need a header file for dynamic linking, so the functionality is really split
12:58
parimal
oh, the tutorial I studied didn't use one, sorry I will try again with a better resource
12:58
BAndiT1983
what have you used?
12:58
Bertl
not sure why folks can't get code formatting right ... it's not really rocket science is it? :)
12:59
parimal
https://www.geeksforgeeks.org/working-with-shared-libraries-set-2/
12:59
BAndiT1983
Bertl: it can be rocket science, as i have xilinx ISE open at the moment, besides 4k display problem, one has to search many things to find the right option for formatting etc.
13:00
parimal
Bertl, sorry, never done this before, any suggestions for better identation?
13:00
parimal
Or link me an article which you find good?
13:00
Bertl
best check the IRC logs from last year, I guess we convered almost all the indentation and spacing problems there
13:01
BAndiT1983
parimal: this tutorial is somehow off, in my opinion, to have some reusable lib you provide headers and of course .cpp files, which will be built, at the end you would have headers as API description and .so or .dll
13:01
parimal
Yeah I have been reading them too, I will find more about identation from the logs :)
13:01
Bertl
it basically boils down to where to put spaces and where to avoid them consistently
13:01
parimal
BAndiT1983, okay I will read dynamic linking properly and also how to use it with CMake
13:02
Bertl
just as an example from your code:
13:02
Bertl
++index){ <-- missing space
13:02
parimal
wow thanks, never knew there should be a space there :)
13:02
Bertl
if(index%width/2 <-- missing spaces
13:02
BAndiT1983
it's not hard to do it in cmake, but you should use second project, to have a clear line between the main application and the lib
13:03
Bertl
parimal: well, in other places you have a space after the condition
13:03
BAndiT1983
braces should be in the new line for c++, same line is so java and javascript
13:03
parimal
yes I give it randomly
13:03
Bertl
Debayer(COLORImage,arrayImage, width, height);
13:04
Bertl
what's missing here? :)
13:04
parimal
That function is from the dyanmic library I created, the libdebayer.so file, it calls the function from there
13:04
BAndiT1983
COLORImage looks a bit of a mix of C and C++
13:04
BAndiT1983
ColorImage is probably better
13:04
parimal
.so file I created myself from debayer.cpp
13:05
parimal
Okay
13:05
BAndiT1983
just a side note, no need to use uint32_t for sizes, like 4096, as uint16_t is sufficient
13:05
parimal
okay noted
13:06
Bertl
also note that using uint32_t or uint16_t will be slower for e.g. counter values, etc
13:07
Bertl
because it will not use native register sizes on some architectures
13:07
BAndiT1983
aren't they mapped according to used architecture?
13:08
Bertl
so in general, you want to go for strict sized types for stuff you need the specific size and int, long, long long for anything which doesn't care
13:08
BAndiT1983
are there benchmarks for that? as many papaers are telling to use uint*_t
13:09
BAndiT1983
there also fast versions
13:09
BAndiT1983
https://www.iar.com/globalassets/about-us/events/2016-esc-sv-efficient-embedded-programming_mg.pdf
13:11
Bertl
the test_char() vs test_int() is a good example of this
13:11
supragya_raj
joined the channel
13:11
Bertl
uint16_t will result in the same extension as test_char()
13:11
parimal
hello supgragya_raj
13:11
supragya_raj
hallo
13:11
Bertl
while using the 32bit int will be done in one cycle
13:11
parimal
I shared my repo, would you liek to have a lookj too please? :)
13:11
supragya_raj
Bertl, se6astian, BAndiT1983, parimal and all others :)
13:12
BAndiT1983
hi supragya_raj
13:12
BAndiT1983
many people were wondering about 5x5 tile stuff
13:12
supragya_raj
hmm
13:12
supragya_raj
i have seen that
13:12
BAndiT1983
i haven't got any explanation beforehand, so i also lack details to tell them
13:12
supragya_raj
wondering how to rewrite it better
13:12
BAndiT1983
you can create a sample picture or so
13:13
BAndiT1983
is it about providing values of raw data or interpolated?
13:13
supragya_raj
let me have a look myself... hang on
13:13
supragya_raj
raw data
13:13
BAndiT1983
Bertl: next page shows fast versions, which should fit the platform
13:14
supragya_raj
parimal: sure, provide the git link
13:14
BAndiT1983
is in the logs
13:15
parimal
BAndiT1983, any other improvments I can do?
13:15
BAndiT1983
yep, please split the code in functions
13:16
parimal
yeah I noted that :)
13:16
supragya_raj
seems quite a monolithic code
13:16
BAndiT1983
as some blocks are repeating, you can get away by writing a function and re-use it
13:16
parimal
Should I drop dynamic linking or work on it as you suggested?
13:16
BAndiT1983
depends on what you would like to do or to learn
13:17
supragya_raj
dynamic linking can be done when everything else is done
13:17
supragya_raj
it is just to show you can do DLLs, that's it
13:17
parimal
alright I will learn it from a better resource
13:17
BAndiT1983
is your resulting image looking correctly?
13:18
parimal
yes, should I share the pasteboard link?
13:18
supragya_raj
here's an idea - make main() sort of just a driver code which calls other functions like read_raw12(), extract_channels(), debayer_image(), savetoppm() etc
13:18
BAndiT1983
as the code looks a bit shaky there
13:18
BAndiT1983
supragya_raj: please use C++ names and not C
13:19
parimal
supgraya_raj, yes I will do that.
13:19
supragya_raj
also namespaces would be a good thing to look at as well
13:19
BAndiT1983
line 53-57 looks not correct for splitting
13:19
BAndiT1983
namespace is only usable in more complex applications, no need for that here
13:20
rohan_
joined the channel
13:20
parimal
Here is the final image I am getting - https://pasteboard.co/I2EyI1l.png
13:21
parimal
BAndiT1983, I have tried them on paper, it was converting 12 bits into 8 bits correctly
13:22
rohan_
BAndiT1983 : hey, I'll give it another go and will contact you if still I face any problems
13:22
BAndiT1983
hm, looks like you are converting without swapping, which works here, but not for general usage
13:22
BAndiT1983
rohan_: have you seen my reply in the logs?
13:22
rohan_
yes
13:23
BAndiT1983
okay, just wanted to ensure that it hasn't gone by unnoticed
13:23
BAndiT1983
parimal: is the mask really required if you already shift by 4 to the left?
13:24
parimal
I am sorry, cannot understand your question?
13:24
BAndiT1983
but in my opinion its a hacky solution which only fits the task somehow, in real processing you need every bit of information from raw
13:25
BAndiT1983
forget it, not important
13:25
parimal
Oh alright, I have another way which I read, would you like to have a look?
13:25
parimal
https://stackoverflow.com/questions/3920683/how-to-convert-a-12-bit-image-to-8-bit-in-c-c
13:25
BAndiT1983
i hope you also understand what is done there and not only copying the code
13:25
supragya_raj
ln 86-67 is a bit of an issue... 5x5 means the square tile containing 5 rows, 5 cols (first ones)
13:26
rohan_
also I went through parimal's code which runs great but is very heavily reproduced form TofuLynx's last year's code. im unable to understand the essence of the task if we don't make it all by ourselves
13:26
parimal
No, I study the code properly and type it myself
13:26
supragya_raj
hi rohan_ :)
13:26
BAndiT1983
that's why it is important to split the code, to be able to re-use and to understand individual areas
13:26
rohan_
yes there are few changes, but yet not original
13:27
BAndiT1983
ehm, the task should be solved from scratch
13:27
parimal
Yes I read the logs from last year, and studied the algorithms. I understand the code supragya_raj:)
13:27
rohan_
I have been working on my original code for a week now
13:27
BAndiT1983
students should show what they are capable of
13:27
rohan_
hi supragya_raj
13:27
supragya_raj
rohan_: I understand the issue... we take these things into consideration, don't worry
13:28
supragya_raj
you can take a look at peer's code but then references are to be mentioned if there is heavy resemblance
13:28
parimal
How would the code be any different for billinear interpolation?
13:28
parimal
I have mentioned the resources I used for the algoirthms
13:29
rohan_
thank you supragya_raj. I'm still working on my code. will show it to you guys as soon as I make more progress
13:29
BAndiT1983
okay, i will repeat it again: the chaleenge task is not about gathering as many bonus points as possible, it's about showing proper structured code, also the ways one took to solve the problem etc.
13:29
BAndiT1983
we are issuing challenge tasks, to filter out best students
13:29
rohan_
parimal_. you can see my code for bilinear interpolation once I post it online
13:30
parimal
there was no concept of ppm files last year, how can rohan_ just blame me that I reproduced it from TofuLynx?
13:30
BAndiT1983
cause variable look like his
13:30
BAndiT1983
*variables
13:30
BAndiT1983
also debayering
13:31
parimal
Yes, true, it was mentioned we can use other resources as long as we mention them, I will add the repo link for him too
13:32
Bertl
off for now ... bbl
13:32
parimal
And code it from scratch I guess
13:32
Bertl
changed nick to: Bertl_oO
13:32
BAndiT1983
this debayering is not my favourite, as it is monolithic as hell
13:32
BAndiT1983
using nested if/else is always a problem when a bigger code is involved
13:33
parimal
Do you suggest any other way? Since I studied it from this article -http://www.stark-labs.com/craig/articles/assets/Debayering_API.pdf
13:33
BAndiT1983
and especially when it is done in a loop
13:33
parimal
Billinear interpolation, and his code does the same :)
13:34
BAndiT1983
your code is same as the code from Claudio, don't know what i should grade then, as i don't have any obvious points to evaluate
13:34
parimal
the conversion and debayering is same, yes
13:35
parimal
alright I will code it from scratch and use a better way for 12 bit conversion
13:35
supragya_raj
BAndiT1983: can we take out NN and Bilinear off the table then?
13:35
BAndiT1983
NN?
13:35
supragya_raj
nearest neighbor
13:35
BAndiT1983
i would keep it for now
13:35
RexOrCine
changed nick to: RexOrCine|away
13:36
rohan_
no supragya don't do that. already done that part. it was very nerve-wrecking
13:36
BAndiT1983
this are perfect sub-tasks for evaluation, i'm not that much interested in final results, but in proper structure
13:36
BAndiT1983
rohan_: to make it simpler, you can process every channel individually
13:37
BAndiT1983
optimizations are not a requirement
13:37
rohan_
BAndiT I did exactly that
13:37
supragya_raj
BAndiT1983: can I ask why we posted all the repos (for everyone to see) in T872 last time? Maybe that is where this problem is stemming from?
13:38
BAndiT1983
the repos were copied to prevent modifications for evaluation
13:38
BAndiT1983
also they are public, so visible for everyone, also without forking to apertus repo
13:39
BAndiT1983
there is a saying: put 100 developers in a room and you will get 200 solutions
13:39
BAndiT1983
there are many ways to solve either debayering method in code
13:40
BAndiT1983
also nice -> http://www.cis.upenn.edu/~danielkh/files/2013_2014_demosaicing/demosaicing.html
13:41
BAndiT1983
another reference: https://github.com/codeplaysoftware/visioncpp/wiki/Example:-Bayer-Filter-Demosaic
13:44
rohan_
left the channel
13:46
parimal
So I should try it again, with all the criticism :)
13:47
parimal
thanks a lot, also, I didn't copy paste it mindlessly, I do understand everyt bit of code. Sorry if it came out that way.
13:49
BAndiT1983
try to split the debayering code, which would show that you really understood it, as the code is monolithic
13:50
parimal
Alright, will work on it
14:00
parimal
left the channel
14:31
Cyna_
left the channel
14:35
supragya_raj
left the channel
15:23
BAndiT1983
changed nick to: BAndiT1983|away
15:23
BAndiT1983|away
changed nick to: BAndiT1983
15:27
BAndiT1983
changed nick to: BAndiT1983|away
15:54
ASHU
joined the channel
16:19
ASHU
Hola everyone !!!
16:19
ASHU
This is regarding T734 , I have a naive idea , how to make histgram from a raw12 file .
16:20
ASHU
I was trying to understand code base: https://github.com/apertus-open-source-cinema/axiom-beta-firmware/tree/master/software/sensor_tools/hist
16:21
ASHU
I understood that we will be connecting to axiom beta and passing arguments through our system .
16:23
ASHU
Then we are using mmap for memory mapping .But , I did not understand few functions functionality like get_cmv_reg() , set_cmv_reg ()
16:25
ASHU
2- how we are taking these values cmv_base , cmv_size , map_size , are these are predefined values what they signify ?
16:42
ASHU
left the channel
16:54
se6astian
ASHU, these values are hardware specific for our image sensor
17:19
ASHU
joined the channel
17:19
ASHU
Hello se6astian ,
17:20
BAndiT1983|away
changed nick to: BAndiT1983
17:21
BAndiT1983
ASHU: probably you need this -> https://wiki.apertus.org/index.php/CMV12000_Register_Blocks
17:21
ASHU
I wanted to know what approach you have implemented in that code .
17:22
ASHU
as my naive idea was to simply after getting buffer , I will hash values to get histogram .
17:24
BAndiT1983
it depends on the type of histogram you want to generate from it
17:24
BAndiT1983
first thing i would adjust there, is the double loop, which is usually not required and can be replaced by linear one
17:30
ASHU
what do you mean by type of histograms ?
17:30
ASHU
we are trying to get histogram that acts as a graphical representation of the tonal distribution in a digital image , right?
17:30
BAndiT1983
the task mentions waveform and another one
17:30
ASHU
are talking about the line #292 , double loop
17:31
ASHU
?
17:31
BAndiT1983
https://lab.apertus.org/T734
17:32
BAndiT1983
yep, this loop, would try to make it simpler, without the check in it
17:33
BAndiT1983
maybe still double loop, as it should also crop image, but it can be done solely through limits in the loop description
17:34
ASHU
okay , I will think about optimisation and soon update you .
17:37
ASHU
I understood how program is taking arguments and memory mapping taking place(using mmap) .
17:37
BAndiT1983
first it is about readability, as some pointer calculations and also assignments can be done simpler
17:37
BAndiT1983
very good
17:37
ASHU
can you please explain me what approach you have taken afterwards to evaluate histogram in that code ?
17:39
ASHU
" first it is about readability, as some pointer calculations" : yes i will try to take it in account .
17:46
Dev_
joined the channel
17:47
BAndiT1983
ASHU: the code is not mine, so i would have to read through it, but don't have time at the moment
17:47
illwieckz
left the channel
17:48
BAndiT1983
you could take parts of the code and create separate application, load bitmap data there and let it run through it, so you can check what it does
17:49
Dev_
left the channel
17:52
ASHU
okay , thank you very much I will try that .
17:52
BAndiT1983
no problem, good luck
17:56
ASHU
: )
17:56
ASHU
left the channel
18:31
niemand
joined the channel
19:47
sebix
joined the channel
19:47
sebix
left the channel
19:47
sebix
joined the channel
20:43
intrac
left the channel
21:04
BAndiT1983
changed nick to: BAndiT1983|away
21:07
illwieckz
joined the channel
21:12
se6astian
off to bed
21:12
se6astian
good night
21:12
sebix
left the channel
21:16
se6astian
changed nick to: se6astian|away
21:17
niemand
left the channel
21:19
intrac
joined the channel
22:06
illwieckz
left the channel
22:22
illwieckz
joined the channel
22:23
Spirit532
left the channel
22:23
Spirit532
joined the channel
22:40
illwieckz
left the channel