开源项目
image-grid-generator
技术栈
- Python
- 图像处理
- 网格布局
- 自动化工具
项目描述
一个用于生成图像网格布局的工具:
- 自动排列多张图片
- 支持自定义布局
- 灵活的网格配置
- 批量处理能力
图像网格生成示例
Python
def generate_image_grid(images, rows, cols):
# 计算网格大小
grid_width = cols * image_width
grid_height = rows * image_height
# 创建空白画布
grid = Image.new('RGB', (grid_width, grid_height))
for i, image in enumerate(images):
row = i // cols
col = i % cols
grid.paste(image, (col * image_width, row * image_height))
return grid
Astar寻路算法
技术栈
- 算法实现
- 路径规划
- 图形界面
- 数据结构
项目描述
A*寻路算法的实现与可视化:
- 可视化寻路过程
- 支持障碍物设置
- 实时路径更新
- 多种启发函数
A*算法核心代码
Python
def astar(start, goal, grid):
# 初始化开放和关闭列表
open_list = {start}
closed_list = set()
while open_list:
current = min(open_list, key=lambda x: f_score[x])
if current == goal:
return reconstruct_path(came_from, current)
open_list.remove(current)
closed_list.add(current)
for neighbor in get_neighbors(current):
if neighbor in closed_list:
continue
tentative_g = g_score[current] + distance(current, neighbor)
if neighbor not in open_list:
open_list.add(neighbor)
elif tentative_g >= g_score[neighbor]:
continue
came_from[neighbor] = current
JMcomici
技术栈
- Web开发
- 爬虫技术
- 数据处理
- 内容管理
项目描述
一个漫画内容管理系统:
- 漫画资源采集
- 分类管理功能
- 在线阅读支持
- 用户收藏系统
漫画资源爬取示例
Python
async def fetch_comic_data(url):
# 异步获取漫画数据
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
data = await response.json()
# 解析数据结构
comic_info = {
'title': data['title'],
'chapters': data['chapters'],
'cover': data['cover_url']
}
return comic_info
PyQt-Zhihu
技术栈
- Python
- PyQt6
- Web爬虫
- GUI设计
项目描述
一个基于PyQt6开发的知乎客户端,支持内容浏览和下载。主要功能:
- 知乎内容爬取和展示
- 文章离线保存
- 图片资源下载
- 自定义主题设置
知乎客户端核心代码
Python
class ZhihuCrawler(QMainWindow):
def __init__(self):
super().__init__()
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
async def fetch_article(self, url):
# 异步获取知乎文章内容
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
html = await response.text()
# 解析文章内容
soup = BeautifulSoup(html, 'html.parser')
content = soup.find('div', class_='Post-RichText')
return self._process_content(content)
TOF-Acquisition
技术栈
- C++
- OpenCV
- USB通信
- 图像处理
项目描述
TOF相机数据采集和处理软件。主要功能:
- 实时数据采集
- 深度信息处理
- 数据可视化
- 参数配置管理
TOF相机数据处理
C++
class TOFProcessor {
public:
void processDepthData(const Mat& depthMap) {
// 深度图像处理
Mat processed;
GaussianBlur(depthMap, processed, Size(5, 5), 0);
// 边缘检测
Mat edges;
Canny(processed, edges, 50, 150);
// 3D点云转换
vector pointCloud;
for(int y = 0; y < depthMap.rows; y++) {
for(int x = 0; x < depthMap.cols; x++) {
float depth = depthMap.at(y, x);
if(depth > 0) {
pointCloud.push_back(depthToPoint3D(x, y, depth));
}
}
}
}
};
MCF-Manager
技术收藏
TimeCat
技术栈
- TypeScript
- 前端录制
- 回放系统
- 性能优化
项目描述
TimeCat是一款前端录制和回放工具,提供以下功能:
- 网页操作完整记录
- 精确还原交互过程
- 支持多种录制模式
- 可扩展的插件系统