Kamal Nasrollahi

156 papers A* 1A 4B 12C 7Misc 2Journal 52Unranked 72
YearRankTypeTitle / Venue / Authors
2026 J jnl
CoRR
Neelu Madan, Àlex Pujol, Andreas Møgelmose, Sergio Escalera, Kamal Nasrollahi, Graham W. Taylor, Thomas B. Moeslund
2026 J jnl
AI Ethics
Lilit Wecker, Jeppe Agger Nielsen, Kamal Nasrollahi, Thomas Ploug
2026 J jnl
CoRR
Nazia Aslam, Abhisek Ray, Joakim Bruslund Haurum, Lukas Esterle, Kamal Nasrollahi
2026 J jnl
CoRR
Nazia Aslam, Abhisek Ray, Thomas B. Moeslund, Kamal Nasrollahi
2026 J jnl
CoRR
Iñaki Erregue, Kamal Nasrollahi, Sergio Escalera
2026 ed.
REPAI
Kamal Nasrollahi, Lars Mathiassen, Jens Nygren
2026 J jnl
CoRR
Oriol Rabasseda, Zenjie Li, Kamal Nasrollahi, Sergio Escalera
2025 conf
CVPR Workshops
Nazia Aslam, Kamal Nasrollahi
2025 J jnl
CoRR
Nazia Aslam, Kamal Nasrollahi
2025 conf
WACV (Workshops)
Marc Oliu, Rohat Bozyil, Mia Sandra Nicole Siemon, Alejandro Martinez-Senent, Sergio Escalera, Thomas B. Moeslund, Kamal Nasrollahi
2025 J jnl
Neural Process. Lett.
Jacob V. Dueholm, Mia Sandra Nicole Siemon, Radu Tudor Ionescu, Thomas B. Moeslund, Kamal Nasrollahi
2025 conf
CVPR Workshops
Àlex Pujol Vidal, Kamal Nasrollahi, Thomas B. Moeslund, Sergio Escalera
2025 J jnl
CoRR
Àlex Pujol Vidal, Sergio Escalera, Kamal Nasrollahi, Thomas B. Moeslund
2025 B conf
ACIVS
Luna Lux Fredenslund, Vasiliki Ismiroglou, Thomas B. Moeslund, Kamal Nasrollahi
2025 conf
REPAI
Lilit Wecker, Jeppe Agger Nielsen, Kamal Nasrollahi, Thomas Ploug
2025 J jnl
CoRR
Mia Sandra Nicole Siemon, Ivan A. Nikolov, Thomas B. Moeslund, Kamal Nasrollahi
2025 conf
WACV (Workshops)
Iñaki Erregue, Kamal Nasrollahi, Sergio Escalera
2025 J jnl
CoRR
Iñaki Erregue, Kamal Nasrollahi, Sergio Escalera
2024 conf
GCPR (2)
Mia Sandra Nicole Siemon, Thomas B. Moeslund, Barry Norton, Kamal Nasrollahi
2024 J jnl
CoRR
Mia Sandra Nicole Siemon, Thomas B. Moeslund, Barry Norton, Kamal Nasrollahi
2024 conf
IPTA
Apostolos Ntelopoulos, Kamal Nasrollahi
2024 A conf
WACV
Neelu Madan, Nicolae-Catalin Ristea, Kamal Nasrollahi, Thomas B. Moeslund, Radu Tudor Ionescu
2024 conf
ICMVA
Magnus Kaufmann Gjerde, Kamal Nasrollahi, Thomas B. Moeslund, Joakim Bruslund Haurum
2024 conf
IPTA
Jacobo González de Frutos, Mia Sandra Nicole Siemon, Kamal Nasrollahi
2024 conf
WACV (Workshops)
Johnny Núñez, Zenjie Li, Sergio Escalera, Kamal Nasrollahi
2024 conf
WACV (Workshops)
Miquel Romero Blanch, Zenjie Li, Sergio Escalera, Kamal Nasrollahi
2024 A conf
WACV
Andreas Aakerberg, Majed El Helou, Kamal Nasrollahi, Thomas B. Moeslund
2024 conf
WACV (Workshops)
Kjartan Madsen, Zenjie Li, François Lauze, Kamal Nasrollahi
2024 J jnl
IEEE Trans. Pattern Anal. Mach. Intell.
Neelu Madan, Nicolae-Catalin Ristea, Radu Tudor Ionescu, Kamal Nasrollahi, Fahad Shahbaz Khan, Thomas B. Moeslund, Mubarak Shah
2024 conf
WACV (Workshops)
Marc Oliu, Kamal Nasrollahi, Sergio Escalera, Thomas B. Moeslund
2024 conf
WACV (Workshops)
Mickael Cormier, Andreas Specker, Júlio C. S. Jacques Júnior, Lennart Moritz, Jürgen Metzler, Thomas B. Moeslund, Kamal Nasrollahi, Sergio Escalera, Jürgen Beyerer
2024 conf
ICPR (Workshops and Challenges, 6)
Àlex Pujol Vidal, Anders Skaarup Johansen, Mohammad N. S. Jahromi, Sergio Escalera, Kamal Nasrollahi, Thomas B. Moeslund
2024 J jnl
CoRR
Àlex Pujol Vidal, Anders Skaarup Johansen, Mohammad N. S. Jahromi, Sergio Escalera, Kamal Nasrollahi, Thomas B. Moeslund
2024 conf
KES-IDT
Aleksander Nagaj, Zenjie Li, Dim P. Papadopoulos, Kamal Nasrollahi
2024 J jnl
CoRR
Aleksander Nagaj, Zenjie Li, Dim P. Papadopoulos, Kamal Nasrollahi
2023 J jnl
CoRR
Neelu Madan, Nicolae-Catalin Ristea, Kamal Nasrollahi, Thomas B. Moeslund, Radu Tudor Ionescu
2023 conf
SCIA (1)
Andreas Aakerberg, Kamal Nasrollahi, Thomas B. Moeslund
2023 J jnl
Comput. Vis. Image Underst.
Antonio Barbalau, Radu Tudor Ionescu, Mariana-Iuliana Georgescu, Jacob V. Dueholm, Bharathkumar Ramachandra, Kamal Nasrollahi, Fahad Shahbaz Khan, Thomas B. Moeslund, Mubarak Shah
2023 conf
WACV (Workshops)
Neelu Madan, Mia Sandra Nicole Siemon, Magnus Kaufmann Gjerde, Bastian Starup Petersson, Arijus Grotuzas, Malthe Aaholm Esbensen, Ivan Adriyanov Nikolov, Mark Philip Philipsen, Kamal Nasrollahi, Thomas B. Moeslund
2023 conf
WACV (Workshops)
Mickael Cormier, Andreas Specker, Júlio C. S. Jacques Júnior, Lucas Florin, Jürgen Metzler, Thomas B. Moeslund, Kamal Nasrollahi, Sergio Escalera, Jürgen Beyerer
2023 J jnl
IEEE Trans. Pattern Anal. Mach. Intell.
Javier Selva, Anders Skaarup Johansen, Sergio Escalera, Kamal Nasrollahi, Thomas B. Moeslund, Albert Clapés
2022 C conf
ICMV
Mia Sandra Nicole Siemon, Kamal Nasrollahi, Thomas B. Moeslund
2022 conf
ECCV Workshops (5)
Anders Skaarup Johansen, Júlio C. S. Jacques Júnior, Kamal Nasrollahi, Sergio Escalera, Thomas B. Moeslund
2022 J jnl
IEEE Trans. Cybern.
Pau Rodríguez, Guillem Cucurull, Jordi Gonzàlez, Josep M. Gonfaus, Kamal Nasrollahi, Thomas B. Moeslund, F. Xavier Roca
2022 J jnl
Pattern Anal. Appl.
Chaudhary Muhammad Aqdus Ilyas, Matthias Rehm, Kamal Nasrollahi, Yeganeh Madadi, Thomas B. Moeslund, Vahid Seydi
2022 J jnl
Vis. Comput.
Seyed Mojtaba Marvasti-Zadeh, Hossein Ghanei-Yakhdan, Shohreh Kasaei, Kamal Nasrollahi, Thomas B. Moeslund
2022 J jnl
IET Image Process.
Andreas Aakerberg, Kamal Nasrollahi, Thomas B. Moeslund
2022 J jnl
CoRR
Antonio Barbalau, Radu Tudor Ionescu, Mariana-Iuliana Georgescu, Jacob V. Dueholm, Bharathkumar Ramachandra, Kamal Nasrollahi, Fahad Shahbaz Khan, Thomas B. Moeslund, Mubarak Shah
2022 J jnl
CoRR
Neelu Madan, Nicolae-Catalin Ristea, Radu Tudor Ionescu, Kamal Nasrollahi, Fahad Shahbaz Khan, Thomas B. Moeslund, Mubarak Shah
2022 A* conf
CVPR
Nicolae-Catalin Ristea, Neelu Madan, Radu Tudor Ionescu, Kamal Nasrollahi, Fahad Shahbaz Khan, Thomas B. Moeslund, Mubarak Shah
2022 conf
WACV (Workshops)
Andreas Aakerberg, Anders Skaarup Johansen, Kamal Nasrollahi, Thomas B. Moeslund
2022 J jnl
CoRR
Javier Selva, Anders Skaarup Johansen, Sergio Escalera, Kamal Nasrollahi, Thomas B. Moeslund, Albert Clapés
2021 J jnl
Sensors
Chris H. Bahnsen, Anders Skaarup Johansen, Mark P. Philipsen, Jesper W. Henriksen, Kamal Nasrollahi, Thomas B. Moeslund
2021 conf
IntelliSys (2)
Neelu Madan, Kamal Nasrollahi, Thomas B. Moeslund
2021 conf
VISIGRAPP (5: VISAPP)
Chaudhary Muhammad Aqdus Ilyas, Rita Nunes, Kamal Nasrollahi, Matthias Rehm, Thomas B. Moeslund
2021 J jnl
IET Signal Process.
Nasrin Imanpour, Ahmad Reza Naghsh-Nilchi, Amirhassan Monadjemi, Hossein Karshenas, Kamal Nasrollahi, Thomas B. Moeslund
2021 conf
CAIP (1)
Jacob Velling Dueholm, Kamal Nasrollahi, Thomas Baltzer Moeslund
2021 conf
ISVC (2)
Michael Bidstrup, Jacob V. Dueholm, Kamal Nasrollahi, Thomas B. Moeslund
2021 conf
NeurIPS Datasets and Benchmarks
Andreas Aakerberg, Kamal Nasrollahi, Thomas B. Moeslund
2021 J jnl
CoRR
Andreas Aakerberg, Kamal Nasrollahi, Thomas B. Moeslund
2021 conf
ISVC (1)
Moaaz M. J. Allahham, Andreas Aakerberg, Kamal Nasrollahi, Thomas B. Moeslund
2021 conf
NeurIPS Datasets and Benchmarks
Ivan A. Nikolov, Mark Philip Philipsen, Jinsong Liu, Jacob V. Dueholm, Anders Skaarup Johansen, Kamal Nasrollahi, Thomas B. Moeslund
2021 J jnl
CoRR
Nicolae-Catalin Ristea, Neelu Madan, Radu Tudor Ionescu, Kamal Nasrollahi, Fahad Shahbaz Khan, Thomas B. Moeslund, Mubarak Shah
2021 conf
CAIP (2)
Andreas Aakerberg, Anders Skaarup Johansen, Kamal Nasrollahi, Thomas B. Moeslund
2021 conf
CVPR Workshops
Adrien Deliège, Anthony Cioppa, Silvio Giancola, Meisam Jamshidi Seikavandi, Jacob V. Dueholm, Kamal Nasrollahi, Bernard Ghanem, Thomas B. Moeslund, Marc Van Droogenbroeck
2021 conf
ICCVW
Neelu Madan, Arya Farkhondeh, Kamal Nasrollahi, Sergio Escalera, Thomas B. Moeslund
2020 J jnl
IEEE Trans. Circuits Syst. Video Technol.
Alireza Sepas-Moghaddam, Mohammad A. Haque, Paulo Lobato Correia, Kamal Nasrollahi, Thomas B. Moeslund, Fernando Pereira
2020 J jnl
Multim. Tools Appl.
Dogus Karabulut, Pavlo Tertychnyi, Hasan Sait Arslan, Cagri Ozcinar, Kamal Nasrollahi, Joan Valls, Joan Vilaseca, Thomas B. Moeslund, Gholamreza Anbarjafari
2020 J jnl
IET Image Process.
Yeganeh Madadi, Vahid Seydi, Kamal Nasrollahi, Reshad Hosseini, Thomas B. Moeslund
2020 J jnl
CoRR
Seyed Mojtaba Marvasti-Zadeh, Hossein Ghanei-Yakhdan, Shohreh Kasaei, Kamal Nasrollahi, Thomas B. Moeslund
2020 conf
ICPR Workshops (4)
Christoffer Bøgelund Rasmussen, Aske Rasch Lejbølle, Kamal Nasrollahi, Thomas B. Moeslund
2020 B conf
ICIP
Aske R. Lejbølle, Benjamin Krogh, Kamal Nasrollahi, Thomas B. Moeslund
2020 J jnl
IEEE Trans. Inf. Forensics Secur.
Aske R. Lejbølle, Kamal Nasrollahi, Benjamin Krogh, Thomas B. Moeslund
2020 J jnl
CoRR
Adrien Deliège, Anthony Cioppa, Silvio Giancola, Meisam Jamshidi Seikavandi, Jacob V. Dueholm, Kamal Nasrollahi, Bernard Ghanem, Thomas B. Moeslund, Marc Van Droogenbroeck
2020 J jnl
Entropy
Thomas B. Moeslund, Sergio Escalera, Gholamreza Anbarjafari, Kamal Nasrollahi, Jun Wan
2019 J jnl
Multim. Tools Appl.
Andre Litvin, Kamal Nasrollahi, Sergio Escalera, Cagri Ozcinar, Thomas B. Moeslund, Gholamreza Anbarjafari
2019 J jnl
Mach. Vis. Appl.
Gholamreza Anbarjafari, Sergio Escalera, Kamal Nasrollahi, Hugo Jair Escalante, Xavier Baró, Jun Wan, Thomas B. Moeslund
2019 J jnl
Entropy
Mohammad N. S. Jahromi, Pau Buch-Cardona, Egils Avots, Kamal Nasrollahi, Sergio Escalera, Thomas B. Moeslund, Gholamreza Anbarjafari
2019 B conf
RO-MAN
Chaudhary Muhammad Aqdus Ilyas, Viktor Schmuck, Mohammad Ahsanul Haque, Kamal Nasrollahi, Matthias Rehm, Thomas B. Moeslund
2019 ed.
FFER/DLPR@ICPR
Xiang Bai, Yi Fang, Yangqing Jia, Meina Kan, Shiguang Shan, Chunhua Shen, Jingdong Wang, Gui-Song Xia, Shuicheng Yan, Zhaoxiang Zhang, Kamal Nasrollahi, Gang Hua, Thomas B. Moeslund, Qiang Ji
2018 J jnl
CoRR
Alireza Sepas-Moghaddam, Mohammad A. Haque, Paulo Lobato Correia, Kamal Nasrollahi, Thomas B. Moeslund, Fernando Pereira
2018 conf
CVPR Workshops
Aske R. Lejbølle, Benjamin Krogh, Kamal Nasrollahi, Thomas B. Moeslund
2018 conf
WACV Workshops
Mohammad N. S. Jahromi, Morten Bojesen Bonderup, Maryam Asadi-Aghbolaghi, Egils Avots, Kamal Nasrollahi, Sergio Escalera, Shohreh Kasaei, Thomas B. Moeslund, Gholamreza Anbarjafari
2018 B conf
FG
Rain Eric Haamer, Kaustubh Kulkarni, Nasrin Imanpour, Mohammad A. Haque, Egils Avots, Michelle Breisch, Kamal Nasrollahi, Sergio Escalera, Cagri Ozcinar, Xavier Baró, Ahmad Reza Naghsh-Nilchi, Thomas B. Moeslund, Gholamreza Anbarjafari
2018 B conf
FG
Mohammad A. Haque, Rubén Ballester Bautista, Fatemeh Noroozi, Kaustubh Kulkarni, Christian B. Laursen, Ramin Irani, Marco Bellantonio, Sergio Escalera, Gholamreza Anbarjafari, Kamal Nasrollahi, Ole Kæseler Andersen, Erika G. Spaich, Thomas B. Moeslund
2018 conf
VISIGRAPP (Revised Selected Papers)
Chaudhary Muhammad Aqdus Ilyas, Mohammad A. Haque, Matthias Rehm, Kamal Nasrollahi, Thomas B. Moeslund
2018 J jnl
IET Biom.
Aske R. Lejbølle, Kamal Nasrollahi, Thomas B. Moeslund
2018 conf
VISIGRAPP (4: VISAPP)
Chaudhary Muhammad Aqdus Ilyas, Mohammad A. Haque, Matthias Rehm, Kamal Nasrollahi, Thomas B. Moeslund
2018 conf
MLSP
Alireza Sepas-Moghaddam, Paulo Lobato Correia, Kamal Nasrollahi, Thomas B. Moeslund, Fernando Pereira
2018 C conf
ICMV
Anders Skaarup Johansen, Jesper W. Henriksen, Mohammad A. Haque, Mohammad Naser Sabet Jahromi, Kamal Nasrollahi, Thomas B. Moeslund
2018 C conf
ICMV
Christos Apostolopoulos, Kamal Nasrollahi, M. Hsuan Yang, Mohammad N. S. Jahromi, Thomas B. Moeslund
2018 Misc conf
ISVC
Mohammad A. Haque, Simon S. Kjeldsen, Federico G. Arguissain, Iris Brunner, Kamal Nasrollahi, Ole Kæseler Andersen, Jørgen Feldbæk Nielsen, Thomas B. Moeslund, Anders Jørgensen
2018 B conf
ICIP
Chaudhary Muhammad Aqdus Ilyas, Kamal Nasrollahi, Matthias Rehm, Thomas B. Moeslund
2017 J jnl
IET Comput. Vis.
Pejman Rasti, Kamal Nasrollahi, Olga Orlova, Gert Tamberg, Cagri Ozcinar, Thomas B. Moeslund, Gholamreza Anbarjafari
2017 conf
ISBA
Aske R. Lejbølle, Kamal Nasrollahi, Thomas B. Moeslund
2017 ch.
Handbook of Biometrics for Forensic Science
Kamal Nasrollahi, Mohammad A. Haque, Ramin Irani, Thomas B. Moeslund
2017 C conf
IJCCI
Andreas Aakerberg, Kamal Nasrollahi, Christoffer B. Rasmussen, Thomas B. Moeslund
2017 conf
SCIA (2)
Mohammad A. Haque, Kamal Nasrollahi, Thomas B. Moeslund
2017 conf
CVPR Workshops
Morten B. Jensen, Kamal Nasrollahi, Thomas B. Moeslund
2017 conf
VISIGRAPP (5: VISAPP)
Daniel Michelsanti, Andreea-Daniela Ene, Yanis Guichi, Rares Stef, Kamal Nasrollahi, Thomas B. Moeslund
2017 conf
IPTA
Andreas Aakerberg, Kamal Nasrollahi, Thomas Heder
2017 Misc conf
ICMLC
Aske R. Lejbølle, Kamal Nasrollahi, Thomas B. Moeslund
2017 conf
BIOSIG
Aske R. Lejbølle, Kamal Nasrollahi, Benjamin Krogh, Thomas B. Moeslund
2017 conf
ISBA
Mohammad A. Haque, Kamal Nasrollahi, Thomas B. Moeslund
2017 conf
VISIGRAPP (5: VISAPP)
Troels H. P. Jensen, Helge T. Schmidt, Niels D. Bodin, Kamal Nasrollahi, Thomas B. Moeslund
2017 C conf
IJCCI
Christoffer Bøgelund Rasmussen, Kamal Nasrollahi, Thomas B. Moeslund
2017 C conf
IJCCI
Daniel Kold Hansen, Kamal Nasrollahi, Christoffer B. Rasmussen, Thomas B. Moeslund
2017 J jnl
J. Electronic Imaging
Pejman Rasti, Kamal Nasrollahi, Olga Orlova, Gert Tamberg, Thomas B. Moeslund, Gholamreza Anbarjafari
2017 ed.
VAAM/FFER@ICPR
Kamal Nasrollahi, Cosimo Distante, Gang Hua, Andrea Cavallaro, Thomas B. Moeslund, Sebastiano Battiato, Qiang Ji
2016 J jnl
IEEE Trans. Inf. Forensics Secur.
Yunlian Sun, Kamal Nasrollahi, Zhenan Sun, Tieniu Tan
2016 conf
VAAM/FFER@ICPR
Andreas Aakerberg, Christoffer B. Rasmussen, Kamal Nasrollahi, Thomas B. Moeslund
2016 book
Juris Klonovs, Mohammad A. Haque, Volker Krüger, Kamal Nasrollahi, Karen Andersen-Ranberg, Thomas B. Moeslund, Erika G. Spaich
2016 J jnl
IET Comput. Vis.
Mohammad A. Haque, Ramin Irani, Kamal Nasrollahi, Thomas B. Moeslund
2016 J jnl
IEEE Intell. Syst.
Mohammad A. Haque, Ramin Irani, Kamal Nasrollahi, Thomas B. Moeslund
2016 J jnl
IET Biom.
Marc Oliu Simon, Ciprian A. Corneanu, Kamal Nasrollahi, Olegs Nikisins, Sergio Escalera, Yunlian Sun, Haiqing Li, Zhenan Sun, Thomas B. Moeslund, Modris Greitans
2016 conf
IPTA
Pejman Rasti, Olga Orlova, Gert Tamberg, Cagri Ozcinar, Kamal Nasrollahi, Thomas B. Moeslund, Gholamreza Anbarjafari
2016 conf
IPTA
Adria A. Sanguesa, Nicolai Krogh Jørgensen, Christian A. Larsen, Kamal Nasrollahi, Thomas B. Moeslund
2016 conf
IWSSIP
Jesper B. Pedersen, Kamal Nasrollahi, Thomas B. Moeslund
2016 conf
VAAM/FFER@ICPR
Marco Bellantonio, Mohammad A. Haque, Pau Rodríguez, Kamal Nasrollahi, Taisi Telve, Sergio Escalera, Jordi Gonzàlez, Thomas B. Moeslund, Pejman Rasti, Gholamreza Anbarjafari
2016 conf
AMDO
Dennis H. Lundtoft, Kamal Nasrollahi, Thomas B. Moeslund, Sergio Escalera
2016 conf
IPTA
Ramin Irani, Kamal Nasrollahi, Abhinav Dhall, Thomas B. Moeslund, Tom Gedeon
2015 conf
EUSIPCO
Mohammad A. Haque, Kamal Nasrollahi, Thomas B. Moeslund
2015 A conf
WACV
Bo Galsgaard, Dennis H. Lundtoft, Ivan A. Nikolov, Kamal Nasrollahi, Thomas B. Moeslund
2015 conf
IPTA
Kamal Nasrollahi, Sergio Escalera, Pejman Rasti, Gholamreza Anbarjafari, Xavier Baró, Hugo Jair Escalante, Thomas B. Moeslund
2015 B conf
ICIP
Mehdi Faraji, Jamshid Shanbehzadeh, Kamal Nasrollahi, Thomas B. Moeslund
2015 J jnl
IEEE Trans. Image Process.
Mehdi Faraji, Jamshid Shanbehzadeh, Kamal Nasrollahi, Thomas Baltzer Moeslund
2015 ed.
FFER@ICPR
Qiang Ji, Thomas B. Moeslund, Gang Hua, Kamal Nasrollahi
2015 conf
SCIA
Mohammad A. Haque, Kamal Nasrollahi, Thomas B. Moeslund
2015 conf
CVPR Workshops
Mohammad Ali Bagheri, Qigang Gao, Sergio Escalera, Albert Clapés, Kamal Nasrollahi, Michael B. Holte, Thomas B. Moeslund
2015 J jnl
Pattern Recognit. Lett.
Mark S. Nixon, Paulo L. Correia, Kamal Nasrollahi, Thomas B. Moeslund, Abdenour Hadid, Massimo Tistarelli
2015 conf
CVPR Workshops
Ramin Irani, Kamal Nasrollahi, Thomas B. Moeslund
2015 A conf
WACV
Mohammad A. Haque, Kamal Nasrollahi, Thomas B. Moeslund
2015 conf
CVPR Workshops
Ramin Irani, Kamal Nasrollahi, Marc Oliu Simon, Ciprian A. Corneanu, Sergio Escalera, Chris Bahnsen, Dennis H. Lundtoft, Thomas B. Moeslund, Tanja L. Pedersen, Maria-Louise Klitgaard, Laura Petrini
2015 conf
IPTA
João Satiro, Kamal Nasrollahi, Paulo L. Correia, Thomas B. Moeslund
2014 B conf
ICPR
Casper Pedersen, Kamal Nasrollahi, Thomas B. Moeslund
2014 conf
VISAPP (2)
Mohammad A. Haque, Kamal Nasrollahi, Thomas B. Moeslund
2014 B conf
ICIP
Ramin Irani, Kamal Nasrollahi, Thomas B. Moeslund
2014 conf
VISAPP (3)
Ramin Irani, Kamal Nasrollahi, Thomas B. Moeslund
2014 conf
VISAPP (3)
Rune A. Andersen, Kamal Nasrollahi, Thomas B. Moeslund, Mohammad A. Haque
2014 B conf
ICPR
Olegs Nikisins, Kamal Nasrollahi, Modris Greitans, Thomas B. Moeslund
2014 C conf
ICMV
Florin Octavian Matu, Iskren Vlaykov, Mikkel Thøgersen, Kamal Nasrollahi, Thomas B. Moeslund
2014 J jnl
Mach. Vis. Appl.
Kamal Nasrollahi, Thomas B. Moeslund
2013 conf
CIARP (2)
Kamal Nasrollahi, Thomas B. Moeslund
2013 B conf
ICIP
Kamal Nasrollahi, Thomas B. Moeslund
2013 conf
ICB
Kamal Nasrollahi, Thomas B. Moeslund, Maryam Rashidi
2013 conf
IWBF
Andreas Møgelmose, Thomas B. Moeslund, Kamal Nasrollahi
2013 B conf
AVSS
Mohammad A. Haque, Kamal Nasrollahi, Thomas B. Moeslund
2012 conf
SITIS
R. I. Hg, P. Jasek, C. Rofidal, Kamal Nasrollahi, Thomas B. Moeslund, G. Tranchet
2012 conf
SITIS
S. N. Jensen, N. G. Myrtue, Casper Pedersen, G. Tranchet, Kamal Nasrollahi, Thomas B. Moeslund
2011 J jnl
IEEE Trans. Circuits Syst. Video Technol.
Kamal Nasrollahi, Thomas B. Moeslund
2011 J jnl
Int. J. Image Graph.
Kamal Nasrollahi, Thomas B. Moeslund, Mohammad Rahmati
2010 conf
VISAPP (1)
Kamal Nasrollahi, Thomas B. Moeslund
2010 conf
BTAS
Kamal Nasrollahi, Thomas B. Moeslund
2010 conf
IPTA
Kamal Nasrollahi, Thomas B. Moeslund
2008 conf
ICIAR
Kamal Nasrollahi, Mohammad Rahmati, Thomas B. Moeslund
2008 conf
BIOID
Kamal Nasrollahi, Thomas B. Moeslund
redb/extractors/decompiler/bninja/analysis/cfg-old.py
← Index redb/extractors/decompiler/bninja/analysis/cfg-old.py python
from collections import deque
from enum import Enum

