Ship-based carbon capture onboard of diesel or LNG-fuelled ships