from binaryninja.enums import (
    BranchType,
    InstructionTextTokenType,
)

# Support both package and standalone imports
try:
    from ..utils.hashes import calculate_md5, calculate_sha256
except ImportError:
    # Fallback to absolute imports (for multiprocessing spawned processes)
    from redb.extractors.decompiler.bninja.utils.hashes import calculate_md5, calculate_sha256


class CFGAnalysis:
    def __init__(self, function):
        self.function = function

    def determine_block_type(self, block) -> str:
        """Determine the type of a basic block."""
        # Check if it's a thunk function (usually just a jump or call)
        if len(block.disassembly_text) <= 2 and any(
            "jmp" in line.tokens[0].text.lower() for line in block.disassembly_text
        ):
            return "THUNK"

        # Check if it contains only data (no valid instructions)
        if all(not line.tokens for line in block.disassembly_text):
            return "DATA"

        # Default to code
        return "CODE"

    def extract_cyclomatic_complexity(self):
        """
        Cyclomatic complexity (McCabe’s metric) measures the number of linearly independent paths
        through a function’s control flow graph (CFG).
        The standard formula is:

            M = E - N + 2

        where:
            - E = number of edges in the CFG
            - N = number of nodes (basic blocks)
            - 2 accounts for the entry and exit nodes of a single connected graph
        """
        if self.function is None:
            return 0

        # number of basic blocks
        num_blocks = len(self.function.basic_blocks)
        # number of edges in the graph
        num_edges = sum(
            len(basic_block.outgoing_edges)
            for basic_block in self.function.basic_blocks
        )
        return num_edges - num_blocks + 2

    def extract_function_cfg(self):
        """Extract information about a function CFG and return it as a dictionary."""

        function = self.function
        function_data = {
            "function_address": self.function.start,
            "blocks": [],
            "measures": {
                "cyclomatic_complexity": self.extract_cyclomatic_complexity(),
            },
        }

        if self.function is None:
            return function_data

        # Get the map of the depth associated to every block
        depths = self.get_map_depth()

        # Get the map of the positions associated to every block
        id_maps = self.get_block_id_map()

        # Extract block data with graph structure information
        for block in function.basic_blocks:
            # dominators per every block translated
            dominators = sorted(self.extract_dominators(block, id_maps))

            # post dominators
            post_dominators = sorted(self.extract_post_dominators(block, id_maps))

            # Build block instructions string
            block_instructions = "\n".join(str(line) for line in block.disassembly_text)

            # Determine block type
            block_type = self.determine_block_type(block)

            # Extract successors directly from basic block
            successor_blocks = [edge.target.start for edge in block.outgoing_edges]
            # We ensure a canonical order and we sort the edges
            successor_blocks.sort()

            # Extract predecessors directly from basic block
            predecessor_blocks = [edge.source.start for edge in block.incoming_edges]
            # We ensure a canonical order and we sort the edges
            predecessor_blocks.sort()

            # Determine branch type from outgoing edges
            branch_type = self.determine_branch_type(block)

            instructions_count = len(block.disassembly_text)

            # Create block record
            block_json = {
                "function_address": self.function.start,
                "block_start_address": block.start,
                "block_end_address": block.end,
                "block_size": block.end - block.start,
                "instructions_count": instructions_count,
                "block_instructions_hash": calculate_sha256(block_instructions),
                "predecessor_blocks": predecessor_blocks,
                "successor_blocks": successor_blocks,
                "depth": depths[block.start],
                "position": id_maps[block.start],
                "branch_type": branch_type,
                "block_type": block_type,
                "flags": self.extract_block_flags(block),
                "dominators": dominators,
                "post_dominators": post_dominators,
            }
            function_data["blocks"].append(block_json)

        return function_data

    def extract_dominators(self, bb, id_maps):
        """Extract the dominators normalized"""
        dom_idx = [id_maps[d.start] for d in bb.dominators]
        return dom_idx

    def extract_post_dominators(self, bb, id_maps):
        """Extract the post-dominators normalized"""
        post_dom_idx = [id_maps[d.start] for d in bb.post_dominators]
        return post_dom_idx

    def determine_branch_type(self, block):
        """
        Determine the type of branch at the end of a basic block.
        This combines edge type information with instruction analysis.
        """
        # If no outgoing edges, it might be a return or terminal block
        if not block.outgoing_edges:
            # Check if the last instruction is a return
            for line in reversed(list(block.disassembly_text)):
                if line.tokens and any(
                    token.text.lower() in ["ret", "retn"] for token in line.tokens
                ):
                    return "RETURN"
            return "UNKNOWN"

        # Collect branch types from all outgoing edges
        branch_types = []
        for edge in block.outgoing_edges:
            edge_type = edge.type
            # Map edge type to our branch type enum
            if isinstance(edge_type, str):
                if edge_type == "IndirectCall":
                    branch_types.append("CALL")
                else:
                    branch_types.append("UNKNOWN")
            else:
                # Use our mapping for integer/enum values
                type_mapping = {
                    BranchType.UnconditionalBranch: "DIRECT",
                    BranchType.FalseBranch: "CONDITIONAL",
                    BranchType.TrueBranch: "CONDITIONAL",
                    BranchType.CallDestination: "CALL",
                    BranchType.FunctionReturn: "RETURN",
                    BranchType.SystemCall: "CALL",
                    BranchType.IndirectBranch: "INDIRECT",
                    BranchType.ExceptionBranch: "UNKNOWN",
                    BranchType.UnresolvedBranch: "UNKNOWN",
                    BranchType.UserDefinedBranch: "UNKNOWN",
                }
                branch_types.append(type_mapping.get(edge_type, "UNKNOWN"))

        # Determine overall branch type (prioritize CALL > RETURN > CONDITIONAL > DIRECT)
        if "CALL" in branch_types:
            return "CALL"
        elif "RETURN" in branch_types:
            return "RETURN"
        elif "CONDITIONAL" in branch_types:
            return "CONDITIONAL"
        elif "DIRECT" in branch_types:
            return "DIRECT"
        elif len(block.outgoing_edges) == 1:
            return "FALLTHROUGH"

        # If edge analysis was inconclusive, fall back to instruction analysis
        last_instr = None
        for line in reversed(list(block.disassembly_text)):
            if line.tokens:
                last_instr = line
                break

        if last_instr:
            mnemonic = None
            for token in last_instr.tokens:
                if token.type == InstructionTextTokenType.InstructionToken:
                    mnemonic = token.text.lower()
                    break

            if mnemonic:
                if mnemonic == "call":
                    return "CALL"
                elif mnemonic == "jmp":
                    return "DIRECT"
                elif mnemonic.startswith("j") and mnemonic != "jmp":
                    return "CONDITIONAL"
                elif mnemonic in ["ret", "retn"]:
                    return "RETURN"

        return "UNKNOWN"

    def get_map_depth(self):
        """
        Run a BFS on the basic blocks of the function to assign a depth to every block
        """

        depths = {}
        entry = self.function.get_basic_block_at(self.function.start)

        ### Simple BFS
        q = deque()
        q.append(entry)
        depths[entry.start] = 0

        while q:
            b = q.popleft()
            b_depth = depths[b.start]
            for edge in b.outgoing_edges:
                tgt = edge.target

                if tgt is None:
                    continue

                if tgt.start not in depths:
                    depths[tgt.start] = b_depth + 1
                    q.append(tgt)

        return depths

    def get_block_id_map(self):
        """
        Assign a unique, sequential ID to each basic block of the function using a BFS starting from the entry block.
        """

        id_map = {}
        entry = self.function.get_basic_block_at(self.function.start)

        q = deque()
        q.append(entry)

        current_id = 0
        id_map[entry.start] = current_id

        while q:
            b = q.popleft()
            for edge in b.outgoing_edges:
                tgt = edge.target

                if tgt is None:
                    continue

                if tgt.start not in id_map:
                    current_id += 1
                    id_map[tgt.start] = current_id
                    q.append(tgt)

        return id_map

    def extract_block_flags(self, block):
        """
        Get the flags for every basic block. Currently, we implemented these heuristics:
            - if a basic block is the entry node for a function
            - if a basic block is the exit block for a function
            - if a basic block is part of a natural loop
        """
        flags = []

        if block.start == self.function.start:
            flags.append(BlockFlags.EntryBlock.value)

        if any(edge.type == BranchType.FunctionReturn for edge in block.outgoing_edges):
            flags.append(BlockFlags.ExitBlock.value)

        # if this block is in its dominance frontier, then it's part of a natural loop
        if block in block.dominance_frontier:
            flags.append(BlockFlags.LoopBlock.value)

        return flags


class BlockFlags(Enum):
    # generally, the basic block identifying the entry point of the function
    EntryBlock = "EntryBlock"
    # any basic blocks that makes the control flow exiting from the current function
    ExitBlock = "ExitBlock"
    # any block is in a natural loop if it is in its own dominance frontier
    LoopBlock = "LoopBlock"


class BlockType(Enum):
    THUNK = "THUNK"
    DATA = "DATA"
    PADDING = "PADDING"
    CODE = "CODE"